Merge branch 'dev' of 47.111.118.107:/srv/git/sdk into dev

master
zhanglingsheng 5 years ago
commit c005c8ed52

@ -1098,7 +1098,7 @@ class UserModel extends Model{
$data["last_device_number"] = $user['device_number'];
$data["token"] = $this->generateToken($uid,$account,$password);
$userToken = $this->generateToken($uid,$account,$password);
$userToken = $this->generateToken($uid,$account,$password).uniqid().rand(1000, 9999);
$relationGameId = M('game', 'tab_')->where([
'id' => $game_id
])->getField('relation_game_id');
@ -1117,8 +1117,18 @@ class UserModel extends Model{
'create_time' => time(),
'update_time' => time()
]);
M('user_token', 'tab_')->where([
'user_id' => $uid,
'relation_game_id' => $relationGameId
])->save([
'user_token' => $userToken,
'login_cnt' => $userTokens['login_cnt'] + 1,
'update_time' => time()
]);
} else {
M('user_token', 'tab_')->where([
'user_id' => $uid,
'game_id|relation_game_id' => $relationGameId
])->save([
'user_token' => $userToken,

@ -11,7 +11,7 @@ class GameGiftPageController extends Controller{
{
// if (I("request.api_ver") == 2) {
$user = BaseController::webH5Vetify();
$this->userid = $user['userId'];
$this->userId = $user['userId'];
$this->userToken = $user['userToken'];
// }
}
@ -149,6 +149,7 @@ class GameGiftPageController extends Controller{
$game_id = $post['game_id'];
$game_name = $post['game_name'];
$gift = M('giftbag','tab_');
$user_token = $this->userToken;
$novice = $gift->where(["id" => $gift_id])->field("id,giftbag_name,novice")->find();
if(empty($novice['novice'])){
echo "该礼包已被领完";die();

Loading…
Cancel
Save