From 1a0b7e8196c1630f340e06f0776b59fc53482916 Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Thu, 21 Nov 2019 16:47:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=A6=E5=8F=B7=E4=BA=92T?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/Controller/GameController.class.php | 2 +- .../Sdk/Controller/PageBaseController.php | 24 ------------------- .../Sdk/Controller/UserHController.class.php | 2 +- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 Application/Sdk/Controller/PageBaseController.php diff --git a/Application/Sdk/Controller/GameController.class.php b/Application/Sdk/Controller/GameController.class.php index 29e2915b..cc3da6af 100644 --- a/Application/Sdk/Controller/GameController.class.php +++ b/Application/Sdk/Controller/GameController.class.php @@ -158,7 +158,7 @@ class GameController extends BaseController{ re_msg(1004, 'fail', '用户不存在'); } - $user = M('user','tab_')->field('user_token,balance')->where(['id' => $data['user_id']])->find(); + $user = M('user','tab_')->field('balance')->where(['id' => $data['user_id']])->find(); $user['user_token'] = $data['user_token']; if (!$user['user_token']) { re_msg(1004, 'fail', '数据有误'); diff --git a/Application/Sdk/Controller/PageBaseController.php b/Application/Sdk/Controller/PageBaseController.php deleted file mode 100644 index 21d2e4fd..00000000 --- a/Application/Sdk/Controller/PageBaseController.php +++ /dev/null @@ -1,24 +0,0 @@ -userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id"); - $this->userToken = $userToken; - if (!$this->userId) { - re_msg(12, $userToken."Token失效"); - } - } -} diff --git a/Application/Sdk/Controller/UserHController.class.php b/Application/Sdk/Controller/UserHController.class.php index 8239a029..f2f0847a 100644 --- a/Application/Sdk/Controller/UserHController.class.php +++ b/Application/Sdk/Controller/UserHController.class.php @@ -62,7 +62,7 @@ class UserHController extends Controller { $u = M('user', 'tab_')->where(['id' => $this->userId])->find(); $this->assign("account", $u['account']); - $this->assign("user_token", $u['user_token']); + $this->assign("user_token", $this->userToken); $this->assign('game_id', I('game_id', 0)); $this->display(); }