|
|
|
@ -391,10 +391,18 @@ class User extends Controller |
|
|
|
|
|
|
|
|
|
public function maintenance() |
|
|
|
|
{ |
|
|
|
|
$storeId = request()->header()['storeid']; |
|
|
|
|
$list = Db::table('yoshop_maintenance')->where('store_id', $storeId)->field('name,id')->where('status',1)->select(); |
|
|
|
|
$storeId = request()->header()['storeid']; |
|
|
|
|
$list = Db::table('yoshop_maintenance') |
|
|
|
|
->where(['store_id' => $storeId, 'status' => 1, 'parent_id' => 0]) |
|
|
|
|
->field('id','name') |
|
|
|
|
->select() |
|
|
|
|
->toArray(); |
|
|
|
|
foreach ($list as &$item) { |
|
|
|
|
$list['tags'] = Db::table('yoshop_maintenance')->field('name,id,parent_id')->where('parent_id', $item['id'])->where('status',1)->select(); |
|
|
|
|
$item['tags'] = Db::table('yoshop_maintenance') |
|
|
|
|
->field('name,id,url') |
|
|
|
|
->where(['parent_id' => $item['id']]) |
|
|
|
|
->select() |
|
|
|
|
->toArray(); |
|
|
|
|
} |
|
|
|
|
return $this->renderSuccess($list); |
|
|
|
|
} |
|
|
|
|