From bec58fa7fe4fae2deac88200d8d939e12ec8a08f Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期五, 03 十月 2025 22:26:39 +0800
Subject: [PATCH] 修复小程序WXS日期显示问题并重新设计【我的】页面

---
 web/src/router/index.ts |  101 +++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 82 insertions(+), 19 deletions(-)

diff --git a/web/src/router/index.ts b/web/src/router/index.ts
index 854f6f1..617baaf 100644
--- a/web/src/router/index.ts
+++ b/web/src/router/index.ts
@@ -1,4 +1,5 @@
 import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
+import { isLoggedIn } from '@/utils/auth'
 
 const routes: RouteRecordRaw[] = [
   {
@@ -12,17 +13,12 @@
         component: () => import('@/views/dashboard/index.vue'),
         meta: { title: '宸ヤ綔鍙�', icon: 'Grid' }
       },
+
       {
         path: '/activity',
         name: 'Activity',
-        component: () => import('@/views/activity/index.vue'),
+        component: () => import('@/views/activity-list.vue'),
         meta: { title: '姣旇禌绠$悊', icon: 'Trophy' }
-      },
-      {
-        path: '/activity/:id',
-        name: 'ActivityDetail',
-        component: () => import('@/views/ActivityDetail.vue'),
-        meta: { title: '姣旇禌璇︽儏', icon: 'Trophy' }
       },
       {
         path: '/activity/new',
@@ -37,34 +33,46 @@
         meta: { title: '缂栬緫姣旇禌', icon: 'Trophy' }
       },
       {
+        path: '/activity/:id',
+        name: 'ActivityDetail',
+        component: () => import('@/views/ActivityDetail.vue'),
+        meta: { title: '姣旇禌璇︽儏', icon: 'Trophy' }
+      },
+      {
         path: '/judge',
         name: 'Judge',
-        component: () => import('@/views/judge/index.vue'),
+        component: () => import('@/views/judge-list.vue'),
         meta: { title: '璇勫绠$悊', icon: 'UserFilled' }
       },
       {
         path: '/rating-scheme',
         name: 'RatingScheme',
-        component: () => import('@/views/rating/index.vue'),
-        meta: { title: '璇勫垎妯℃澘', icon: 'Score' }
+        component: () => import('@/views/rating-list.vue'),
+        meta: { title: '璇勫垎妯℃澘', icon: 'Document' }
       },
       {
         path: '/rating-scheme/new',
         name: 'RatingSchemeCreate',
-        component: () => import('@/views/rating/Form.vue'),
-        meta: { title: '鏂板璇勫垎妯℃澘', icon: 'Score' }
+        component: () => import('@/views/rating-detail.vue'),
+        meta: { title: '鏂板缓璇勫垎妯℃澘', hidden: true }
       },
       {
         path: '/rating-scheme/edit/:id',
         name: 'RatingSchemeEdit',
-        component: () => import('@/views/rating/Form.vue'),
-        meta: { title: '缂栬緫璇勫垎妯℃澘', icon: 'Score' }
+        component: () => import('@/views/rating-detail.vue'),
+        meta: { title: '缂栬緫璇勫垎妯℃澘', hidden: true }
       },
       {
         path: '/player',
         name: 'Player',
-        component: () => import('@/views/player/index.vue'),
-        meta: { title: '姣旇禌鎶ュ悕', icon: 'UserFilled' }
+        component: () => import('@/views/check-list.vue'),
+        meta: { title: '鍙傝禌浜哄憳', icon: 'UserFilled' }
+      },
+      {
+        path: '/player/:id/detail',
+        name: 'PlayerDetail',
+        component: () => import('@/views/check-detail.vue'),
+        meta: { title: '鍙傝禌浜哄憳璇︽儏' }
       },
       {
         path: '/activity-player/:id/rating',
@@ -87,9 +95,40 @@
       {
         path: '/employee',
         name: 'Employee',
-        component: () => import('@/views/employee/index.vue'),
-        meta: { title: '鍛樺伐绠$悊', icon: 'Avatar' }
-      }
+        component: () => import('@/views/employee-list.vue'),
+        meta: { title: '鍛樺伐绠$悊', icon: 'User' }
+      },
+      {
+        path: '/project-review',
+        name: 'ProjectReview',
+        component: () => import('@/views/review-list.vue'),
+        meta: { title: '椤圭洰璇勫', icon: 'View' }
+      },
+      {
+        path: '/project-review/:id/detail',
+        name: 'ProjectReviewDetail',
+        component: () => import('@/views/review-detail.vue'),
+        meta: { title: '椤圭洰璇勫璇︽儏', hidden: true }
+      },
+      {
+        path: '/review',
+        name: 'Review',
+        component: () => import('@/views/judge-review-list.vue'),
+        meta: { title: '璇勫璇勫', icon: 'Edit' }
+      },
+      {
+        path: '/review/:id/detail',
+        name: 'ReviewDetail',
+        component: () => import('@/views/judge-review-detail.vue'),
+        meta: { title: '璇勫璇勫璇︽儏', hidden: true }
+      },
+      {
+        path: '/competition-promotion',
+        name: 'CompetitionPromotion',
+        component: () => import('@/views/next-list.vue'),
+        meta: { title: '姣旇禌鏅嬬骇', icon: 'Promotion' }
+      },
+
     ]
   },
   {
@@ -105,4 +144,28 @@
   routes
 })
 
+// 璺敱瀹堝崼
+router.beforeEach((to, from, next) => {
+  // 濡傛灉鏄櫥褰曢〉闈紝鐩存帴鏀捐
+  if (to.path === '/login') {
+    // 濡傛灉宸茬粡鐧诲綍锛岄噸瀹氬悜鍒伴椤�
+    if (isLoggedIn()) {
+      next('/')
+    } else {
+      next()
+    }
+    return
+  }
+
+  // 妫�鏌ユ槸鍚﹀凡鐧诲綍
+  if (!isLoggedIn()) {
+    // 鏈櫥褰曪紝閲嶅畾鍚戝埌鐧诲綍椤�
+    next('/login')
+    return
+  }
+
+  // 宸茬櫥褰曪紝姝e父璁块棶
+  next()
+})
+
 export default router
\ No newline at end of file

--
Gitblit v1.8.0