Commit 3bd02ed5 by kaisa

feat:更新火箭升空兑换露水频繁点击弹出问题

parent 0a69bc91
Showing with 6 additions and 0 deletions
......@@ -907,6 +907,7 @@
})
}
var lastExchangeTime = 0;
function bet(gid, type) {
$.ajax({
url: $ip + '/rocketlaunch/playGame',
......@@ -923,6 +924,10 @@
if (sessionStorage.lang == 2 || sessionStorage.lang == 0) layer.msg("露水不足")
else layer.msg("no DEWs")
setTimeout(function () {
var currentTime = new Date().getTime();
// 新增防抖 避免用户频繁操作导致兑换露水页面重复弹出
if (currentTime - lastExchangeTime > 3000) {
lastExchangeTime = currentTime;
var obj = {
"cid": 12,
"reqCode": new Date().getTime(),
......@@ -933,6 +938,7 @@
}
var obj2 = JSON.stringify(obj);
appCollaboration(obj2);
}
}, 1000);
}
else if (data.code != 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment