礼包提示

master
zhanglingsheng 5 years ago
parent 4157fb10b7
commit 9c690a3dbc

@ -143,7 +143,7 @@ class GameGiftPageController extends Controller{
public function receive_gift($user_token = 0,$gift_id = 0,$game_id = 0,$game_name = ""){
#获取SDK上POST方式传过来的数据 然后base64解密 然后将json字符串转化成数组
$post = I('post.');
$post = I('request.');
$user_id = $this->userId;
$gift_id = $post['gift_id'];
$game_id = $post['game_id'];
@ -178,7 +178,7 @@ class GameGiftPageController extends Controller{
$gift->where("id=".$gift_id)->save($act);
$ddd['novice'] = $data_record['novice'];
echo json_encode([
'code' => 0,
'code' => 1,
'status' => 1,
'msg' => '领取成功'
]);

@ -76,11 +76,10 @@
success: function (r) {
if (r.code == 200) {
window.location.href = r.url;
} else {
if (r == "领取成功") {
} else if(r.code == 1){
window.location.href = "{:U('details',['user_token' => $user_token,'gift_id' => $gift_id,'game_id' => $game_id,'game_name' => $game_name])}";
}
// alert(r.msg);
}else {
alert(r.msg);
}
}

Loading…
Cancel
Save