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