lqmac 7 months ago
parent c74b2702d1
commit 5da101d796
  1. 4
      app/admin/controller/Controller.php
  2. 2
      app/store/controller/Goods.php
  3. 2
      app/store/controller/Store.php

@ -76,8 +76,8 @@ class Controller extends BaseController
public function getUserPlatform(){ public function getUserPlatform(){
if ($this->admin['user']['role'] == 1) { if ($this->admin['user']['role'] == 1) {
//京东账号可以看到京东和自营的 //京东账号可以看到京东和自营的
if ($this->admin['user']['channel'] == 'jd') { if (strpos($this->admin['user']['channel'], 'jd') !== false) {
$list = Channel::where('status', 1)->whereIn('code',['jd','zy'])->select(); $list = Channel::where('status', 1)->whereIn('code',[$this->admin['user']['channel'],'zy'])->select();
//苏宁账号可以看到苏宁和自营的 //苏宁账号可以看到苏宁和自营的
} elseif($this->admin['user']['channel'] == 'sn'){ } elseif($this->admin['user']['channel'] == 'sn'){
$list = Channel::where('status', 1)->whereIn('code',['sn','zy'])->select(); $list = Channel::where('status', 1)->whereIn('code',['sn','zy'])->select();

@ -35,7 +35,7 @@ class Goods extends Controller
$model = new GoodsModel; $model = new GoodsModel;
$params = $this->request->param(); $params = $this->request->param();
$params['channel'] = 'zy'; $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')); return $this->renderSuccess(compact('list'));
} }

@ -75,7 +75,7 @@ class Store extends Controller
*/ */
public function platformList(): Json 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(); $list = Channel::withoutGlobalScope()->where('status', 1)->whereIn('code',['zy'])->select();
$platformList = []; $platformList = [];
foreach ($list as $key => $value) { foreach ($list as $key => $value) {

Loading…
Cancel
Save