Browse Source

配置信息

AlvisLiu 1 year ago
parent
commit
8c0e77e307
3 changed files with 12 additions and 12 deletions
  1. 6 10
      public/config.js
  2. 1 1
      src/stores/user.js
  3. 5 1
      vite.config.js

+ 6 - 10
public/config.js

@@ -1,9 +1,7 @@
 // 本地开发环境
 const local = {
-  // oss: 'http://jnjymf_api.bozedu.top/',
-  // api: 'http://jnjymf_api.bozedu.top/',
-  oss: 'http://60.188.226.44:8090/',
-  api: 'http://60.188.226.44:8090/',
+  oss: 'http://jnjymf_api.bozedu.top/',
+  api: 'http://jnjymf_api.bozedu.top/',
   login: 'https://qqyxt.dev.bozedu.net/app/activityRating/home/login.html',
   origin: window.location.origin,
   wpsserver: 'http://47.99.64.200:3888/loading.html'
@@ -11,10 +9,8 @@ const local = {
 
 // 测试服环境
 const development = {
-  // oss: 'http://jnjymf_api.bozedu.top/',
-  // api: 'http://jnjymf_api.bozedu.top/',
-  oss: 'http://60.188.226.44:8090/',
-  api: 'http://60.188.226.44:8090/',
+  oss: 'http://jnjymf_api.bozedu.top/',
+  api: 'http://jnjymf_api.bozedu.top/',
   login: 'https://qqyxt.dev.bozedu.net/app/activityRating/home/login.html',
   origin: window.location.origin + '/app/jdbg/',
   wpsserver: 'http://47.99.64.200:3888/loading.html'
@@ -31,9 +27,9 @@ const production = {
 
 function isWhich() {
   if (window.location.href.includes('localhost')) {
-    return production
+    return local
   } else if (window.location.href.includes('bozedu')) {
-    return production
+    return development
   } else {
     return production
   }

+ 1 - 1
src/stores/user.js

@@ -1,5 +1,5 @@
 import { defineStore } from "pinia";
-// import local from './produ/lwj'
+// import local from './local/la'
 // localStorage.setItem(
 //   "userInfo",
 //   JSON.stringify(local)

+ 5 - 1
vite.config.js

@@ -14,7 +14,11 @@ export default defineConfig(({command}) => {
         ],
         build: {
             target: 'esnext'
-        },
+      },
+      server: {
+        host: '0.0.0.0',
+        port: 3011, // 设置您想要使用的端口号
+      },
         resolve: {
             alias: {
                 '~': resolve(__dirname, 'src'),