|
@@ -873,6 +873,20 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ async getqrcode (options) {
|
|
|
+
|
|
|
+ try {
|
|
|
+ const sa_utm = await this.get_sa_utm(options);
|
|
|
+ if (sa_utm) {
|
|
|
+ const params = await this.fetchData(sa_utm)
|
|
|
+
|
|
|
+ console.log('二码合一参数::::', params)
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch(err) {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
// 无牌车闸机扫码
|
|
|
async scanCarCode() {
|
|
|
try {
|
|
@@ -935,7 +949,7 @@ export default {
|
|
|
// }
|
|
|
|
|
|
// 调用扫一扫功能
|
|
|
- try {
|
|
|
+ // try {
|
|
|
// window.location.href = 'alipays://platformapi/startapp?appId=20000067&url=scanqrcode';
|
|
|
// 等待支付宝 JS SDK 准备就绪
|
|
|
// document.addEventListener('AlipayJSBridgeReady', () => {
|
|
@@ -949,19 +963,13 @@ export default {
|
|
|
|
|
|
// runScanFn({type: "scanQRCodeOver", options: {imageChannel: "camera", qrCode: "https://crm.kerryplus.com/t-parking?sa_utm=mJ", rawData: "aHR0cHM6Ly9jcm0ua2VycnlwbHVzLmNvbS90LXBhcmtpbmc/c2FfdXRtPW1K", result: "https://crm.kerryplus.com/t-parking?sa_utm=mJ", scanType: "QR", errMsg: "scanCode:ok"}});
|
|
|
// TODO 兼容支付宝无牌车扫码
|
|
|
+ // this.getqrcode({type: "scanQRCodeOver", options: {imageChannel: "camera", qrCode: "https://crm.kerryplus.com/t-parking?sa_utm=mJ", rawData: "aHR0cHM6Ly9jcm0ua2VycnlwbHVzLmNvbS90LXBhcmtpbmc/c2FfdXRtPW1K", result: "https://crm.kerryplus.com/t-parking?sa_utm=mJ", scanType: "QR", errMsg: "scanCode:ok"}})
|
|
|
window.subscribe('scanQRCodeOver', (options) => {
|
|
|
- console.log('微信扫码结束之后的返回参数', options);
|
|
|
- const sa_utm = this.get_sa_utm(options);
|
|
|
+ console.log('微信扫码结束之后的返回参数', {type: "scanQRCodeOver", options: {imageChannel: "camera", qrCode: "https://crm.kerryplus.com/t-parking?sa_utm=mJ", rawData: "aHR0cHM6Ly9jcm0ua2VycnlwbHVzLmNvbS90LXBhcmtpbmc/c2FfdXRtPW1K", result: "https://crm.kerryplus.com/t-parking?sa_utm=mJ", scanType: "QR", errMsg: "scanCode:ok"}});
|
|
|
+ // const sa_utm = await this.get_sa_utm(options);
|
|
|
console.log('sa_utm:::', sa_utm)
|
|
|
- if (sa_utm) {
|
|
|
- const params = this.fetchData(sa_utm)
|
|
|
- console.log('params:::', params)
|
|
|
- this.redirect = {
|
|
|
- ...this.redirect,
|
|
|
- ...params,
|
|
|
- }
|
|
|
- console.log('二码合一参数::::', params)
|
|
|
- }
|
|
|
+ this.getqrcode(options)
|
|
|
+
|
|
|
|
|
|
// runScanFn(options);
|
|
|
});
|
|
@@ -998,9 +1006,9 @@ export default {
|
|
|
// console.log(err);
|
|
|
// }
|
|
|
// });
|
|
|
- } catch (err) {
|
|
|
- console.log('支付宝H5页面扫码获取到的参数——失败err', err);
|
|
|
- }
|
|
|
+ // } catch (err) {
|
|
|
+ // console.log('支付宝H5页面扫码获取到的参数——失败err', err);
|
|
|
+ // }
|
|
|
|
|
|
} else {
|
|
|
try {
|