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
ffe3cbe4
Commit
ffe3cbe4
authored
Sep 17, 2020
by
ZhengJie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[代码完善](v2.6): 适配Nginx反向代理部署/工信部地址更新
parent
b4b8e5fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
6 deletions
+5
-6
.env.production
+1
-1
src/layout/components/AppMain.vue
+1
-1
src/router/index.js
+3
-4
No files found.
.env.production
View file @
ffe3cbe4
ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',
后续文档更新 Nginx 反向部署教程
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',
文件查看 Docker 部署篇,Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
VUE_APP_BASE_API = 'https://api.auauz.net'
# 如果接口是 http 形式, wss 需要改为 ws
...
...
src/layout/components/AppMain.vue
View file @
ffe3cbe4
...
...
@@ -8,7 +8,7 @@
<div
v-if=
"$store.state.settings.showFooter"
id=
"el-main-footer"
>
<span
v-html=
"$store.state.settings.footerTxt"
/>
<span>
⋅
</span>
<a
href=
"http
://www.beian.miit.gov.cn
"
target=
"_blank"
>
{{
$store
.
state
.
settings
.
caseNumber
}}
</a>
<a
href=
"http
s://beian.miit.gov.cn/#/Integrated/index
"
target=
"_blank"
>
{{
$store
.
state
.
settings
.
caseNumber
}}
</a>
</div>
</section>
</
template
>
...
...
src/router/index.js
View file @
ffe3cbe4
...
...
@@ -23,11 +23,10 @@ router.beforeEach((to, from, next) => {
NProgress
.
done
()
}
else
{
if
(
store
.
getters
.
roles
.
length
===
0
)
{
// 判断当前用户是否已拉取完user_info信息
store
.
dispatch
(
'GetInfo'
).
then
(
res
=>
{
// 拉取user_info
store
.
dispatch
(
'GetInfo'
).
then
(
()
=>
{
// 拉取user_info
// 动态路由,拉取菜单
loadMenus
(
next
,
to
)
}).
catch
((
err
)
=>
{
console
.
log
(
err
)
}).
catch
(()
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
location
.
reload
()
// 为了重新实例化vue-router对象 避免bug
})
...
...
@@ -35,7 +34,7 @@ router.beforeEach((to, from, next) => {
// 登录时未拉取 菜单,在此处拉取
}
else
if
(
store
.
getters
.
loadMenus
)
{
// 修改成false,防止死循环
store
.
dispatch
(
'updateLoadMenus'
)
.
then
(
res
=>
{})
store
.
dispatch
(
'updateLoadMenus'
)
loadMenus
(
next
,
to
)
}
else
{
next
()
...
...
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