diff --git a/.env.development b/.env.development index 62ffa56..cd490ae 100644 --- a/.env.development +++ b/.env.development @@ -2,15 +2,16 @@ # @Author: AaronWu 2463371514@qq.com # @Date: 2025-03-31 15:12:17 # @LastEditors: AaronWu 2463371514@qq.com - # @LastEditTime: 2025-04-02 09:15:01 + # @LastEditTime: 2025-07-07 11:36:29 # @FilePath: /IssueSupportManage/.env.development # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE ### # 只在开发模式中被载入 # 网站前缀 -# VITE_BASE_API_URL = http://192.168.2.110:8089/server/ -VITE_BASE_API_URL = http://43.137.2.78:8085/server/ +# VITE_BASE_API_URL = http://192.168.2.64:8089/server/ +# VITE_BASE_API_URL = http://43.137.2.78:8085/server/ +VITE_BASE_API_URL = /server/ # base api VITE_BASE_API = '/server/' diff --git a/.env.production b/.env.production index 4477af4..6a058fa 100644 --- a/.env.production +++ b/.env.production @@ -2,14 +2,15 @@ # @Author: AaronWu 2463371514@qq.com # @Date: 2025-03-31 15:12:17 # @LastEditors: AaronWu 2463371514@qq.com - # @LastEditTime: 2025-04-02 09:15:19 + # @LastEditTime: 2025-07-07 11:52:04 # @FilePath: /IssueSupportManage/.env.production # @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE ### # 只在生产模式中被载入 # 网站前缀 -VITE_BASE_API_URL = http://question.supsub.cn:8085/server/ +# VITE_BASE_API_URL = http://question.supsub.cn:8085/server/ +VITE_BASE_API_URL = /server/ # base api VITE_BASE_API = '/server/' diff --git a/vite.config.ts b/vite.config.ts index 586cc52..7b1668c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -117,19 +117,19 @@ export default defineConfig({ server: { host: '0.0.0.0', port: 8088, - // proxy: { - // '/api': { - // target: 'https://nest-api.buqiyuan.site/api/', - // // target: 'http://localhost:7001', - // changeOrigin: true, - // rewrite: (path) => path.replace(/^\/api/, ''), - // }, - // '/ws-api': { - // target: 'wss://nest-api.buqiyuan.site', - // // target: 'http://localhost:7002', - // changeOrigin: true, //是否允许跨域 - // ws: true, - // }, - // }, + proxy: { + // http://43.137.2.78:8085/server/question/list + // '/api': { + // target: 'http://43.137.2.78:8085', + // changeOrigin: true, + // rewrite: (path) => path.replace(/^\/api/, '/server'), + // }, + '/server': { + // target: 'http://43.137.2.78:8085', + target: 'http://192.168.2.64:8089', + changeOrigin: true, + rewrite: (path) => path.replace(/^\/server/, ''), + }, + }, }, });