Merge remote-tracking branch 'origin/develop' into develop

master
Yixian 4 years ago
commit e4c826f7ab

@ -2485,30 +2485,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if (!$scope.paymentInfo) { if (!$scope.paymentInfo) {
return 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() $scope.getComplianceInfo()
if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) { if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) {
commonDialog commonDialog

@ -158,7 +158,7 @@ $(document).ready(function () {
if(window.openmobilefun == 'alipay'){ if(window.openmobilefun == 'alipay'){
paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay/mobile'; paymentLink = '/api/v1.0/share_code/business/bills/'+window.billInfo.bill_code_id+'/alipay/mobile';
}else{ }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'){ if(paymentFun == 'AlipayAps'){
@ -184,7 +184,7 @@ $(document).ready(function () {
if(window.openmobilefun == 'alipay'){ if(window.openmobilefun == 'alipay'){
paymentLink = '/api/v1.0/share_code/bills/payment/orders/'+window.billInfo.bill_code_id+'/alipay/share_link' paymentLink = '/api/v1.0/share_code/bills/payment/orders/'+window.billInfo.bill_code_id+'/alipay/share_link'
}else{ }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';
} }
} }

@ -1,4 +1,4 @@
window = {}; window = window || {};
$(function () { $(function () {
'use strict'; 'use strict';
var winHeight = $(window).height(); var winHeight = $(window).height();
@ -6,7 +6,11 @@ $(function () {
if (ua.indexOf('micromessenger') >= 0) { if (ua.indexOf('micromessenger') >= 0) {
$(".weixin-tip").show().css("height", winHeight); $(".weixin-tip").show().css("height", winHeight);
} else { } 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(); decode();
@ -17,21 +21,59 @@ $(function () {
$('#complete').bind('touchstart', function () { $('#complete').bind('touchstart', function () {
checkOrderStd(window.client_moniker, window.partner_order_id, false); 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 () { $('#continue_use_browser').bind('touchstart', function () {
location.href = window.target_href; 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() { function decode() {
var redirect = window.redirect; var redirect = window.redirect;
while (redirect.indexOf('://') < 0) { while (redirect.indexOf('://') < 0) {
redirect = decodeURIComponent(redirect); redirect = decodeURIComponent(redirect);
if (redirect == window.redirect) { if (redirect === window.redirect) {
break; break;
} }
window.redirect = redirect; window.redirect = redirect;
} }
} }
function checkOrderStd(clientMoniker, merchantOrderId, needLoop) { function checkOrderStd(clientMoniker, merchantOrderId, needLoop) {
if (!clientMoniker || !merchantOrderId) { if (!clientMoniker || !merchantOrderId) {
return; return;

@ -17,6 +17,12 @@ $(function () {
$('#complete').bind('touchstart', function () { $('#complete').bind('touchstart', function () {
checkOrderStd(window.client_moniker, window.partner_order_id, false); 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 () { $('#continue_use_browser').bind('touchstart', function () {
callAlipayAps(); callAlipayAps();
}); });

Loading…
Cancel
Save