|
|
@ -1525,7 +1525,24 @@ class UserController extends BaseController
|
|
|
|
C(api('Config/lists'));
|
|
|
|
C(api('Config/lists'));
|
|
|
|
$user = json_decode(base64_decode(file_get_contents("php://input")), true);
|
|
|
|
$user = json_decode(base64_decode(file_get_contents("php://input")), true);
|
|
|
|
$model = M("user", "tab_");
|
|
|
|
$model = M("user", "tab_");
|
|
|
|
$data = array();
|
|
|
|
$data = array(); //type为0需要验证user_token
|
|
|
|
|
|
|
|
if($user['type'] == 0) {
|
|
|
|
|
|
|
|
if ($user['api_ver'] == 2) {
|
|
|
|
|
|
|
|
$userToken = M('user_token', 'tab_')->where([
|
|
|
|
|
|
|
|
'user_id' => $user['user_id'],
|
|
|
|
|
|
|
|
'game_id' => $user['game_id']
|
|
|
|
|
|
|
|
])->getField('user_token');
|
|
|
|
|
|
|
|
if (!$userToken || $userToken != $user['user_token']) {
|
|
|
|
|
|
|
|
echo base64_encode (json_encode(array(
|
|
|
|
|
|
|
|
"code" => 9999,
|
|
|
|
|
|
|
|
"msg" => "您已下线,请重新登入",
|
|
|
|
|
|
|
|
"data" => ""
|
|
|
|
|
|
|
|
)));
|
|
|
|
|
|
|
|
exit ();
|
|
|
|
|
|
|
|
// 退出
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
switch ($user['type']) {
|
|
|
|
switch ($user['type']) {
|
|
|
|
|
|
|
|
|
|
|
|
case 0:
|
|
|
|
case 0:
|
|
|
|