1.提交缺失的东西
This commit is contained in:
@ -26,6 +26,24 @@ use think\facade\Db;
|
||||
|
||||
class MenuLogic
|
||||
{
|
||||
public static function getUserCenterMenu($user_info) {
|
||||
$list = Db::name('decorate_page')
|
||||
->where(['type' => 2])
|
||||
->field('data')
|
||||
->find();
|
||||
$domain = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://";
|
||||
$domain .= $_SERVER['HTTP_HOST'];
|
||||
|
||||
$arr = json_decode($list['data'], true);
|
||||
foreach($arr as &$v) {
|
||||
if (!empty($v['content'] && !empty($v['content']['data']))) {
|
||||
foreach ($v['content']['data'] as &$v1) {
|
||||
$v1['image'] = $domain . '/' . $v1['image'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
public static function getMenu($type,$user_info)
|
||||
{
|
||||
$list = Db::name('menu_decorate')
|
||||
|
||||
Reference in New Issue
Block a user