diff --git a/view/peko/activity/act-newYear-2022/index.html b/view/peko/activity/act-newYear-2022/index.html index fdfbe16..5eebf26 100644 --- a/view/peko/activity/act-newYear-2022/index.html +++ b/view/peko/activity/act-newYear-2022/index.html @@ -188,7 +188,7 @@ - + \ No newline at end of file diff --git a/view/peko/activity/act-newYear-2022/js/index.js b/view/peko/activity/act-newYear-2022/js/index.js index 654d0d2..0b954fa 100644 --- a/view/peko/activity/act-newYear-2022/js/index.js +++ b/view/peko/activity/act-newYear-2022/js/index.js @@ -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內打開')