From 89b67c06a41e5760d2b251e1664f566f744452dc Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 21 Nov 2019 18:23:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95sdk=EF=BC=8C=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E8=87=B3=E8=B4=AD=E4=B9=B0=E8=B6=85=E7=BA=A7=E7=AD=BE?= =?UTF-8?q?=EF=BC=8C=E6=97=A0=E9=9C=80=E9=87=8D=E6=96=B0=E7=99=BB=E9=99=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mobile/Controller/SsgController.class.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Application/Mobile/Controller/SsgController.class.php b/Application/Mobile/Controller/SsgController.class.php index 3691248f5..eb734bd4f 100644 --- a/Application/Mobile/Controller/SsgController.class.php +++ b/Application/Mobile/Controller/SsgController.class.php @@ -49,11 +49,19 @@ class SsgController extends BaseController { public function home(){ - if (I('user_token')) { + if (I('user_token')&&I('user_id')&&I('game_id')) { $userToker = I('user_token'); - $where['user_token'] = $userToker; - $isToken = M('user','tab_')->field('id as user_id,account,nickname')->where($where)->find(); + $user_id = I('user_id'); + $game_id = I('game_id'); + $where['tab_user_token.user_token'] = $userToker; + $where['tab_user_token.user_id'] = $user_id; + $where['tab_user_token.game_id'] = $game_id; + + $isToken = M('user_token','tab_')->field('user.id as user_id,user.account as account,user.nickname as nickname') + ->join("left join tab_user as user on user.id = tab_user_token.user_id") + ->where($where) + ->find(); if ($isToken) { session("user_auth",$isToken); @@ -62,6 +70,8 @@ class SsgController extends BaseController { $this->redirect("Ssg/login"); } + } else { + $this->redirect("Ssg/login"); } //获取客服qq