Browse Source

修复封面图未修改时清零问题

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
a8a78b5ad3
  1. 2
      vendor/antgoods/goods/src/controllers/GoodsController.php

2
vendor/antgoods/goods/src/controllers/GoodsController.php

@ -123,7 +123,7 @@ class GoodsController extends Controller
$goods_manager = new GoodsManager();
$save_cover_image_res = $goods_manager->saveFile(explode(',', $cover_image_id_str), $model, explode(',', $cover_image_old_id_arr));
$save_detail_image_res = $goods_manager->saveFile(explode(',', $detail_image_id_str), $model, explode(',', $detail_image_old_id_arr), File::OWN_TYPE_GOODS_DETAILS);
if($save_cover_image_res['status'] && $save_detail_image_res['status']){
if($save_cover_image_res['status'] && $save_detail_image_res['status'] && $save_cover_image_res['first_file_id'] != 0){
$model->image = $save_cover_image_res['first_file_id'];
$model->save();
}

Loading…
Cancel
Save