- 需要修改两处
- router/index.js
// 最下面的export中
model:'history'
//改为
model:'hash'
- .env.production文件
VUE_APP_BASE_API = '/prod-api'
// 改为
VUE_APP_BASE_API = './'
- 打包后的dist文件夹下的所有内容都复制到后端的src/resources/static文件夹下后端打包部署后访问8080即可
// 最下面的export中
model:'history'
//改为
model:'hash'
VUE_APP_BASE_API = '/prod-api'
// 改为
VUE_APP_BASE_API = './'