Browse Source

撤销模板占位

durong 5 years ago
parent
commit
a1be6f8ad9
1 changed files with 0 additions and 12 deletions
  1. 0 12
      app/Repositories/CmsContentTemplateSetRepository.php

+ 0 - 12
app/Repositories/CmsContentTemplateSetRepository.php

@@ -581,17 +581,10 @@ class CmsContentTemplateSetRepository
             $new_rule[$k]['rule']['rule'] = json_decode($v['rule'], true);
 //            }
         }
-        if (count($new_rule) > 0) {
             foreach ($new_rule as $k => $v) {
                 $group_array['content'][$k + 1]['area_type'] = $new_rule[$k]['area_type'];
                 $group_array['content'][$k + 1]['rule'] = array($new_rule[$k]['rule']);
             }
-        } else {
-            $group_array['content'][1]['area_type'] = 4;
-            $group_array['content'][1]['rule'] = [];
-            $group_array['content'][2]['area_type'] = 5;
-            $group_array['content'][2]['rule'] = [];
-        }
 
         $floor_rule = $this->cmsContentTemplateSet->select('id', 'rule', 'floor_img')->where(['tpl_id' => $request['tpl_id'], 'area_type' => 2])->get();
         $new_rule = [];
@@ -615,13 +608,8 @@ class CmsContentTemplateSetRepository
                 unset($v['link_type']);
             }
         }
-        if ($count != 0) {
             $group_array['content'][$count + 1]['area_type'] = 2;
             $group_array['content'][$count + 1]['rule'] = $new_rule;
-        } else {
-            $group_array['content'][3]['area_type'] = 2;
-            $group_array['content'][3]['rule'] = $new_rule;
-        }
 
         return $group_array;
     }