liuqing 9 months ago
parent 2bf78781d1
commit f2f0fb7fa1
  1. 11
      app/api/controller/User.php

@ -30,6 +30,7 @@ use think\db\exception\DataNotFoundException;
use think\db\exception\DbException; use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException; use think\db\exception\ModelNotFoundException;
use think\response\Json; use think\response\Json;
use think\Db;
use app\common\model\dealer\Order as DealerOrderModel; use app\common\model\dealer\Order as DealerOrderModel;
use app\common\model\Order as OrderModel; use app\common\model\Order as OrderModel;
/** /**
@ -388,6 +389,16 @@ class User extends Controller
return $this->renderSuccess(str_replace(root_path()."public/", base_url(), $qrcode)); return $this->renderSuccess(str_replace(root_path()."public/", base_url(), $qrcode));
} }
public function maintenance()
{
$storeId = request()->header()['storeid'];
$list = Db::table('yoshop_maintenance')->where('store_id', $storeId)->field('name,id')->where('status',1)->select();
foreach ($list as &$item) {
$list['tags'] = Db::table('yoshop_maintenance')->field('name,id,parent_id')->where('parent_id', $item['id'])->where('status',1)->select();
}
return $this->renderSuccess($list);
}

Loading…
Cancel
Save