dataLists(new ProductLists()); } /** * 批发商品列表 */ public function wholesale_lists() { if ($this->userId) { $label_id = User::where('id', $this->userId)->value('label_id'); if ($label_id != 99) { return $this->fail('您没有权限访问该列表'); } } else { return $this->fail('请登陆后访问'); } return $this->dataLists(new ProductWholesaleLists()); } /** * 商品列表 */ public function mer_list() { $this->request->__set('store_id', $this->request->userInfo['store_id'] ?? 0); return $this->dataLists(new ProductLists()); } /** * 商品列表 */ public function store_lists() { $store_id = SystemStoreStaff::where('uid', $this->userId)->where('is_admin', 1)->value('store_id'); if ($store_id > 0) { $this->request->__set('store_id', $store_id); return $this->dataLists(new StoreProductLists()); } else { return $this->data(['lists' => []]); } } }