Jelajahi Sumber

feat: 登录问题修改

sunxiao 3 minggu lalu
induk
melakukan
70294c7751
8 mengubah file dengan 23 tambahan dan 21 penghapusan
  1. 3 3
      .env.development
  2. 2 2
      .env.production
  3. 4 3
      .env.test
  4. 6 6
      deploy/config.js
  5. 4 3
      deploy/index.js
  6. 1 1
      src/layout/components/Navbar.vue
  7. 2 2
      src/views/login.vue
  8. 1 1
      vite.config.js

+ 3 - 3
.env.development

@@ -5,8 +5,8 @@ VITE_APP_TITLE = LibraAI智能体运营平台
 VITE_APP_ENV = 'development'
 
 # 管理系统/开发环境
-VITE_APP_BASE_API =  ''
+VITE_APP_BASE_API =  'http://192.168.40.18:8080/'
 # VITE_APP_BASE_API = 'http://192.168.9.54:8080/'
 
-VITE_APP_BASE_TEST = http://10.0.0.28:8080/
-VITE_APP_BASE_PROD = http://192.168.9.54:8080/
+VITE_APP_BASE_TEST = http://192.168.40.21:8080/
+VITE_APP_BASE_PROD = http://192.168.40.18:8080/

+ 2 - 2
.env.production

@@ -10,5 +10,5 @@ VITE_APP_BASE_API = '/apiServe/'
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
 
-VITE_APP_BASE_TEST = http://192.168.40.18:8080/
-VITE_APP_BASE_PROD = http://192.168.9.54:8080/
+VITE_APP_BASE_TEST = http://192.168.40.21:8080/
+VITE_APP_BASE_PROD = http://192.168.40.18:8080/

+ 4 - 3
.env.test

@@ -3,9 +3,10 @@ VITE_APP_TITLE = LibraAI智能体运营平台
 
 # 开发环境配置
 VITE_APP_ENV = 'development'
+VITE_APP_BASE_API = ''
 
 # 管理系统/开发环境
-VITE_APP_BASE_API = http://10.0.0.28:8080/
+VITE_APP_BASE_API = http://192.168.40.21:8080/
 
-VITE_APP_BASE_TEST = http://10.0.0.28:8080/
-VITE_APP_BASE_PROD = http://192.168.9.54:8080/
+VITE_APP_BASE_TEST = http://192.168.40.21:8080/
+VITE_APP_BASE_PROD = http://192.168.40.18:8080/

+ 6 - 6
deploy/config.js

@@ -4,23 +4,23 @@ export const config = [
     nodeEnv: "test",
     name: "测试环境",
     domain: "",
-    host: "10.0.0.28",
+    host: "192.168.40.21",
     port: "22",
     username: "root",
     password: "hsmysql",
-    path: "/data/node_web/modelAdmin",
-    removepath: "/data/node_web/modelAdmin"
+    path: "/usr/share/nginx/admin-html",
+    removepath: "/usr/share/nginx/admin-html"
   },
   {
     id: 1,
     nodeEnv: "prod",
     name: "生产环境",
     domain: "",
-    host: "192.168.9.54",
+    host: "192.168.40.18",
     port: "22",
     username: "root",
     password: "admin1,xxh",
-    path: "/data/node_web/modelAdmin",
-    removepath: "/data/node_web/modelAdmin"
+    path: "/data/node_web/big_model_admin",
+    removepath: "/data/node_web/big_model_admin"
   },
 ];

+ 4 - 3
deploy/index.js

@@ -93,10 +93,11 @@ const connectShell = async () => {
       spinner.stop();
 
       // if (filterStage === 'prod') {
-      execRemoteCommand()
+      // execRemoteCommand()
       // }
-
-      printMsg({ color: 'green', text: '上传完成,准备指令中' });
+      
+      printMsg({ color: 'green', text: '部署完成' });
+      // printMsg({ color: 'green', text: '上传完成,准备指令中' });
       sftp.end();
     })
     .catch((err) => {

+ 1 - 1
src/layout/components/Navbar.vue

@@ -92,7 +92,7 @@ function logout() {
     type: 'warning'
   }).then(() => {
     userStore.logOut().then(() => {
-      location.href = '/index';
+      location.href = '/admin/index';
     })
   }).catch(() => { });
 }

+ 2 - 2
src/views/login.vue

@@ -74,8 +74,8 @@ const router = useRouter();
 const { proxy } = getCurrentInstance();
 
 const loginForm = ref({
-  username: "admin",
-  password: "admin123",
+  username: "",
+  password: "",
   rememberMe: false,
   code: "",
   uuid: ""

+ 1 - 1
vite.config.js

@@ -12,7 +12,7 @@ export default defineConfig(({ mode, command }) => {
     // 部署生产环境和开发环境下的URL。
     // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
     // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
-    base: VITE_APP_ENV === 'production' ? '/admin/' : '/',
+    base: VITE_APP_ENV === 'production' ? '/admin/' : '/admin/',
     plugins: createVitePlugins(env, command === 'build'),
     resolve: {
       // https://cn.vitejs.dev/config/#resolve-alias