正在显示
1 个修改的文件
包含
17 行增加
和
17 行删除
@@ -116,25 +116,25 @@ class LoginController extends HomeBaseController | @@ -116,25 +116,25 @@ class LoginController extends HomeBaseController | ||
116 | */ | 116 | */ |
117 | public function chooseAge() { | 117 | public function chooseAge() { |
118 | if (cmf_is_user_login()) { | 118 | if (cmf_is_user_login()) { |
119 | - if(!session('baby_age')) { | ||
120 | - $baby_model = new BabyModel(); | ||
121 | - $where = [ | ||
122 | - 'delete_time' => 0 | 119 | +// if(!session('baby_age')) { |
120 | + $baby_model = new BabyModel(); | ||
121 | + $where = [ | ||
122 | + 'delete_time' => 0 | ||
123 | + ]; | ||
124 | + $list = []; | ||
125 | + $babyList = $baby_model->where($where)->select(); | ||
126 | + foreach ($babyList as $kg=>$vg) { | ||
127 | + $info = [ | ||
128 | + 'label' => $vg['age'], | ||
129 | + 'value' => $vg['id'] | ||
123 | ]; | 130 | ]; |
124 | - $list = []; | ||
125 | - $babyList = $baby_model->where($where)->select(); | ||
126 | - foreach ($babyList as $kg=>$vg) { | ||
127 | - $info = [ | ||
128 | - 'label' => $vg['age'], | ||
129 | - 'value' => $vg['id'] | ||
130 | - ]; | ||
131 | - $list[] = $info; | ||
132 | - } | ||
133 | - $this->assign('babyList',json_encode($list)); | ||
134 | - return $this->fetch(':choose'); | ||
135 | - } else { | ||
136 | - return redirect($this->request->root() . '/'); | 131 | + $list[] = $info; |
137 | } | 132 | } |
133 | + $this->assign('babyList',json_encode($list)); | ||
134 | + return $this->fetch(':choose'); | ||
135 | +// } else { | ||
136 | +// return redirect($this->request->root() . '/'); | ||
137 | +// } | ||
138 | } else { | 138 | } else { |
139 | return redirect($this->request->root() . '/'); | 139 | return redirect($this->request->root() . '/'); |
140 | } | 140 | } |
-
请 注册 或 登录 后发表评论