悬浮窗

master
zhanglingsheng 5 years ago
parent 3fba0a4ccb
commit 9b0cef356b

@ -4,6 +4,20 @@ use Think\Controller;
use Common\Api\GaemApi; use Common\Api\GaemApi;
class GameGiftPageController extends Controller{ class GameGiftPageController extends Controller{
public $userId;
public function _initialize()
{
$userToken = I("request.user_token");
if (!$userToken) {
re_msg(11, "参数有误,请重新登入获取!");
}
$this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id");
$this->userToken = $userToken;
if (!$this->userId) {
re_msg(12, $userToken."Token失效");
}
}
public function gift_list(){ public function gift_list(){
$gameId = I('game_id'); $gameId = I('game_id');
$sdkVersion = I('sdk_version', -1); $sdkVersion = I('sdk_version', -1);

@ -0,0 +1,24 @@
<?php
namespace Sdk\Controller;
use Think\Controller;
class PageBaseController extends Controller
{
public $userId;
public function _initialize()
{
$userToken = I("request.user_token");
if (!$userToken) {
re_msg(11, "参数有误,请重新登入获取!");
}
$this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id");
$this->userToken = $userToken;
if (!$this->userId) {
re_msg(12, $userToken."Token失效");
}
}
}

@ -7,6 +7,24 @@ use Think\Log;
class UserHController extends Controller class UserHController extends Controller
{ {
public $userId;
public function _initialize()
{
$userToken = I("request.user_token");
if (!$userToken) {
re_msg(11, "参数有误,请重新登入获取!");
}
$this->userId = M("user", "tab_")->where(['user_token' => $userToken])->getField("id");
$this->userToken = $userToken;
if (!$this->userId) {
re_msg(12, $userToken."Token失效");
}
}
/** /**
* 获取用户平台币充值记录绑币余额 * 获取用户平台币充值记录绑币余额
* @return [type] [description] * @return [type] [description]

Loading…
Cancel
Save