正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
@@ -58,10 +58,11 @@ class SchoolController extends AdminBaseController{ | @@ -58,10 +58,11 @@ class SchoolController extends AdminBaseController{ | ||
58 | $this -> assign('data',$data); | 58 | $this -> assign('data',$data); |
59 | $this -> assign('grade_class_str',$grade_class_str); | 59 | $this -> assign('grade_class_str',$grade_class_str); |
60 | $this -> assign('grade_id_str',$grade_id_str); | 60 | $this -> assign('grade_id_str',$grade_id_str); |
61 | + $area = explode(' ',$data['region']); | ||
61 | $province = Db::name('area')->where(['level'=>1])->select(); | 62 | $province = Db::name('area')->where(['level'=>1])->select(); |
62 | - $data_city = Db::name('area')->where(['level'=>2,'name'=>$data['work_city']])->find(); | 63 | + $data_city = Db::name('area')->where(['level'=>2,'name'=>$area[1]])->find(); |
63 | $city = Db::name('area')->where(['pid'=>$data_city['pid'],'level'=>2])->select(); | 64 | $city = Db::name('area')->where(['pid'=>$data_city['pid'],'level'=>2])->select(); |
64 | - $data_county = Db::name('area')->where(['level'=>3,'name'=>$data['work_county']])->find(); | 65 | + $data_county = Db::name('area')->where(['level'=>3,'name'=>$area[2]])->find(); |
65 | $county = Db::name('area')->where(['level'=>3,'pid'=>$data_county['pid']])->select(); | 66 | $county = Db::name('area')->where(['level'=>3,'pid'=>$data_county['pid']])->select(); |
66 | $this->assign('province',$province); | 67 | $this->assign('province',$province); |
67 | $this->assign('city',$city); | 68 | $this->assign('city',$city); |
-
请 注册 或 登录 后发表评论