diff --git a/app/portal/controller/IndexController.php b/app/portal/controller/IndexController.php index 6ee96a9..8c5bd69 100644 --- a/app/portal/controller/IndexController.php +++ b/app/portal/controller/IndexController.php @@ -42,6 +42,14 @@ class IndexController extends WeChatBaseController $data_id = $this -> request -> param(); //判断跳转链接是否存在数据 存在则绑定关系 if(!empty($data_id)){ + //判断上级权限是否存在 + $my_user = Db::name('my_user') -> where('id',$data_id['my_user_id']) -> find(); + if(empty($my_user)){ + $this->error('查无此人','','',''); + } + if($my_user['status'] != $data_id['status_id']){ + $this->error('该二维码已失效','','',''); + } //判断数据是老师还是业务员 if($data_id['status_id'] == 2){ //业务员分享 更改用户身份为老师 diff --git a/simplewind/cmf/controller/WeChatBaseController.php b/simplewind/cmf/controller/WeChatBaseController.php index 3ce882f..6cf0d0e 100644 --- a/simplewind/cmf/controller/WeChatBaseController.php +++ b/simplewind/cmf/controller/WeChatBaseController.php @@ -204,8 +204,8 @@ class WeChatBaseController extends BaseController */ public function checkWeChatUserLogin() { - /*$user = Db::name('user')->where('id',45)->find(); - cmf_update_current_user($user);*/ +// $user = Db::name('user')->where('id',303)->find(); +// cmf_update_current_user($user); // session('user',null); $userId = cmf_get_current_user_id(); if (empty($userId)) {