Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
7668e3f2
Commit
7668e3f2
authored
Apr 14, 2022
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 优化获取站点信息
parent
b598913e
Pipeline
#47904
skipped with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
+8
-16
Site.js
src/layouts/Site.js
+8
-16
No files found.
src/layouts/Site.js
View file @
7668e3f2
...
...
@@ -337,13 +337,13 @@ class Site {
self
.
props
.
updateCurrentIndex
&&
self
.
props
.
updateCurrentIndex
(
-
1
);
const
login
=
new
Login
(
this
.
props
,
()
=>
{
self
.
setLoading
(
false
);
self
.
getCityStationsForUser
().
then
(
res
=>
{
window
.
share
.
event
.
emit
(
'updateSite'
,
res
);
});
// eslint-disable-next-line no-unused-expressions
self
.
props
.
updateCurrentIndex
&&
self
.
props
.
updateCurrentIndex
(
0
);
// debugger
// initMicroApps();
// 切换站点后,重置掉三级菜单
const
homeType
=
self
.
globalConfig
.
homeType
||
'civweb4'
;
const
homePath
=
self
.
globalConfig
.
homepage
?
self
.
globalConfig
.
homepage
.
startsWith
(
homeType
)
?
self
.
globalConfig
.
homepage
:
`/
${
homeType
}
/
${
self
.
globalConfig
.
homepage
}
`
:
`/
${
homeType
}
`
;
...
...
@@ -355,20 +355,12 @@ class Site {
// 重新加载订阅消息铃铛
window
.
share
&&
window
.
share
.
event
&&
window
.
share
.
event
.
emit
(
'reloadNotice'
);
const
config
=
self
.
globalConfig
;
let
url
=
!
config
.
home
?
((
config
.
homepage
===
''
||
_
.
isNull
(
config
.
homepage
))
?
`/civweb4`
:
`/civweb4/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
).
replace
(
/^civweb4
\/
/
,
''
)}
`
)
:
`/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
)}
`
;
self
.
props
.
history
&&
self
.
props
.
history
.
push
(
url
)
self
.
getCityStationsForUser
().
then
(
res
=>
{
debugger
window
.
share
.
event
.
emit
(
'updateSite'
,
res
);
});
self
.
props
&&
self
.
props
.
updateCollapsed
&&
self
.
props
.
updateCollapsed
(
false
);
const
config
=
self
.
globalConfig
;
let
url
=
!
config
.
home
?
((
config
.
homepage
===
''
||
_
.
isNull
(
config
.
homepage
))
?
`/civweb4`
:
`/civweb4/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
).
replace
(
/^civweb4
\/
/
,
''
)}
`
)
:
`/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
)}
`
;
self
.
props
.
history
&&
self
.
props
.
history
.
push
(
url
);
self
.
props
&&
self
.
props
.
updateCollapsed
&&
self
.
props
.
updateCollapsed
(
false
);
window
.
share
.
event
.
emit
(
'triggerMicro'
,
this
.
props
.
global
);
//
onChangeVisible && onChangeVisible(false);
onChangeVisible
&&
onChangeVisible
(
false
);
});
login
.
init
();
}
...
...
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