|
|
@@ -290,6 +290,7 @@ class StoreProduct extends AuthController
|
|
|
$data['activity'][$k] = 3;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
$data['description'] = $this->request->post('description', '');
|
|
|
$data['activity'] = implode(',', $data['activity']);
|
|
|
$detail = $data['attrs'];
|
|
|
@@ -316,6 +317,16 @@ class StoreProduct extends AuthController
|
|
|
return Json::fail('一二级返佣相加不能大于商品售价');
|
|
|
}
|
|
|
}
|
|
|
+// 积分商品
|
|
|
+ if ($data['is_points'] == 1){
|
|
|
+ if ($data['min_integral']<=0||$data['max_integral']<=0){
|
|
|
+ return Json::fail('积分商品必须设置健康豆价格');
|
|
|
+ }
|
|
|
+ }elseif($data['is_points'] == 0){
|
|
|
+ if ($data['min_integral']>0||$data['max_integral']>0){
|
|
|
+ return Json::fail('非积分商品不能设置健康豆价格');
|
|
|
+ }
|
|
|
+ }
|
|
|
if ($id) {
|
|
|
unset($data['sales']);
|
|
|
ProductModel::edit($data, $id);
|