|
|
|
@ -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
|
|
|
|
|