Commit 490f8dcf authored by youjie's avatar youjie

no message

parent 1251dbb3
import type { NavigationGuardNext, RouteLocationNormalized } from 'vue-router'
import { useUserStore } from '@/stores/user'
// 白名单路由(不需要登录即可访问)
const whiteList = ['/login', '/register', '/forgePassword', '/', '/home']
const whiteListRegex = [/\/oa\//]
export const createPermissionGuard = (
to: RouteLocationNormalized,
from: RouteLocationNormalized,
next: NavigationGuardNext,
) => {
// console.log(to.path)
// const userStore = useUserStore()
// const pageTitle = to.matched.find((item) => item.meta.title)
// //const menus = userStore.getFlattenMenus
// if (pageTitle) {
// document.title = `${pageTitle.meta.title} - ${webSiteName}`
// } else {
// document.title = webSiteName
// }
// // 检查是否是白名单路由
// if (whiteList.includes(to.path)) {
// next()
// return
// }
const userStore = useUserStore()
//const menus = userStore.getFlattenMenus
// 检查是否是白名单路由
if (whiteList.includes(to.path)) {
next()
return
}
// if (whiteListRegex.some((regex) => regex.test(to.path))) {
// next()
// return
// }
// // 检查用户是否登录
// if (!userStore.getUserToken) {
// next('/login')
// return
// }
if (whiteListRegex.some((regex) => regex.test(to.path))) {
next()
return
}
// 检查用户是否登录
if (!userStore.getUserToken) {
next('/login')
return
}
next()
}
......@@ -215,7 +215,7 @@
</div>
</div>
<div class="flex justify-center text-white pb-[117px] text-[16px]">
<div class="px-[17px] py-[40px] cursor-pointer" @click="goHome('/home')">{{ t('login.backToHome') }}</div>
<div class="px-[17px] py-[40px] cursor-pointer" @click="goHome('/')">{{ t('login.backToHome') }}</div>
</div>
</div>
<registerSuccess v-if="currentStep==3" />
......
......@@ -79,12 +79,12 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(rbg(var(--gray-6)));
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
......@@ -79,12 +79,12 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(rbg(var(--gray-6)));
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
......@@ -79,12 +79,12 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(rbg(var(--gray-6)));
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
......@@ -79,12 +79,12 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(rbg(var(--gray-6)));
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
......@@ -79,12 +79,12 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(rbg(var(--gray-6)));
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
......@@ -233,7 +233,7 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-bin{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
.myOrder-status:hover{
color: rgb(var(--arcoblue-6));
......@@ -261,19 +261,19 @@ const handleDivScroll = (e: any) => {
color: rgb(var(--arcoblue-9));
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.orderType-down{
background: #F3F3F2;
color: rgb(rbg(var(--gray-5)));
color: rgb(var(--gray-5));
}
.orderType-text{
color: rgb(rbg(var(--gray-5)));
color: rgb(var(--gray-5));
}
.orderType-text:hover{
color: rgb(rbg(var(--gray-5)));
color: rgb(var(--gray-5));
}
</style>
\ No newline at end of file
......@@ -117,12 +117,12 @@ const handleDivScroll = (e: any) => {
background: #FBFBFA;
}
.myOrder-text-l{
color: rgb(rbg(var(--gray-7)));
color: rgb(var(--gray-7));
}
:deep(.arco-scrollbar-track-direction-vertical){
display: none;
}
.myOrder-time{
color: rgb(rbg(var(--gray-6)));
color: rgb(var(--gray-6));
}
</style>
\ No newline at end of file
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