正在显示
2 个修改的文件
包含
18 行增加
和
3 行删除
@@ -110,12 +110,12 @@ class IndexController extends HomeBaseController | @@ -110,12 +110,12 @@ class IndexController extends HomeBaseController | ||
110 | ->find(); | 110 | ->find(); |
111 | if ($re) { | 111 | if ($re) { |
112 | $dataup['id'] = $re['id']; | 112 | $dataup['id'] = $re['id']; |
113 | - session('user.id', $dataup['id']); | 113 | +// session('user.id', $dataup['id']); |
114 | $res = Db::name('user')->update($dataup); | 114 | $res = Db::name('user')->update($dataup); |
115 | if ($res) { | 115 | if ($res) { |
116 | return json(['code' => '1', 'msg' => '保存成功']); | 116 | return json(['code' => '1', 'msg' => '保存成功']); |
117 | } else { | 117 | } else { |
118 | - return json(['code' => '0', 'msg' => '保存失败']); | 118 | + return json(['code' => '1', 'msg' => '报名信息更新成功']); |
119 | } | 119 | } |
120 | } else { | 120 | } else { |
121 | return json(['code' => '0', 'msg' => '保存失败']); | 121 | return json(['code' => '0', 'msg' => '保存失败']); |
@@ -160,6 +160,13 @@ class IndexController extends HomeBaseController | @@ -160,6 +160,13 @@ class IndexController extends HomeBaseController | ||
160 | } | 160 | } |
161 | } | 161 | } |
162 | 162 | ||
163 | + //支付成功 ajax | ||
164 | + public function pay_success() | ||
165 | + { | ||
166 | + | ||
167 | + return $this->fetch(); | ||
168 | + } | ||
169 | + | ||
163 | 170 | ||
164 | //学员手册 | 171 | //学员手册 |
165 | public function student_shouce() | 172 | public function student_shouce() |
@@ -25,10 +25,18 @@ class LoginController extends HomeBaseController | @@ -25,10 +25,18 @@ class LoginController extends HomeBaseController | ||
25 | { | 25 | { |
26 | //session('user.id','10'); | 26 | //session('user.id','10'); |
27 | $ress = Db::name('user')->where(['openid'=>session('openid')])->find(); | 27 | $ress = Db::name('user')->where(['openid'=>session('openid')])->find(); |
28 | - if($ress && $ress['mobile'] != ''){ | 28 | + if($ress && $ress['mobile'] != '' ){ |
29 | + if($ress['user_type'] == '2'){ | ||
30 | + if($ress['student_type'] == '1'){ | ||
29 | session('user.id',$ress['id']); | 31 | session('user.id',$ress['id']); |
30 | return redirect($this->request->root() . '/user/profile/percenter'); | 32 | return redirect($this->request->root() . '/user/profile/percenter'); |
31 | } | 33 | } |
34 | + }else{ | ||
35 | + session('user.id',$ress['id']); | ||
36 | + return redirect($this->request->root() . '/user/profile/percenter'); | ||
37 | + } | ||
38 | + | ||
39 | + } | ||
32 | 40 | ||
33 | $redirect = $this->request->post("redirect"); | 41 | $redirect = $this->request->post("redirect"); |
34 | if (empty($redirect)) { | 42 | if (empty($redirect)) { |
-
请 注册 或 登录 后发表评论