From b489c22d8c866c7fac921fa4b2ee1ea8fa49d413 Mon Sep 17 00:00:00 2001 From: qf Date: Sat, 10 Dec 2022 18:25:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=9F=E7=BA=A7=E5=8E=A8=E6=88=BF=EF=BC=9A+?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E4=BF=AE=E6=94=B9=E4=B8=BA=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E5=85=85=E5=80=BC=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view/peko/activity/act-ocean/js/index.js | 25 +++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/view/peko/activity/act-ocean/js/index.js b/view/peko/activity/act-ocean/js/index.js index 33ad850..80b0ae3 100644 --- a/view/peko/activity/act-ocean/js/index.js +++ b/view/peko/activity/act-ocean/js/index.js @@ -32,7 +32,7 @@ const toastMsg = (content = '操作完成', time = 2) => { }) } -if (!browser.app) { //false +if (false) { //!browser.app toastMsg('請在app內打開!'); } else { $('.wrap').removeClass('no-in-app') @@ -935,8 +935,25 @@ $(function () { $('.mall').on('click', function () { window.location.href = './mall.html' }) + // +按钮跳转充值 $('.add').on('click', function () { - window.location.href = './mall.html' + if (browser.app) { + if (browser.android) { + let channel = pubInfo.deviceInfo.channel; + console.log(pubInfo.deviceInfo); + if (channel == "google") { + window.androidJsObj.openChargePage(6); + } else { + window.androidJsObj.openChargePage(6); + window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; + } + } else if (browser.ios) { + window.webkit.messageHandlers.chargePayClickPage.postMessage(6); + window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; + } + } else { + toastMsg('請在app內打開') + } }) // 監聽遊戲記錄按鈕點擊事件 $('.record').on('click', function () { @@ -1089,11 +1106,13 @@ $(function () { let channel = pubInfo.deviceInfo.channel; console.log(pubInfo.deviceInfo); if (channel == "google") { - window.androidJsObj.openChargePage(); + window.androidJsObj.openChargePage(6); } else { + window.androidJsObj.openChargePage(6); window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; } } else if (browser.ios) { + window.webkit.messageHandlers.chargePayClickPage.postMessage(6); window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; } } else {