Commit d0de159c by 杨北旺

修复扫码进入问题

1 parent d989051c
...@@ -68,12 +68,12 @@ Page({ ...@@ -68,12 +68,12 @@ Page({
const { code, data } = await wx.p.api.wechatApi.getSceneById({ const { code, data } = await wx.p.api.wechatApi.getSceneById({
id id
}) })
const params = data.scene.split('&url='),options = {} const params = data.scene.split('url='),options = {}
data.scene.split('&').map(item => { data.scene.split('&').map(item => {
const [key, val] = item.split('=') const [key, val] = item.split('=')
options[key] = val 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) if (code == 0) this.login(options)
else throw {} else throw {}
} catch (error) { } catch (error) {
...@@ -82,6 +82,7 @@ Page({ ...@@ -82,6 +82,7 @@ Page({
} }
}, },
jumpPage(val) { jumpPage(val) {
console.log(val);
const targetPath = decodeURIComponent(val), const targetPath = decodeURIComponent(val),
{ url, events } = this.setRouteData(targetPath), { url, events } = this.setRouteData(targetPath),
routeName = this.tabList.findIndex(e => `/${e.pagePath}` == `${url}.html`) > -1 ? 'switchTab' : 'redirectTo' 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!