diff --git a/application/service/RegionService.php b/application/service/RegionService.php index 684d3c9f470d14ef1757170f9a3bda5bd3163c54..0259bdd42953c83fbd64525076595a70b044a153 100755 --- a/application/service/RegionService.php +++ b/application/service/RegionService.php @@ -65,7 +65,7 @@ class RegionService $where = empty($params['where']) ? [] : $params['where']; $where['is_enable'] = 1; - return Db::name('Region')->where($where)->field($field)->order('id asc, sort asc')->select(); + return Db::name('Region')->where($where)->field($field)->order('sort asc,id asc')->select(); } /** @@ -83,7 +83,7 @@ class RegionService // 获取数据 $field = 'id,pid,name,sort,is_enable'; - $data = Db::name('Region')->field($field)->where(['pid'=>$id])->order('sort asc')->select(); + $data = Db::name('Region')->field($field)->where(['pid'=>$id])->order('sort asc,id asc')->select(); if(!empty($data)) { foreach($data as &$v)