diff --git a/Application/Sdk/View/default/GameGiftPage/receive.html b/Application/Sdk/View/default/GameGiftPage/receive.html index 715cc71f..104f0208 100644 --- a/Application/Sdk/View/default/GameGiftPage/receive.html +++ b/Application/Sdk/View/default/GameGiftPage/receive.html @@ -63,12 +63,36 @@ arr.game_name = "{$game_name}"; $('.actbtn').on("click",function(){ - $.post("{:U('receive_gift')}",{ + $.ajax({ + type: "GET", + dataType: "json", + url: "{:U('receive_gift')}", + data: { + user_token : "{$user_token}", + gift_id : "{$gift_id}", + game_id : "{$game_id}", + game_name : "{$game_name}", + }, + success: function (r) { + if (r.code == 200) { + window.location.href = r.url; + } else { + if (r == "领取成功") { + window.location.href = "{:U('details',['user_token' => $user_token,'gift_id' => $gift_id,'game_id' => $game_id,'game_name' => $game_name])}"; + } + // alert(r.msg); + } + } + + }); + + /* $.post("{:U('receive_gift')}",{ user_token : "{$user_token}", gift_id : "{$gift_id}", game_id : "{$game_id}", game_name : "{$game_name}", },function(data,status){ + if(data == '领取成功') { window.location.href = "{:U('details',['user_token' => $user_token,'gift_id' => $gift_id,'game_id' => $game_id,'game_name' => $game_name])}"; @@ -78,7 +102,7 @@ $("#iosDialog").show(); // window.location.href = "{:U('details',['user_token' => $user_token,'gift_id' => $gift_id,'game_id' => $game_id,'game_name' => $game_name])}"; } - }); + }); */ }) $("#hidedialog").on("click",function(){ $("#iosDialog").hide();