|
|
@@ -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()
|
|
|
{
|