扫码地址问题处理
This commit is contained in:
parent
51e6d98827
commit
a7ef77145c
14
src/app.wpy
14
src/app.wpy
@ -35,7 +35,7 @@ wepy.app({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
globalData: {
|
globalData: {
|
||||||
versions: 'v5.5.99', // 版本号
|
versions: 'v5.5.100', // 版本号
|
||||||
navBarHeight: 0, // 导航栏高度
|
navBarHeight: 0, // 导航栏高度
|
||||||
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
|
navRight: 0, // 胶囊距右方间距(方保持左、右间距一致)
|
||||||
navTop: 0, // 胶囊距顶部间距
|
navTop: 0, // 胶囊距顶部间距
|
||||||
@ -89,9 +89,9 @@ wepy.app({
|
|||||||
|
|
||||||
onShow(options) {
|
onShow(options) {
|
||||||
console.log('路径携带参数:', options)
|
console.log('路径携带参数:', options)
|
||||||
if (options.path === 'pages/home/informationV2') {
|
// if (options.path === 'pages/home/informationV2') {
|
||||||
wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(options.query.scene)}` })
|
// wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(options.query.scene)}` })
|
||||||
}
|
// }
|
||||||
if (options.path === 'pages/tabBar/home1') {
|
if (options.path === 'pages/tabBar/home1') {
|
||||||
wx.switchTab({ url: `/pages/tabBar/home?${decodeURIComponent(options.query.scene)}` })
|
wx.switchTab({ url: `/pages/tabBar/home?${decodeURIComponent(options.query.scene)}` })
|
||||||
}
|
}
|
||||||
@ -114,9 +114,13 @@ wepy.app({
|
|||||||
},
|
},
|
||||||
onPageNotFound(res) {
|
onPageNotFound(res) {
|
||||||
console.log(res, '错误res')
|
console.log(res, '错误res')
|
||||||
|
if (res.path === 'pages/home/informationV2') {
|
||||||
|
wx.redirectTo({ url: `/pages/home/information?${decodeURIComponent(res.query.scene)}` })
|
||||||
|
} else {
|
||||||
wx.switchTab({
|
wx.switchTab({
|
||||||
url: '/pages/tabBar/home'
|
url: `/pages/tabBar/home?${decodeURIComponent(res.query.scene)}`
|
||||||
}) // 如果是 tabbar 页面,请使用 wx.switchTab
|
}) // 如果是 tabbar 页面,请使用 wx.switchTab
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onHide() {},
|
onHide() {},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user