Commit 72e8b35f authored by Mac's avatar Mac

修改活动首页失败的情况

parent 38a6dea7
...@@ -335,7 +335,9 @@ ...@@ -335,7 +335,9 @@
$('.click_use p').html('立即登录'); $('.click_use p').html('立即登录');
} }
var that=this
that.loadData()
function loadData(){
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`, url: `${getApiUrl().urlJava}api/appActivity/getUserPurchaseTime`,
...@@ -501,21 +503,16 @@ ...@@ -501,21 +503,16 @@
$('.img_bg_p2').html('有效期截止:' + expirationDate) $('.img_bg_p2').html('有效期截止:' + expirationDate)
} else { } else {
$('.dataStatistics').dataStatistics({ $('.dataStatistics').dataStatistics({
max: 0, max: 0,
min: 0, min: 0,
len: 4, len: 4,
add: true add: true
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
layer.msg(res.message);
setTimeout(loadData,3000) //失败后再次3秒后再次调接口
if (platform == 'app') {
window.postMessage(JSON.stringify({
'action': 'showToast',
'message': '请求人数过多,请返回再次进入!'
}));
} else {
layer.msg('请求人数过多,请返回再次进入!');
}
} }
// clearInterval(xhtime) // clearInterval(xhtime)
}, },
...@@ -527,17 +524,14 @@ ...@@ -527,17 +524,14 @@
len: 4, len: 4,
add: true add: true
}); //刚进入页面不执行动画 }); //刚进入页面不执行动画
if (platform == 'app') { layer.msg(res.message);
window.postMessage(JSON.stringify({ setTimeout(loadData,3000) //失败后再次3秒后再次调接口
'action': 'showToast',
'message': '请求人数过多,请返回再次进入!'
}));
} else {
layer.msg('请求人数过多,请返回再次进入!');
}
} }
}); });
}
......
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 to comment