|
|
|
@ -92,8 +92,6 @@ function paycallback() {
|
|
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
|
$(window).load( function(){
|
|
|
|
|
var u = navigator.userAgent;
|
|
|
|
|
$("#testn").html(u);
|
|
|
|
|
if ($(".gopay").val() == 1) {
|
|
|
|
|
if ($(".aliapp").val() == 1) {
|
|
|
|
|
var url = $(".gopay_url").val();
|
|
|
|
@ -148,34 +146,47 @@ $(function() {
|
|
|
|
|
success: function(r) {
|
|
|
|
|
var u = navigator.userAgent;
|
|
|
|
|
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
|
|
|
|
|
|
|
|
|
|
var isSafari = u.indexOf('Safari') > -1 || u.indexOf('safari') > -1; //android终端
|
|
|
|
|
|
|
|
|
|
if (r.type == "deposit") {
|
|
|
|
|
if (r.payStatus == '1') {
|
|
|
|
|
// 提示支付成功
|
|
|
|
|
$("#paytype").html("支付成功");
|
|
|
|
|
if (!isAndroid) {
|
|
|
|
|
try {
|
|
|
|
|
// window.location.href = Scheme+"://1";
|
|
|
|
|
// window.location.href = Scheme+"://1";
|
|
|
|
|
if (isSafari) {
|
|
|
|
|
window.location.href = Scheme+"://1";
|
|
|
|
|
} else {
|
|
|
|
|
$("#toast").show();
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.href = r.url;
|
|
|
|
|
},2000)
|
|
|
|
|
}
|
|
|
|
|
/* try {
|
|
|
|
|
window.webkit.messageHandlers.exchangeResult.postMessage(1);
|
|
|
|
|
// window.location.href = r.url;
|
|
|
|
|
} catch(err) {
|
|
|
|
|
|
|
|
|
|
window.location.href = Scheme+"://1";
|
|
|
|
|
// window.location.href = Scheme+"://1";
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// 提示支付失败
|
|
|
|
|
$("#paytype").html("支付失败");
|
|
|
|
|
if (!isAndroid) {
|
|
|
|
|
try {
|
|
|
|
|
if (isSafari) {
|
|
|
|
|
window.location.href = Scheme+"://0";
|
|
|
|
|
} else {
|
|
|
|
|
$("#toast").show();
|
|
|
|
|
setTimeout(function(){
|
|
|
|
|
window.location.href = r.url;
|
|
|
|
|
},2000)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* try {
|
|
|
|
|
window.webkit.messageHandlers.exchangeResult.postMessage(0);
|
|
|
|
|
// window.location.href = r.url;
|
|
|
|
|
} catch(err) {
|
|
|
|
|
window.location.href = Scheme+"://0";
|
|
|
|
|
}
|
|
|
|
|
} */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|