fix h5 redirect url encode

master
luoyang 5 years ago
parent d5046d97b3
commit 351fa05ad7

@ -8,6 +8,8 @@ $(function () {
} else { } else {
location.href = window.target_href; location.href = window.target_href;
} }
decode();
$('.close-weixin-tip').bind('touchstart', function () { $('.close-weixin-tip').bind('touchstart', function () {
$(".weixin-tip").hide(); $(".weixin-tip").hide();
checkOrderStd(window.client_moniker, window.partner_order_id, true); checkOrderStd(window.client_moniker, window.partner_order_id, true);
@ -19,6 +21,17 @@ $(function () {
location.href = window.target_href; location.href = window.target_href;
}); });
function decode() {
var redirect = window.redirect;
while (redirect.indexOf('://') < 0) {
redirect = decodeURIComponent(redirect);
if (redirect == window.redirect) {
break;
}
window.redirect = redirect;
}
}
function checkOrderStd(clientMoniker, merchantOrderId, needLoop) { function checkOrderStd(clientMoniker, merchantOrderId, needLoop) {
if (!clientMoniker || !merchantOrderId) { if (!clientMoniker || !merchantOrderId) {
return; return;

Loading…
Cancel
Save