Browse Source

因修改保存商品方法返回结果修改,修改结果判断方法

antshop
linyaostalker 5 years ago
parent
commit
71e31f0eb8
  1. 4
      backend/modules/goods/controllers/GoodsController.php

4
backend/modules/goods/controllers/GoodsController.php

@ -104,7 +104,7 @@ class GoodsController extends Controller
if ($model->load(Yii::$app->request->post()) && $model->validate()) { if ($model->load(Yii::$app->request->post()) && $model->validate()) {
//商品封面图和商品详情图上传保存处理 //商品封面图和商品详情图上传保存处理
$res = GoodsManager::updateGoods(Yii::$app->request->post(), $model); $res = GoodsManager::updateGoods(Yii::$app->request->post(), $model);
if ($res['status']) {
if ($res) {
return $this->redirect('index'); return $this->redirect('index');
} }
} else { } else {
@ -133,7 +133,7 @@ class GoodsController extends Controller
if ($model->load(Yii::$app->request->post()) && $model->validate()) { if ($model->load(Yii::$app->request->post()) && $model->validate()) {
//商品封面图和商品详情图上传保存处理 //商品封面图和商品详情图上传保存处理
$res = GoodsManager::updateGoods(Yii::$app->request->post(), $model, $cover_image_old_id_str, $detail_image_old_id_str); $res = GoodsManager::updateGoods(Yii::$app->request->post(), $model, $cover_image_old_id_str, $detail_image_old_id_str);
if ($res['status']) {
if ($res) {
return $this->redirect('index'); return $this->redirect('index');
} }
} }

Loading…
Cancel
Save