提交 248b9868 编写于 作者: 雪洛's avatar 雪洛

fix: pc版首页重定向不正确

上级 01043cc7
......@@ -48,7 +48,7 @@
},
watch: {
$route: {
immediate: true,
// immediate: true,
handler(newRoute) {
const width = uni.getSystemInfoSync().windowWidth
if (width <= 768) {
......@@ -58,6 +58,10 @@
let category
if (path === '/') {
category = 'component'
uni.redirectTo({
url: '/pages/component/global-properties/global-properties'
})
return
} else if (path.indexOf('/pages/tabBar') === 0) {
const indexPageItem = this.indexPage.find(item => item.tabBar === path)
if (!indexPageItem) {
......@@ -67,7 +71,7 @@
uni.redirectTo({
url: indexPageItem.index
})
category = path.split('/')[3]
return
} else {
category = path.split('/')[2]
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册