新年活动:点燃烟花按钮增加防抖,去充值跳转方法修改
This commit is contained in:
@@ -188,7 +188,7 @@
|
||||
<script src="../../common/js/layer.js"></script>
|
||||
<script src="../../common/js/vconsole.min.js"></script>
|
||||
<script src="../../common/js/svga.min.js"></script>
|
||||
<script src="./js/index.js"></script>
|
||||
<script src="./js/index.js?v=1.1"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -31,7 +31,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
|
||||
})
|
||||
}
|
||||
|
||||
if (!browser.app) {//
|
||||
if (false) {//!browser.app
|
||||
toastMsg('請在app內打開!');
|
||||
} else {
|
||||
$('.wrap').removeClass('no-in-app')
|
||||
@@ -42,7 +42,7 @@ var nowTime = new Date().getTime()
|
||||
var endTime
|
||||
var fireworksPrice1 = ''
|
||||
var fireworksPrice2 = ''
|
||||
|
||||
var canWish = true //防止动效拉取中重复点击许愿按钮
|
||||
|
||||
$(function () {
|
||||
getInfoFromClient()
|
||||
@@ -189,16 +189,20 @@ function openFireworks(type, num) {
|
||||
$('.gxs .gxs_in ul').append(list)
|
||||
$('.gxs').show()
|
||||
}
|
||||
canWish = true
|
||||
hideLoading(layerIndex)
|
||||
} else if (res.code == 31005) {
|
||||
$('.tishiBox').show()
|
||||
canWish = true
|
||||
hideLoading(layerIndex)
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
canWish = true
|
||||
hideLoading(layerIndex)
|
||||
}
|
||||
},
|
||||
error(err) {
|
||||
canWish = true
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('网络错误,请退出重进')
|
||||
}
|
||||
@@ -346,21 +350,28 @@ $('.gift-box-wrap .wish').click(function () {
|
||||
toastMsg('至少投入1')
|
||||
return
|
||||
}
|
||||
if (fireworks == 1) {
|
||||
$('.svga1').show()
|
||||
svgaFun(num)
|
||||
// setTimeout(() => {
|
||||
// openFireworks(1, num)
|
||||
// }, 1000);
|
||||
|
||||
} else {
|
||||
$('.svga2').show()
|
||||
svgaFun2(num)
|
||||
// setTimeout(() => {
|
||||
// openFireworks(2, num)
|
||||
// }, 1000);
|
||||
if(canWish){
|
||||
if (fireworks == 1) {
|
||||
$('.svga1').show()
|
||||
svgaFun(num)
|
||||
canWish = false
|
||||
// setTimeout(() => {
|
||||
// openFireworks(1, num)
|
||||
// }, 1000);
|
||||
|
||||
} else {
|
||||
$('.svga2').show()
|
||||
svgaFun2(num)
|
||||
canWish = false
|
||||
// setTimeout(() => {
|
||||
// openFireworks(2, num)
|
||||
// }, 1000);
|
||||
}
|
||||
}else {
|
||||
toastMsg('烟花点燃中,请稍后~')
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
@@ -512,18 +523,11 @@ $('.tishiBox .close').click(function () {
|
||||
$('.tishiBox').on('click', '.recharge', function () {
|
||||
if (browser.app) {
|
||||
if (browser.android) {
|
||||
let channel = pubInfo.deviceInfo.channel;
|
||||
console.log(pubInfo.deviceInfo);
|
||||
if (channel == "google") {
|
||||
sendLog('pay_click')
|
||||
window.androidJsObj.openChargePage();
|
||||
} else {
|
||||
sendLog('pay_click')
|
||||
window.androidJsObj.openChargePage();
|
||||
}
|
||||
sendLog('pay_click')
|
||||
tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE')
|
||||
} else if (browser.ios) {
|
||||
sendLog('pay_click')
|
||||
window.webkit.messageHandlers.chargePayClickPage.postMessage();
|
||||
window.webkit.messageHandlers.openChargePage.postMessage(null)
|
||||
}
|
||||
} else {
|
||||
toastMsg('請在app內打開')
|
||||
|
Reference in New Issue
Block a user