From f857144ed95af59d750064ae79223ea63627896d Mon Sep 17 00:00:00 2001 From: lSun <15893999301@qq.com> Date: Mon, 20 Oct 2025 10:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E5=83=8F=E8=AF=84=E4=BC=B0=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- src/router/index.js | 2 +- src/utils/request.js | 2 +- src/utils/request_formdata.js | 2 +- vue.config.js | 5 +++-- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index 2f77950..9cbf1ce 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ ENV = 'development' VUE_APP_ENV = 'development' # 图像评估与自动标注系统/开发环境 -VUE_APP_BASE_API = '/dev-api' +VUE_APP_BASE_API = '/image-api' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production index 5ce6fe2..40ef226 100644 --- a/.env.production +++ b/.env.production @@ -6,4 +6,4 @@ ENV = 'production' VUE_APP_ENV = 'production' # 图像评估与自动标注系统/生产环境 -VUE_APP_BASE_API = '/bnscloud' +VUE_APP_BASE_API = '/image-api' diff --git a/src/router/index.js b/src/router/index.js index 912325d..9226805 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -266,5 +266,5 @@ export default new Router({ mode: 'history', // 去掉url中的# scrollBehavior: () => ({y: 0}), routes: constantRoutes, - base: process.env.VUE_APP_ENV === 'production' ? '/pubSerPlatform' : '', + base: process.env.VUE_APP_ENV === 'production' ? '/image' : '', }) diff --git a/src/utils/request.js b/src/utils/request.js index 8a8de19..cee39f7 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -123,7 +123,7 @@ service.interceptors.response.use( store.dispatch('LogOut').then(() => { location.href = process.env.VUE_APP_ENV === 'production' - ? '/pubSerPlatform/index' + ? '/image/index' : '/index' }) }) diff --git a/src/utils/request_formdata.js b/src/utils/request_formdata.js index 333cd87..c82a9ad 100644 --- a/src/utils/request_formdata.js +++ b/src/utils/request_formdata.js @@ -132,7 +132,7 @@ service.interceptors.response.use( store.dispatch('LogOut').then(() => { location.href = process.env.VUE_APP_ENV === 'production' - ? '/pubSerPlatform/index' + ? '/image/index' : '/index' }) }) diff --git a/vue.config.js b/vue.config.js index 0dbba07..4b1626d 100644 --- a/vue.config.js +++ b/vue.config.js @@ -19,7 +19,7 @@ module.exports = { // 部署生产环境和开发环境下的URL。 // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 - publicPath: process.env.NODE_ENV === 'production' ? '/pubSerPlatform' : '/', + publicPath: process.env.NODE_ENV === 'production' ? '/image' : '/', // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist) outputDir: 'dist', // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下) @@ -37,7 +37,8 @@ module.exports = { [process.env.VUE_APP_BASE_API]: { // target: 'http://192.168.0.7:58080/bnscloud', // 产线环境 // target: 'http://192.168.0.14:1999/bnscloud', // 测试环境 - target: 'http://192.168.0.50:58080/bnscloud', // 测试环境 + // target: 'http://192.168.0.50:58080/caption', // 本地环境 + target: 'http://192.168.0.38:58080/image', // 测试环境 changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '',