正在显示
1 个修改的文件
包含
2 行增加
和
1 行删除
@@ -27,7 +27,7 @@ class Rule extends Backend | @@ -27,7 +27,7 @@ class Rule extends Backend | ||
27 | parent::_initialize(); | 27 | parent::_initialize(); |
28 | $this->model = model('AuthRule'); | 28 | $this->model = model('AuthRule'); |
29 | // 必须将结果集转换为数组 | 29 | // 必须将结果集转换为数组 |
30 | - $ruleList = collection($this->model->order('weigh', 'desc')->select())->toArray(); | 30 | + $ruleList = collection($this->model->order('weigh', 'desc')->order('id', 'asc')->select())->toArray(); |
31 | foreach ($ruleList as $k => &$v) | 31 | foreach ($ruleList as $k => &$v) |
32 | { | 32 | { |
33 | $v['title'] = __($v['title']); | 33 | $v['title'] = __($v['title']); |
@@ -43,6 +43,7 @@ class Rule extends Backend | @@ -43,6 +43,7 @@ class Rule extends Backend | ||
43 | continue; | 43 | continue; |
44 | $ruledata[$v['id']] = $v['title']; | 44 | $ruledata[$v['id']] = $v['title']; |
45 | } | 45 | } |
46 | + unset($v); | ||
46 | $this->view->assign('ruledata', $ruledata); | 47 | $this->view->assign('ruledata', $ruledata); |
47 | } | 48 | } |
48 | 49 |
-
请 注册 或 登录 后发表评论