|
|
@ -399,7 +399,6 @@ class User extends Controller |
|
|
|
|
|
|
|
|
|
|
|
public function maintenance() |
|
|
|
public function maintenance() |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
$qrObj = new BaseQRcode(); |
|
|
|
$qrObj = new BaseQRcode(); |
|
|
|
$storeId = request()->header()['storeid']; |
|
|
|
$storeId = request()->header()['storeid']; |
|
|
|
$list = Db::table('yoshop_maintenance_category') |
|
|
|
$list = Db::table('yoshop_maintenance_category') |
|
|
@ -407,13 +406,16 @@ class User extends Controller |
|
|
|
->select() |
|
|
|
->select() |
|
|
|
->toArray(); |
|
|
|
->toArray(); |
|
|
|
foreach ($list as &$item) { |
|
|
|
foreach ($list as &$item) { |
|
|
|
$item['tags'] = Db::table('yoshop_maintenance') |
|
|
|
$tags = []; |
|
|
|
|
|
|
|
$data = Db::table('yoshop_maintenance') |
|
|
|
->where(['category_id' => $item['id'], 'is_delete' => 0]) |
|
|
|
->where(['category_id' => $item['id'], 'is_delete' => 0]) |
|
|
|
->select() |
|
|
|
->select() |
|
|
|
->toArray(); |
|
|
|
->toArray(); |
|
|
|
} |
|
|
|
foreach ($data as &$v) { |
|
|
|
foreach ($list['tags'] ?? [] as &$item) { |
|
|
|
$v['url_path'] = $v['url'] ? $qrObj->getOtherQrcode((int)$storeId, $v['url']) : ''; |
|
|
|
$item['url'] = $qrObj->getOtherQrcode($storeId, $item['url']); |
|
|
|
$tags[] = $v; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$item['tags'] = $tags; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return $this->renderSuccess($list); |
|
|
|
return $this->renderSuccess($list); |
|
|
|