部署配置
This commit is contained in:
parent
fee00d4d9b
commit
2c459acd37
|
|
@ -6,5 +6,5 @@ ENV = 'production'
|
|||
VUE_APP_ENV = 'production'
|
||||
|
||||
# 安薪宝一体化平台/生产环境
|
||||
VUE_APP_BASE_API = '/gs-real-name-prod-api
|
||||
VUE_APP_BASE_API = '/gs-real-name
|
||||
'
|
||||
|
|
|
|||
|
|
@ -266,5 +266,5 @@ export default new Router({
|
|||
mode: 'history', // 去掉url中的#
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRoutes,
|
||||
base: process.env.VUE_APP_ENV === 'production' ? '/gs-real-name' : '',
|
||||
base: process.env.VUE_APP_ENV === 'production' ? '/gs-realname' : '',
|
||||
})
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ module.exports = {
|
|||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/gs-real-name' : '/',
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/gs-realname' : '/',
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
|
@ -35,10 +35,10 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://192.168.2.209:38080`,
|
||||
target: `http://127.0.0.1:37080/gs-real-name`,
|
||||
// target: `http://192.168.0.38:38080`,
|
||||
// target: `http://192.168.0.244:18877`,
|
||||
target: `http://192.168.0.14:1999/hd-real-name/`, // 测试环境
|
||||
// target: `http://192.168.0.14:1999/gs-real-name`, // 测试环境
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue