Commit b5329a00 authored by Your Name's avatar Your Name

跳转二维码

parent f14ff19d
......@@ -96,7 +96,7 @@ const router = new VueRouter({
mode: "history",
base: process.env.BASE_URL
})
const whiteList =['/login','/success']
const whiteList =['/login','/success','/guide']
router.beforeEach((to, from, next) => {
let user = sessionStorage.getItem("token");
if(to.name == 'screen' || to.name == 'slogin'){
......@@ -112,7 +112,9 @@ router.beforeEach((to, from, next) => {
if (!user && !whiteList.includes(to.path)) { // 通过vuex state获取当前的token是否存在
console.log(to)
if (to.path === '/guide') {
next(to.path)
next({
path: '/guide'
})
} else {
next({
path: '/login',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment