diff --git a/.env.prod b/.env.prod index 2d8ac12..de1da2c 100644 --- a/.env.prod +++ b/.env.prod @@ -16,6 +16,6 @@ VUE_APP_ALL_MENU = false # 微前端地址 VUE_APP_REMOTES_URL="http://119.45.158.12/common/" # 当前应用部署地址 -VUE_APP_EXPOSES_URL="" +VUE_APP_EXPOSES_URL="http://172.16.0.77/trainingbase/" # nginx路径 PUB_PATH:'/trainingbase/' \ No newline at end of file diff --git a/.env.prodLocal b/.env.prodLocal index ec978fe..1853471 100644 --- a/.env.prodLocal +++ b/.env.prodLocal @@ -16,6 +16,6 @@ VUE_APP_ALL_MENU = false # 微前端地址 VUE_APP_REMOTES_URL="http://119.45.158.12/common/" # 当前应用部署地址 -VUE_APP_EXPOSES_URL="http://192.168.1.66:8084/" +VUE_APP_EXPOSES_URL="http://192.168.1.66/dev/trainingbase/" # nginx路径 PUB_PATH:'/dev/trainingbase/' diff --git a/src/views/base.component.ts b/src/views/base.component.ts index ca72125..eb6a01f 100644 --- a/src/views/base.component.ts +++ b/src/views/base.component.ts @@ -152,8 +152,8 @@ export default class BaseComponent extends Vue { const options = layer.data.map((item,index)=>{ const option = {} as any if(item.hasPop && !item.model){ - const path = process.env.NODE_ENV === 'production'? process.env.PUB_PATH : '/' - option.popupURL = "http://192.168.1.66"+path+"#/popup?"+new URLSearchParams(layer.popData) + const path = process.env.NODE_ENV === 'production'? process.env.VUE_APP_EXPOSES_URL : 'http://192.168.1.66/' + option.popupURL = path+"#/popup?"+new URLSearchParams(layer.popData) } return Object.assign(option,{ id:item.id, diff --git a/vue.config.js b/vue.config.js index 801bea3..92dbe2f 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,7 +7,7 @@ const resolve = (dir)=>{ } module.exports = defineConfig({ publicPath: process.env.NODE_ENV === 'production' - ? process.env.PUB_PATH + ? process.env.VUE_APP_EXPOSES_URL : './', productionSourceMap:process.env.NODE_ENV!=="production", transpileDependencies: true,