|
@ -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'); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|