Commit 490f8dcf authored by youjie's avatar youjie

no message

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