diff --git a/view/peko/activity/act-ocean/js/index.js b/view/peko/activity/act-ocean/js/index.js index d1e6267..c058aa7 100644 --- a/view/peko/activity/act-ocean/js/index.js +++ b/view/peko/activity/act-ocean/js/index.js @@ -874,8 +874,9 @@ $(function () { // } if (browser.app) { if (browser.android) { - window.androidJsObj.openChargePage(); + window.androidJsObj.openChargePage(5); } else if (browser.ios) { + window.webkit.messageHandlers.openChargePage.postMessage(5); window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; } } diff --git a/view/peko/activity/explore/js/index.js b/view/peko/activity/explore/js/index.js index 0b81be8..9e26987 100644 --- a/view/peko/activity/explore/js/index.js +++ b/view/peko/activity/explore/js/index.js @@ -302,9 +302,10 @@ $(function(){ $('body').css('overflow', 'auto') if(browser.app){ if(browser.android){ - tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE') + // tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE') + window.androidJsObj.openChargePage(7); }else if(browser.ios){ - window.webkit.messageHandlers.openChargePage.postMessage(null) + window.webkit.messageHandlers.openChargePage.postMessage(7) } }else{ toastMsg('請在app內打開') diff --git a/view/peko/modules/pay/js/index.js b/view/peko/modules/pay/js/index.js index fb4121e..d9a7a8f 100644 --- a/view/peko/modules/pay/js/index.js +++ b/view/peko/modules/pay/js/index.js @@ -19,6 +19,7 @@ let uid; let modeOfPayment = false;//判断是否有选择支付方式 let paymentAmount = false;//判断是否有选择付款金额 var deviceId;//型号ID +var payMoney //充值金额 $(function () { if (EnvCheck() == 'test') {//degBug new VConsole(); @@ -125,6 +126,7 @@ $(function () { logingFun("請選擇您的儲值金額")//'' } else { console.log(countryCode) + console.log('payMoney',payMoney); networkRequest({ type: 'POST', url: urlPrefix + '/charge/apply2New', @@ -134,6 +136,8 @@ $(function () { console.log(res) $('.logingActive').text("請稍等");//"" $('.logingActive').show(); + // 充值成功埋点 + chargeFinish(payMoney) window.location.href = res.data.payInfo.mweb_url; } else { logingFun(res.message) @@ -219,7 +223,7 @@ $(function () { arr[type].chargeWays[index].chargeProds.forEach(res => {//金幣 // ${res.chargeGoldNum.toLocaleString()} ${"金幣"} str += ` - + ${res.prodName} ${res.currencySign} ${res.money.toLocaleString()} @@ -231,6 +235,7 @@ $(function () { paymentAmount = true; console.log($(this)); chargeProdId = $(this).attr('chargeProdId'); + payMoney = $(this).attr('payMoney'); $(this).addClass('active').siblings().removeClass('active'); }) } @@ -291,4 +296,17 @@ function updateQueryStringParameter (uri, key, value) { else { return uri + separator + key + "=" + value; } +} + +// 点击支付之后埋点 +function chargeFinish(payMoney) { + if(browser.app){ + if(browser.android){ + window.androidJsObj.chargePayPage(payMoney); + }else if(browser.ios){ + window.webkit.messageHandlers.chargePayPage.postMessage(payMoney) + } + }else{ + console.log('請在app內打開') + } } \ No newline at end of file diff --git a/view/peko/modules/spirit/js/main.js b/view/peko/modules/spirit/js/main.js index b7858e6..321545c 100644 --- a/view/peko/modules/spirit/js/main.js +++ b/view/peko/modules/spirit/js/main.js @@ -301,8 +301,9 @@ $(function () { $('.go-to-recharge, .recharge-icon').click(() => { if (browser.app) { if (browser.android) { - window.androidJsObj.openChargePage(); + window.androidJsObj.openChargePage(6); } else if (browser.ios) { + window.webkit.messageHandlers.openChargePage.postMessage(6); window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; } } else {