微信小程序 支付宝小程序 支付宝微信扫码进小程序后参数的获取方式, 两个有点差异

  onLaunch: function () {
const params = wx.getLaunchOptionsSync();
let str = params.query ? params.query.q : "";
if (str) {
str = decodeURIComponent(str);
if (str.indexOf("qr=") === -1) return;
const qr = str.split("qr=")[1];
this.$store.commit("save_qr", qr);
}
},

上面微信

下面支付宝

    const str = option.query ? option.query.qrCode : "";
if (str) {
if (str.indexOf("qr=") === -1) return;
const qr = str.split("qr=")[1];
this.$store.commit("SAVE_QR", qr);
}

微信小程序 支付宝小程序 支付宝微信扫码进小程序后参数的获取方式, 两个有点差异

原文:https://www.cnblogs.com/l24118028/p/14738917.html

以上是微信小程序 支付宝小程序 支付宝微信扫码进小程序后参数的获取方式, 两个有点差异的全部内容。
THE END
分享
二维码
)">
< <上一篇
)">
下一篇>>