From 3e770bd775ae34ab52058cceb42ff534f965b8b6 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 29 Mar 2025 10:13:14 +0800
Subject: [PATCH] fix: 字体包路径错误

---
 src/router/page/index.js  |    5 -----
 src/styles/font.scss      |    8 ++++----
 src/router/views/index.js |    4 ++--
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/router/page/index.js b/src/router/page/index.js
index b2706fc..be1abbb 100644
--- a/src/router/page/index.js
+++ b/src/router/page/index.js
@@ -64,9 +64,4 @@
       isAuth: false,
     },
   },
-  {
-    path: '/',
-    name: '主页',
-    redirect: '/index',
-  },
 ];
diff --git a/src/router/views/index.js b/src/router/views/index.js
index ca625a3..0b49d90 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -5,10 +5,10 @@
   {
     path: '/',
     component: () => import('@/layout/index.vue'),
-    redirect: '/index',
+    redirect: '/home',
     children: [
       {
-        path: 'index',
+        path: 'home',
         name: '首页',
         meta: {
           i18n: 'dashboard',
diff --git a/src/styles/font.scss b/src/styles/font.scss
index de211bd..889fede 100644
--- a/src/styles/font.scss
+++ b/src/styles/font.scss
@@ -1,20 +1,20 @@
 @font-face {
   font-family: "Source Han Sans CN";
-  src: url("/src/assets/fonts/SourceHanSansCN-Regular.otf") format("opentype");
+  src: url("@/assets/fonts/SourceHanSansCN-Regular.otf") format("opentype");
   font-weight: 400;
   font-style: normal;
 }
 
 @font-face {
   font-family: "Source Han Sans CN";
-  src: url("/src/assets/fonts/SourceHanSansCN-Medium.otf") format("opentype");
+  src: url("@/assets/fonts/SourceHanSansCN-Medium.otf") format("opentype");
   font-weight: 500;
   font-style: normal;
 }
 
 @font-face {
   font-family: "Source Han Sans CN";
-  src: url("/src/assets/fonts/SourceHanSansCN-Bold.otf") format("opentype");
+  src: url("@/assets/fonts/SourceHanSansCN-Bold.otf") format("opentype");
   font-weight: 700;
   font-style: normal;
 }
@@ -22,7 +22,7 @@
 /* 额外的标题字体 */
 @font-face {
   font-family: "YouSheBiaoTiHei";
-  src: url("/src/assets/fonts/YouSheBiaoTiHei.ttf") format("truetype");
+  src: url("@/assets/fonts/YouSheBiaoTiHei.ttf") format("truetype");
   font-weight: normal;
   font-style: normal;
 }

--
Gitblit v1.9.3