正在显示
1 个修改的文件
包含
12 行增加
和
6 行删除
@@ -25,13 +25,13 @@ class IndexController extends HomeBaseController | @@ -25,13 +25,13 @@ class IndexController extends HomeBaseController | ||
25 | //step1 在线报名 | 25 | //step1 在线报名 |
26 | public function online_baoming() | 26 | public function online_baoming() |
27 | { | 27 | { |
28 | - $re = Db::name('user')->where(['openid'=>session('openid')])->find(); | 28 | +// $re = Db::name('user')->where(['openid'=>session('openid')])->find(); |
29 | 29 | ||
30 | - if($re && $re['student_type'] == '1'){ | ||
31 | - $this->success('您已成功报名,无需再次报名',url('user/login/index')); | ||
32 | - }elseif ($re['user_type'] == '3'){ | ||
33 | - $this->success('教练无需报名',url('user/login/index')); | ||
34 | - } | 30 | +// if($re && $re['student_type'] == '1'){ |
31 | +// $this->success('您已成功报名,无需再次报名',url('user/login/index')); | ||
32 | +// }elseif ($re['user_type'] == '3'){ | ||
33 | +// $this->success('教练无需报名',url('user/login/index')); | ||
34 | +// } | ||
35 | $res = Db::name('goods')->where(['delete_time' => '0', 'status' => '1'])->select()->toArray(); | 35 | $res = Db::name('goods')->where(['delete_time' => '0', 'status' => '1'])->select()->toArray(); |
36 | $this->assign('data', $res); | 36 | $this->assign('data', $res); |
37 | 37 | ||
@@ -63,6 +63,12 @@ class IndexController extends HomeBaseController | @@ -63,6 +63,12 @@ class IndexController extends HomeBaseController | ||
63 | //step4 提交报名信息ajax | 63 | //step4 提交报名信息ajax |
64 | public function baoming_do() | 64 | public function baoming_do() |
65 | { | 65 | { |
66 | + $re = Db::name('user')->where(['openid'=>session('openid')])->find(); | ||
67 | + if($re && $re['student_type'] == '1'){ | ||
68 | + return json(['code' => '0', 'msg' => '您已成功报名,无需再次报名']); | ||
69 | + }elseif ($re['user_type'] == '3'){ | ||
70 | + return json(['code' => '0', 'msg' => '教练无需报名']); | ||
71 | + } | ||
66 | $rules = [ | 72 | $rules = [ |
67 | 'name' => 'require', | 73 | 'name' => 'require', |
68 | 'sex' => 'require', | 74 | 'sex' => 'require', |
-
请 注册 或 登录 后发表评论