{
path: '/trade',
component: Trade,
meta: { showFooter: true },
beforeEnter: (to, from, next) => {
if(from.path == '/shopcart') {
next()
} else {
next(false)
}
}
},
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
路由独享守卫,表示如果要去trade页的话,只有从shopcart页才能去,否则从哪个页想跳转到trade页,就回到那个初始页