xiaozy #2

Merged
xiaozhiyong merged 17 commits from xiaozy into master 2023-04-12 11:19:18 +08:00
Showing only changes of commit ee6ebb71f1 - Show all commits

View File

@@ -6,13 +6,15 @@ import { obtainUrlPathParameterTarget } from '@/utils/index.js'
import { getToken, removeToken } from '@/utils/auth'
import { Notify } from 'vant'
let whiteList = ['/home']
router.beforeEach(async (to, from, next) => {
//pinia挂载顺序问题异步处理路由拦截
setTimeout(() => {
let store = useStore() //获取状态
let token = getToken() //获取cookie
// removeToken()
// store.getPosition()
!whiteList.includes(to.path) && store.getPosition()
if (!token) {
let paramsTarget = obtainUrlPathParameterTarget(location.href)