Browse Source

返回sort

durong 5 years ago
parent
commit
2f832ce373
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Repositories/CmsContentTemplateSetRepository.php

+ 2 - 1
app/Repositories/CmsContentTemplateSetRepository.php

@@ -577,6 +577,7 @@ class CmsContentTemplateSetRepository
             $new_rule[$k]['area_type'] = $v['area_type'];
             $new_rule[$k]['rule']['id'] = $v['id'];
 //            $new_rule[$k]['rule']['name'] = $v['name'];
+            $new_rule[$k]['rule']['sort'] = $v['sort'];
             $new_rule[$k]['rule']['floor_img'] = $v['floor_img'];
             $new_rule[$k]['rule']['rule'] = json_decode($v['rule'], true);
 //            }
@@ -586,7 +587,7 @@ class CmsContentTemplateSetRepository
                 $group_array['content'][$k + 1]['rule'] = array($new_rule[$k]['rule']);
             }
 
-        $floor_rule = $this->cmsContentTemplateSet->select('id', 'rule', 'floor_img')->where(['tpl_id' => $request['tpl_id'], 'area_type' => 2])->get();
+        $floor_rule = $this->cmsContentTemplateSet->select('id', 'rule', 'floor_img')->where(['tpl_id' => $request['tpl_id'], 'area_type' => 2])->orderBy('id', 'asc')->get();
         $new_rule = [];
         foreach ($floor_rule->toArray() as $k => $v) {
             $new_rule[$k]['id'] = $v['id'];