diff --git a/app/admin/controller/Controller.php b/app/admin/controller/Controller.php index 7c811dea..604966a8 100644 --- a/app/admin/controller/Controller.php +++ b/app/admin/controller/Controller.php @@ -76,8 +76,8 @@ class Controller extends BaseController public function getUserPlatform(){ if ($this->admin['user']['role'] == 1) { //京东账号可以看到京东和自营的 - if ($this->admin['user']['channel'] == 'jd') { - $list = Channel::where('status', 1)->whereIn('code',['jd','zy'])->select(); + if (strpos($this->admin['user']['channel'], 'jd') !== false) { + $list = Channel::where('status', 1)->whereIn('code',[$this->admin['user']['channel'],'zy'])->select(); //苏宁账号可以看到苏宁和自营的 } elseif($this->admin['user']['channel'] == 'sn'){ $list = Channel::where('status', 1)->whereIn('code',['sn','zy'])->select(); diff --git a/app/store/controller/Goods.php b/app/store/controller/Goods.php index b6e57d4b..7a5a1584 100644 --- a/app/store/controller/Goods.php +++ b/app/store/controller/Goods.php @@ -35,7 +35,7 @@ class Goods extends Controller $model = new GoodsModel; $params = $this->request->param(); $params['channel'] = 'zy'; - $list= $model->getList($params, (int)$this->request->param('pageSize', 15)); + //$list= $model->getList($params, (int)$this->request->param('pageSize', 15)); return $this->renderSuccess(compact('list')); } diff --git a/app/store/controller/Store.php b/app/store/controller/Store.php index ea33af9e..6b95f8f1 100644 --- a/app/store/controller/Store.php +++ b/app/store/controller/Store.php @@ -75,7 +75,7 @@ class Store extends Controller */ public function platformList(): Json { - //$list = Channel::where('status', 1)->whereIn('code',['jd','sn','zy'])->select(); + //$list = Channel::withoutGlobalScope()->where('status', 1)->whereIn('code',['jd','sn','zy','xqtx'])->select(); $list = Channel::withoutGlobalScope()->where('status', 1)->whereIn('code',['zy'])->select(); $platformList = []; foreach ($list as $key => $value) {