添加 请求 修改登录页

This commit is contained in:
GGJ
2023-12-26 08:45:15 +08:00
parent 46eb2d93fb
commit fea95de2da
34 changed files with 5892 additions and 541 deletions

View File

@@ -3,6 +3,7 @@ import staticRoutes from '@/router/static'
import { useConfig } from '@/stores/config'
import NProgress from 'nprogress'
import { loading } from '@/utils/loading'
import { ElMessage } from 'element-plus'
const router = createRouter({
history: createWebHashHistory(),
@@ -17,6 +18,21 @@ router.beforeEach((to, from, next) => {
window.existLoading = true
}
console.log(to)
// if (to.path == '/login' || to.path == '/404') {
// // 登录或者注册才可以往下进行
// next()
// } else {
// // 获取 token
// const token = localStorage.getItem('toKen')
// // token 不存在
// if (token === null || token === '') {
// ElMessage.error('您还没有登录,请先登录')
// next('/login')
// } else {
// next()
// }
// }
next()
})