Browse Source

图库上传

shish 6 năm trước cách đây
mục cha
commit
ab9117e26c
1 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 2 5
      app/shop/controllers/PicController.php

+ 2 - 5
app/shop/controllers/PicController.php

@@ -54,7 +54,7 @@ class PicController extends BaseController
 		$categoryIdList = isset($post['categoryIdList']) && !empty($post['categoryIdList']) ? $post['categoryIdList'] : [];
 		unset($post['categoryIdList']);
 		if (empty($categoryIdList)) {
-			util::fail('最少选择一个分类');
+			util::fail('请选择分类');
 		}
 		$merchantHas = CategoryService::getCategoryIdList($this->merchantId);
 		$diff = array_diff($categoryIdList, $merchantHas);
@@ -71,9 +71,6 @@ class PicController extends BaseController
 			}
 			$currentId = $picVal['id'];
 			PicService::updateById($currentId, $post);
-			echo $currentId;
-			print_r($post);
-			die;
 			foreach ($categoryIdList as $categoryId) {
 				$add[] = ['categoryId' => $categoryId, 'picId' => $currentId, 'merchantId' => $this->merchantId];
 			}
@@ -82,7 +79,7 @@ class PicController extends BaseController
 		PicCategoryService::batchAdd($add);
 		util::complete('备注成功');
 	}
-	
+
 	//查看图片详情 shish 2019.12.8
 	public function actionDetail()
 	{