Commit 06ef6380 by 李嘉林

扫h5链接跳转小程序适配

parent 611d0c69
......@@ -73,7 +73,8 @@ export default {
// url添加门店信息参数
let { offlineShopCode, offlineShopName } = getStoreInfo();
console.log(offlineShopCode,'----index-offlineShopCode')
if (offlineShopCode && !this.params.includes("offlineShopCode")) {
// utm_source URL存在utm_source参数为扫h5链接跳转小程序适配直接进入不要拼接门店参数
if (offlineShopCode && !this.params.includes("offlineShopCode") && !this.params.includes("utm_source")) {
this.params+=`&offlineShopCode=${offlineShopCode}&offlineShopName=${offlineShopName}`
}
// 定位信息
......@@ -394,7 +395,7 @@ export default {
})
});
}else {
} else {
log.info('老版本分享(下划线拼接参数)')
//来自扫码
// options 中的scene需要使用decodeURIComponent才能获取到生成二维码时传入的scene
......@@ -444,6 +445,24 @@ export default {
// var query = options.query.dentistId; // 参数二维码传递过来的场景参数
} else if (options.q && options.scancode_time) {
// 扫h5链接跳转小程序适配
log.info('扫h5链接跳转小程序适配', options);
console.log('options.q', decodeURIComponent(options.q));
let pageUrl = decodeURIComponent(options.q);
let page = pageUrl.split('?')[0];
let params = pageUrl.split('?')[1];
if (page) {
this.page = page;
}
if (params) {
if (params.includes('mixid')) {
this.params = `?${params}&native_test=1&location_obj=${this.location_obj}`;
} else {
this.params += `&${params}`;
}
}
}
this.newPageUrl = this.pageUrl;
console.log('this.newPageUrl', this.newPageUrl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment