手机银行唤起微信小程序

This commit is contained in:
lf 2024-07-24 17:44:26 +08:00
parent d74f68044a
commit f0866e04b4
5 changed files with 30 additions and 5 deletions

View File

@ -561,9 +561,14 @@
}) })
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) { } else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){ function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', { AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31', id: 'gh_07fecf7a6d31',
url: res.data.redirect_url, url: url,
}, },
function(result) { function(result) {
console.log(result); console.log(result);

View File

@ -577,9 +577,14 @@
}) })
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) { } else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){ function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', { AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31', id: 'gh_07fecf7a6d31',
url: res.data.redirect_url, url: url,
}, },
function(result) { function(result) {
console.log(result); console.log(result);

View File

@ -273,9 +273,14 @@
}) })
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) { } else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){ function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', { AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31', id: 'gh_07fecf7a6d31',
url: res.data.redirect_url, url: url,
}, },
function(result) { function(result) {
console.log(result); console.log(result);

View File

@ -277,9 +277,14 @@
}) })
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) { } else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){ function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', { AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31', id: 'gh_07fecf7a6d31',
url: res.data.redirect_url, url: url,
}, },
function(result) { function(result) {
console.log(result); console.log(result);

View File

@ -528,9 +528,14 @@
}) })
} else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) { } else if (ua.indexOf("Source/YOUBankApp/psbc") > -1) {
function upWXSmallProgramYouBank(){ function upWXSmallProgramYouBank(){
function objectToQueryString(path) {
const obj = JSON.parse(JSON.stringify(path));
return Object.keys(obj).map(key => key + '=' + obj[key]).join('&');
}
let url = "pages/index/index?" + objectToQueryString(res.data);
AlipayJSBridge.call('upWXSmallProgramYouBank', { AlipayJSBridge.call('upWXSmallProgramYouBank', {
id: 'gh_07fecf7a6d31', id: 'gh_07fecf7a6d31',
url: res.data.redirect_url, url: url,
}, },
function(result) { function(result) {
console.log(result); console.log(result);