wysf
bruce 9 months ago
parent de38647f66
commit d5f31e75ba
  1. 10
      app/api/controller/User.php

@ -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 ($data as &$v) {
$v['url_path'] = $v['url'] ? $qrObj->getOtherQrcode((int)$storeId, $v['url']) : '';
$tags[] = $v;
}
foreach ($list['tags'] ?? [] as &$item) {
$item['url'] = $qrObj->getOtherQrcode($storeId, $item['url']);
$item['tags'] = $tags;
}
return $this->renderSuccess($list);

Loading…
Cancel
Save