Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
front-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
front-backend
Commits
b4b8e5fd
Commit
b4b8e5fd
authored
Sep 15, 2020
by
ZhengJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[代码完善](v2.6): 适配Nginx反向代理部署,部署文档后续更新
parent
1cd3b3b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
.env.production
+1
-0
src/store/modules/api.js
+2
-1
No files found.
.env.production
View file @
b4b8e5fd
ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',后续文档更新 Nginx 反向部署教程
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
VUE_APP_BASE_API = 'https://api.auauz.net'
# 如果接口是 http 形式, wss 需要改为 ws
...
...
src/store/modules/api.js
View file @
b4b8e5fd
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
:
{
// 部署包上传
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment