|
@@ -30,12 +30,8 @@ class CmsContentTemplateSetRepository {
|
|
if (count($rules)>10) {
|
|
if (count($rules)>10) {
|
|
throw new HttpException(500, '最多只能添加10个banner海报');
|
|
throw new HttpException(500, '最多只能添加10个banner海报');
|
|
}
|
|
}
|
|
-// $decode_floor = json_decode($request['rule'], true);
|
|
|
|
- $count = count($rules);
|
|
|
|
- if ($count > 0) {
|
|
|
|
- for ($i = 0; $i < $count; $i++) {
|
|
|
|
$subject = [
|
|
$subject = [
|
|
- 'rule' => json_encode($rules[$i]),
|
|
|
|
|
|
+ 'rule' => json_encode($rules),
|
|
'tpl_id' => $request['tpl_id'],
|
|
'tpl_id' => $request['tpl_id'],
|
|
'area_type' => $request['area_type'],
|
|
'area_type' => $request['area_type'],
|
|
'status' => 0,
|
|
'status' => 0,
|
|
@@ -50,9 +46,6 @@ class CmsContentTemplateSetRepository {
|
|
throw new HttpException(500, '添加失败');
|
|
throw new HttpException(500, '添加失败');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}else{
|
|
}else{
|
|
throw new HttpException(500, '参数格式有误');
|
|
throw new HttpException(500, '参数格式有误');
|
|
}
|
|
}
|