From d29cc94e5adcfc8588008ff8f3134022e25e0670 Mon Sep 17 00:00:00 2001 From: Todking Date: Tue, 28 Dec 2021 11:00:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=20=E8=B0=83=E6=95=B4=E6=B8=A0=E9=81=93?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E9=99=90=E5=88=B6=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/payment/partner/partner-manage.js | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 2e7020897..d88c9eea5 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -2485,30 +2485,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter if (!$scope.paymentInfo) { return } - // if (!$scope.init.channel[channel]) { - // $scope.init.channel[channel] = true - // return - // } - if($scope.paymentInfo.aps_config_id){ - if(channel == 'alipay' && !$scope.paymentInfo.alipay_cn_switch){ - commonDialog.alert({ - title: 'ERROR', - content: "Please switch AlipayCN to Alipay channel, and then close Alipay channel", - type: 'error', - }) - $scope.loadPartnerPaymentInfo() - return; - } - if (channel == 'alipayaps' && $scope.paymentInfo.alipay_cn_switch) { - commonDialog.alert({ - title: 'ERROR', - content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel", - type: 'error', - }) - $scope.loadPartnerPaymentInfo() - return; - } - } $scope.getComplianceInfo() if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) { commonDialog From 7de155d0bf2f616b885d0072d6299d514d0bc6d2 Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Tue, 28 Dec 2021 13:31:00 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=89=AB=E8=B4=A6?= =?UTF-8?q?=E5=8D=95=E7=A0=81=20=E7=82=B9=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E6=94=AF=E4=BB=98=20=E6=B8=A0=E9=81=93=E6=94=B9=E4=B8=BAalipay?= =?UTF-8?q?online=EF=BC=8C=E4=B9=8B=E5=89=8D=E6=98=AFalipay=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/templates/billCode/js/mobile_payment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/ui/static/templates/billCode/js/mobile_payment.js b/src/main/ui/static/templates/billCode/js/mobile_payment.js index d7c61a6e9..75e5a066d 100644 --- a/src/main/ui/static/templates/billCode/js/mobile_payment.js +++ b/src/main/ui/static/templates/billCode/js/mobile_payment.js @@ -158,7 +158,7 @@ $(document).ready(function () { if(window.openmobilefun == 'alipay'){ paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay/mobile'; }else{ - paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay/mobile/redirectApp?priorityChannel=Alipay'; + paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay/mobile/redirectApp?priorityChannel=AlipayOnline'; } } if(paymentFun == 'AlipayAps'){ @@ -184,7 +184,7 @@ $(document).ready(function () { if(window.openmobilefun == 'alipay'){ paymentLink = '/api/v1.0/share_code/bills/payment/orders/'+window.billInfo.bill_code_id+'/alipay/share_link' }else{ - paymentLink = '/api/v1.0/share_code/bills/payment/'+window.billInfo.bill_code_id+'/alipay/mobile/redirectApp?priorityChannel=Alipay'; + paymentLink = '/api/v1.0/share_code/bills/payment/'+window.billInfo.bill_code_id+'/alipay/mobile/redirectApp?priorityChannel=AlipayOnline'; } } From 6533eec88a8c9c6e2df24716158e3d86d632c91b Mon Sep 17 00:00:00 2001 From: dalong306 <304592994@qq.com> Date: Tue, 28 Dec 2021 16:51:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=BE=AE=E4=BF=A1H5=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E5=90=8E=E8=B7=B3=E8=BD=AC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/static/templates/skip_wxbrowser.js | 48 +++++++++++++++++-- .../ui/static/templates/skip_wxbrowser_aps.js | 6 +++ 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/main/ui/static/templates/skip_wxbrowser.js b/src/main/ui/static/templates/skip_wxbrowser.js index bdd95f702..7697843b5 100644 --- a/src/main/ui/static/templates/skip_wxbrowser.js +++ b/src/main/ui/static/templates/skip_wxbrowser.js @@ -1,4 +1,4 @@ -window = {}; +window = window || {}; $(function () { 'use strict'; var winHeight = $(window).height(); @@ -6,7 +6,11 @@ $(function () { if (ua.indexOf('micromessenger') >= 0) { $(".weixin-tip").show().css("height", winHeight); } else { - location.href = window.target_href; + if (!window.retry_flag) { + location.href = window.target_href; + } else { + checkOrderStd(window.client_moniker, window.parent_order_id, true) + } } decode(); @@ -17,21 +21,59 @@ $(function () { $('#complete').bind('touchstart', function () { checkOrderStd(window.client_moniker, window.partner_order_id, false); }); + $('#refresh').bind('touchstart', function () { + if (window.refresh_cooldown > 0) { + return; + } + window.refresh_cooldown = 10; + + function replaceTxt() { + window.refresh_cooldown = window.refresh_cooldown - 1 + if (window.refresh_cooldown > 0) { + $('#refresh').find('a').text('正在查询订单,请' + window.refresh_cooldown + '秒后重试') + setTimeout(replaceTxt, 1000) + } else { + $('#refresh').find('a').text('已完成付款') + } + } + + setTimeout(replaceTxt, 1000) + replaceTxt() + + checkOrderStd(window.client_moniker, window.partner_order_id, false); + }); + $('#retry_btn').bind('touchstart', function () { + location.href = window.target_href; + }) $('#continue_use_browser').bind('touchstart', function () { location.href = window.target_href; }); + $('#copy_link').bind('touchstart', function () { + var current_href = location.href; + $("#copy_link_btn").attr("data-clipboard-text", current_href); + var btn = document.getElementById('copy_link_btn'); + var clipboard = new ClipboardJS(btn); + clipboard.on('success', function (e) { + alert("复制成功!"); + e.clearSelection(); + }); + clipboard.on('error', function (e) { + alert("复制失败!"); + }); + }); function decode() { var redirect = window.redirect; while (redirect.indexOf('://') < 0) { redirect = decodeURIComponent(redirect); - if (redirect == window.redirect) { + if (redirect === window.redirect) { break; } window.redirect = redirect; } } + function checkOrderStd(clientMoniker, merchantOrderId, needLoop) { if (!clientMoniker || !merchantOrderId) { return; diff --git a/src/main/ui/static/templates/skip_wxbrowser_aps.js b/src/main/ui/static/templates/skip_wxbrowser_aps.js index 38df37603..ecb015c58 100644 --- a/src/main/ui/static/templates/skip_wxbrowser_aps.js +++ b/src/main/ui/static/templates/skip_wxbrowser_aps.js @@ -17,6 +17,12 @@ $(function () { $('#complete').bind('touchstart', function () { checkOrderStd(window.client_moniker, window.partner_order_id, false); }); + $('#refresh').bind('touchstart', function () { + checkOrderStd(window.client_moniker, window.partner_order_id, false); + }); + $('#continue_use_browser').bind('touchstart', function () { + callAlipayAps(); + }); $('#continue_use_browser').bind('touchstart', function () { callAlipayAps(); });