diff --git a/view/peko/modules/pay/index.html b/view/peko/modules/pay/index.html index 9a5cc01..3001160 100644 --- a/view/peko/modules/pay/index.html +++ b/view/peko/modules/pay/index.html @@ -171,4 +171,4 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/view/peko/modules/pay/js/index.js b/view/peko/modules/pay/js/index.js index 6b83aa2..4279dee 100644 --- a/view/peko/modules/pay/js/index.js +++ b/view/peko/modules/pay/js/index.js @@ -219,6 +219,11 @@ $('.page1 .position').on('click', 'div', function () { }) // 充值接口 function apply2New () { + if (border.app) { + failureUrl = urlPrefix + '/peko/modules/pay/result.html?channelType=4&app=1'; + } else { + failureUrl = urlPrefix + '/peko/modules/pay/result.html?channelType=4&app=0'; + } apply2NewLock = false; showLoading(); networkRequest({ diff --git a/view/peko/modules/pay/js/result.js b/view/peko/modules/pay/js/result.js index 680dd36..a166713 100644 --- a/view/peko/modules/pay/js/result.js +++ b/view/peko/modules/pay/js/result.js @@ -25,6 +25,7 @@ const toastMsg = (content = '操作完成', time = 2) => { } var chargeRecordId = null;//订单号 var chargeStatus = 0; +var isApp = 0; $(function () { if (EnvCheck() == 'test') {//degBug new VConsole(); @@ -51,32 +52,6 @@ function getChargeResult () { $('.result span').text(`原因:${res.message}`); $('.err').show(); hideLoading(layerIndex); - // toastMsg(res.message); - - // if (browser.app) { - // console.log('app内'); - // //你已经准备好了整个queryString在这里的键->值的形式。 - // //在有多个值的边缘情况下,该值是一个数组。 - // var qs = AppRedirect.queryString; - // // Here we initiate the redirect process - // AppRedirect.redirect({ - // iosApp: 'twitter://post?message=' + qs['message'], - // iosAppStore: 'https://itunes.apple.com/il/app/twitter/id333903271?mt=8&message=' + qs['message'], - // // 为此,你的应用需要有一个类别过滤器:android.intent.category.BROWSABLE - // android: { - // // 'host': 'post/?message=' + encodeURIComponent(qs['message']), // 自定义方案URL中的Host/path/querystring部分 - // // 'action': ", //相当于intent中的action - // // 'category': ', //相当于intent中的category - // // 'component': ', //相当于intent中的component - // // 'scheme': 'twitter', // 自定义方案URL中的方案部分 - // // 'package': 'com.twitter.android', // Play store中的包名 - // // 'fallback': 'https://play.google.com/store/apps/details?id=com.twitter.android&hl=en&message=' + qs['message'] - // 'scheme': 'pekoapp', - // 'host': 'payment/resul' - // } - - // }); - // } } hideLoading(layerIndex); }, @@ -87,8 +62,13 @@ function getChargeResult () { }); } $('.result .but').click(function () { - if (browser.android && browser.app) { - window.location.href = `pekoapp://payment/result?status=${chargeStatus}`; + isApp = getUrl.app; + if (isApp == 1) { + if (browser.app) { + window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; + } else { + window.location.href = `pekoapp://payment/result?status=${chargeStatus}`; + } } else { window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4'; } diff --git a/view/peko/modules/pay/result.html b/view/peko/modules/pay/result.html index 1818f80..e32024e 100644 --- a/view/peko/modules/pay/result.html +++ b/view/peko/modules/pay/result.html @@ -16,7 +16,7 @@

储值失败

原因:xxxxx -
返回储值页面
+
返回
@@ -32,4 +32,4 @@ - \ No newline at end of file + \ No newline at end of file