[代码完善](v2.6): 适配Nginx反向代理部署,部署文档后续更新

This commit is contained in:
ZhengJie
2020-09-15 20:21:26 +08:00
parent 1cd3b3b684
commit b4b8e5fd34
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',后续文档更新 Nginx 反向部署教程
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
VUE_APP_BASE_API = 'https://api.auauz.net'
# 如果接口是 http 形式, wss 需要改为 ws

View File

@@ -1,4 +1,5 @@
const baseUrl = process.env.VUE_APP_BASE_API
// 适配 Nginx 反向代理
const baseUrl = process.env.VUE_APP_BASE_API === '/' ? '' : process.env.VUE_APP_BASE_API
const api = {
state: {
// 部署包上传