Merge remote-tracking branch 'origin/master'

This commit is contained in:
danshihao
2022-11-14 15:45:17 +08:00
2 changed files with 23 additions and 0 deletions
+17
View File
@@ -48,3 +48,20 @@ yarn build
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
## 开发注意
需要单独启动nginx做本地文件的转发
####nginx中增加配置项
```
location /api/home/pic {
alias D:\\ProjectInformation\\library\\upload\\; #对应后台配置文件中的文件上传地址
}
```
#### vue.config.js -- proxy中增加配置项
```
// 请求静态图片配置项
'/api/home/pic': {
target: 'http://127.0.0.1:7061', // 图片请求的nginx网址
changeOrigin: true
}
```
+6
View File
@@ -14,7 +14,13 @@ module.exports = {
'/api': {
target: 'http://127.0.0.1:7060', // 服务器
changeOrigin: true,
},
// 请求静态图片配置项
'/api/home/pic': {
target: 'http://127.0.0.1:7061', // 图片请求的nginx网址
changeOrigin: true
}
}
},
chainWebpack: config => {