|
|
@ -85,8 +85,7 @@ class CategoryController extends Controller |
|
|
|
//类目图片上传保存处理
|
|
|
|
$icon_image_id_str = $model->iconImageId; |
|
|
|
$model->save(); |
|
|
|
$goods_manager = new GoodsManager(); |
|
|
|
$save_icon_image_res = $goods_manager->saveFile(explode(',', $icon_image_id_str), $model, [], File::OWN_TYPE_CATEGORY_ICON); |
|
|
|
$save_icon_image_res = GoodsManager::saveFile(explode(',', $icon_image_id_str), $model, [], File::OWN_TYPE_CATEGORY_ICON); |
|
|
|
if($save_icon_image_res['status']){ |
|
|
|
$model->icon = $save_icon_image_res['first_file_id']; |
|
|
|
$model->save(); |
|
|
@ -119,8 +118,7 @@ class CategoryController extends Controller |
|
|
|
//类目图片上传保存处理
|
|
|
|
$icon_image_id_str = $model->iconImageId; |
|
|
|
$model->save(); |
|
|
|
$goods_manager = new GoodsManager(); |
|
|
|
$save_icon_image_res = $goods_manager->saveFile(explode(',', $icon_image_id_str), $model, explode(',', $icon_image_old_id_arr), File::OWN_TYPE_CATEGORY_ICON); |
|
|
|
$save_icon_image_res = GoodsManager::saveFile(explode(',', $icon_image_id_str), $model, explode(',', $icon_image_old_id_arr), File::OWN_TYPE_CATEGORY_ICON); |
|
|
|
if($save_icon_image_res['status'] && $save_icon_image_res['first_file_id'] !== 0){ |
|
|
|
$model->icon = $save_icon_image_res['first_file_id']; |
|
|
|
$model->save(); |
|
|
|