From 860406f6cb16c77621a5f583a5214f9f3e370eb0 Mon Sep 17 00:00:00 2001
From: 王恒 <318726284@qq.com>
Date: 星期三, 06 八月 2025 17:14:45 +0800
Subject: [PATCH] '更换域名'

---
 vite.config.ts                   |    7 ++++---
 .gitignore                       |    1 +
 src/layout/components/Navbar.vue |    3 ++-
 .env.production                  |    5 +++--
 src/router/index.ts              |    3 ++-
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/.env.production b/.env.production
index 6763065..ff2604c 100644
--- a/.env.production
+++ b/.env.production
@@ -5,10 +5,11 @@
 VITE_APP_ENV = 'production'
 
 #鍩虹鍩熷悕
-VITE_APP_BASE = 'https://jmy.jinmingyuan.com'
+# VITE_APP_BASE = 'https://cxsm.jinmingyuan.com'
+VITE_APP_BASE = 'http://36.108.168.12:9000'
 
 # 鍏ヤ紒鎵爜/鐢熶骇鐜
-VITE_APP_BASE_API = '/sqys-prod-api'
+VITE_APP_BASE_API = '/smrq-api'
 
 # 鏄惁鍦ㄦ墦鍖呮椂寮�鍚帇缂╋紝鏀寔 gzip 鍜� brotli
 VITE_BUILD_COMPRESS = gzip
diff --git a/.gitignore b/.gitignore
index faf41b4..7cd724b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
 .DS_Store
 node_modules/
 ctomsWeb/
+dist/
 npm-debug.log*
 yarn-debug.log*
 yarn-error.log*
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index 637788c..9d6e6cc 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -99,7 +99,8 @@
   })
     .then(() => {
       userStore.logOut().then(() => {
-        location.href = "/sqys-web/index";
+        // location.href = "/sqys-web/index";
+        location.href = "/smrq/index";
       });
     })
     .catch(() => {});
diff --git a/src/router/index.ts b/src/router/index.ts
index 7796cc6..fd6de43 100644
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -166,7 +166,8 @@
 ];
 
 const router = createRouter({
-  history: createWebHistory("/sqys-web/"),
+  // history: createWebHistory("/sqys-web/"),
+  history: createWebHistory("/smrq/"),
   routes: constantRoutes,
   scrollBehavior(to, from, savedPosition) {
     if (savedPosition) {
diff --git a/vite.config.ts b/vite.config.ts
index 8b472ee..67bba11 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -9,7 +9,8 @@
     // 閮ㄧ讲鐢熶骇鐜鍜屽紑鍙戠幆澧冧笅鐨刄RL銆�
     // 榛樿鎯呭喌涓嬶紝vite 浼氬亣璁句綘鐨勫簲鐢ㄦ槸琚儴缃插湪涓�涓煙鍚嶇殑鏍硅矾寰勪笂
     // 渚嬪 https://www.ruoyi.vip/銆傚鏋滃簲鐢ㄨ閮ㄧ讲鍦ㄤ竴涓瓙璺緞涓婏紝浣犲氨闇�瑕佺敤杩欎釜閫夐」鎸囧畾杩欎釜瀛愯矾寰勩�備緥濡傦紝濡傛灉浣犵殑搴旂敤琚儴缃插湪 https://www.ruoyi.vip/admin/锛屽垯璁剧疆 baseUrl 涓� /admin/銆�
-    base: VITE_APP_ENV === "production" ? "/sqys-web/" : "/",
+    // 娴嬭瘯鐜 sqys-web  姝e紡鐜 smrq
+    base: VITE_APP_ENV === "production" ? "/smrq/" : "/",
     plugins: [...createVitePlugins(env, command === "build")],
     resolve: {
       // https://cn.vitejs.dev/config/#resolve-alias
@@ -32,10 +33,10 @@
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, ""),
         },
-        "/sqys-prod-api": {
+        "/smrq-api": {
           target: VITE_APP_BASE,
           changeOrigin: true,
-          rewrite: (p) => p.replace(/^\/sqys-prod-api/, ""),
+          rewrite: (p) => p.replace(/^\/smrq-api/, ""),
         },
       },
       port: 81,

--
Gitblit v1.9.1