diff --git a/app/Service/Admin/Good/SpuService.php b/app/Service/Admin/Good/SpuService.php index 593f222..d6dd67f 100644 --- a/app/Service/Admin/Good/SpuService.php +++ b/app/Service/Admin/Good/SpuService.php @@ -30,7 +30,7 @@ class SpuService extends BaseService { use GetUserInfoTrait,OssTrait; - private $userInfo; +// private $userInfo; private int $cityId; @@ -46,13 +46,13 @@ class SpuService extends BaseService #[Inject] protected Sku $skuModel; - public function __construct() - { - parent::__construct(); - - $this->userInfo = $this->getUserInfo($this->adminId); - $this->cityId = (int)$this->userInfo['city_id']; - } +// public function __construct() +// { +// parent::__construct(); +// +//// $this->userInfo = $this->getUserInfo($this->adminId); +//// $this->cityId = (int)$this->userInfo['city_id']; +// } /** * @return array @@ -181,6 +181,7 @@ class SpuService extends BaseService { $kitchenId = $this->request->input('kitchen_id'); $kitchenInfo = $this->kitchenModel->getInfoById($kitchenId); + $this->cityId = $kitchenInfo->city_id; if ($kitchenInfo->status == SiteCode::KITCHEN_DISABLE) throw new ErrException('该厨房已禁用');