手机银行唤起微信小程序

This commit is contained in:
lf 2024-07-24 17:28:48 +08:00
parent ddb8fddf68
commit b5aa1841cb
1 changed files with 6 additions and 1 deletions

View File

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