Yi.Vue2.x.Vuetify/src/permission.js

(完整代码) 569B

import router from './router/index'
import store from './store/index'
// import accountApi from '@/api/accountApi'


router.beforeEach((to, from, next) => {

    // console.log(to)
    // console.log(from)
    // console.log(next)
    const user = store.state.user.user; //获取是有user
    if (!user) { //如果没有登入
        if (to.path == '/login/' || to.path == '/register/' || to.path == '/reset_password/' || to.path == '/qq/') {
            next();
        } else {
            next({ path: '/login/' });
        }
    } else {
        next();
    }

})

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。