diff --git a/vendor/antgoods/goods/src/controllers/GoodsController.php b/vendor/antgoods/goods/src/controllers/GoodsController.php index eaca006..f405a98 100644 --- a/vendor/antgoods/goods/src/controllers/GoodsController.php +++ b/vendor/antgoods/goods/src/controllers/GoodsController.php @@ -82,7 +82,7 @@ class GoodsController extends Controller { $model = new Goods(); - if ($model->load(Yii::$app->request->post())) { + if ($model->load(Yii::$app->request->post()) && $model->validate()) { //商品封面图和商品详情图上传保存处理 $cover_image_id_str = $model->coverImageId; @@ -121,7 +121,7 @@ class GoodsController extends Controller $cover_image_old_id_arr = $model->image; $detail_image_old_id_arr = $model->detailImageId; - if ($model->load(Yii::$app->request->post())) { + if ($model->load(Yii::$app->request->post()) && $model->validate()) { //商品封面图和商品详情图上传保存处理 $cover_image_id_str = $model->coverImageId; diff --git a/vendor/antgoods/goods/src/views/goods/create.php b/vendor/antgoods/goods/src/views/goods/create.php index 4e98c8d..6736a1b 100644 --- a/vendor/antgoods/goods/src/views/goods/create.php +++ b/vendor/antgoods/goods/src/views/goods/create.php @@ -13,29 +13,13 @@ $this->params['breadcrumbs'][] = $this->title; Yii::$app->params['bsVersion'] = '4.x'; ?>