Commit d0de159c by 杨北旺

修复扫码进入问题

1 parent d989051c
......@@ -68,12 +68,12 @@ Page({
const { code, data } = await wx.p.api.wechatApi.getSceneById({
id
})
const params = data.scene.split('&url='),options = {}
const params = data.scene.split('url='),options = {}
data.scene.split('&').map(item => {
const [key, val] = item.split('=')
options[key] = val
})
// if (params.length > 1) options.url = params.at(-1)
if (params.length > 1) options.url = params.at(-1)
if (code == 0) this.login(options)
else throw {}
} catch (error) {
......@@ -82,6 +82,7 @@ Page({
}
},
jumpPage(val) {
console.log(val);
const targetPath = decodeURIComponent(val),
{ url, events } = this.setRouteData(targetPath),
routeName = this.tabList.findIndex(e => `/${e.pagePath}` == `${url}.html`) > -1 ? 'switchTab' : 'redirectTo'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!