From 00e419da985acb8da81139ef47b5ad360b4cf3fa Mon Sep 17 00:00:00 2001 From: liangyuyan <1103300295@qq.com> Date: Wed, 16 Sep 2020 16:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=97=E5=95=86=E5=93=81-=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=97=B6=E5=95=86=E5=93=81=E6=A0=B9=E6=8D=AE=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E5=B8=82=E5=9C=BA=E6=B7=BB=E5=8A=A0=E5=B8=82?= =?UTF-8?q?=E5=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Controllers/v3/GoodsNewController.php | 11 +++++++---- app/Console/Commands/SetUserBalanceType.php | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/Admin/Controllers/v3/GoodsNewController.php b/app/Admin/Controllers/v3/GoodsNewController.php index 8eb48c1..ce6f1ea 100644 --- a/app/Admin/Controllers/v3/GoodsNewController.php +++ b/app/Admin/Controllers/v3/GoodsNewController.php @@ -196,7 +196,7 @@ class GoodsNewController extends AdminController // $marketList = MarketModel::getMarketArray(); $form->column(6, function (Form $form) use($storeList,$categoryList,$goodsCategoryList ){ - // $form->hidden('market_id')->default(0); + $form->hidden('market_id')->default(0); $form->select('category_id')->required()->options($categoryList)->load('goods_category_id', '/api/goods_category_list'); $form->select('goods_category_id'); $form->select('store_id')->required()->options($storeList); @@ -257,10 +257,13 @@ class GoodsNewController extends AdminController $spec = $form->input('spec'); $detailsImgs = $form->input('details_imgs'); $goodsCategoryId = $form->input('goods_category_id'); - // 商品所属市场,根据店铺查询市场 - // $info = StoreModel::getStoreInfo($storeId,'market_id'); - // $form->market_id = $info->market_id; + if($form->isCreating() && !empty($storeId)){ + // 商品所属市场,根据店铺查询市场 + $info = StoreModel::getStoreInfo($storeId,'market_id'); + $form->market_id = $info->market_id; + } + $tags = $form->input('tags'); if(!empty($tags)){ $tagsArr = []; diff --git a/app/Console/Commands/SetUserBalanceType.php b/app/Console/Commands/SetUserBalanceType.php index 0c13e32..5e06a47 100644 --- a/app/Console/Commands/SetUserBalanceType.php +++ b/app/Console/Commands/SetUserBalanceType.php @@ -19,7 +19,7 @@ class SetUserBalanceType extends Command * * @var string */ - protected $description = 'Command 清洗用户余额表type字段值,type为3洗为4'; + protected $description = 'Command 清洗用户余额用户类型字段值,user_type为3洗为4'; /** * Create a new command instance.