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
c2faef1c
Commit
c2faef1c
authored
Mar 08, 2022
by
崔佳豪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 首页光有产品类型时的异常问题
parent
9621d3aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
Site.js
src/layouts/Site.js
+1
-1
login.js
src/pages/user/login/login.js
+8
-1
No files found.
src/layouts/Site.js
View file @
c2faef1c
...
@@ -376,7 +376,7 @@ class Site {
...
@@ -376,7 +376,7 @@ class Site {
self
.
props
&&
self
.
props
&&
self
.
props
.
updateComplexConfig
&&
self
.
props
.
updateComplexConfig
&&
self
.
props
.
updateComplexConfig
({});
self
.
props
.
updateComplexConfig
({});
self
.
props
.
history
&&
self
.
props
.
history
.
push
(
self
.
globalConfig
.
homepage
?
?
`/?client=
${
self
.
globalConfig
.
client
}
`
);
self
.
props
.
history
&&
self
.
props
.
history
.
push
(
self
.
globalConfig
.
homepage
?
`/
${
self
.
globalConfig
.
homepage
}
`
:
`/?client=
${
self
.
globalConfig
.
client
}
`
);
// window.location.reload();
// window.location.reload();
window
.
share
.
event
.
emit
(
'triggerMicro'
,
this
.
props
.
global
);
window
.
share
.
event
.
emit
(
'triggerMicro'
,
this
.
props
.
global
);
});
});
...
...
src/pages/user/login/login.js
View file @
c2faef1c
...
@@ -223,11 +223,18 @@ class Login {
...
@@ -223,11 +223,18 @@ class Login {
if
(
result
&&
result
.
length
>
0
)
{
if
(
result
&&
result
.
length
>
0
)
{
const
config
=
result
.
shift
();
const
config
=
result
.
shift
();
const
homeType
=
config
.
productType
||
'civweb4'
;
const
homeType
=
config
.
productType
||
'civweb4'
;
// 产品类型和首页路径同时有才行
const
homepage
=
homeType
&&
(
params
.
getParams
(
'redirect'
)
||
config
.
homepage
)
?
homeType
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
config
.
homepage
)
:
''
;
self
.
globalConfig
=
Object
.
assign
(
self
.
globalConfig
,
config
,
{
self
.
globalConfig
=
Object
.
assign
(
self
.
globalConfig
,
config
,
{
theme
:
self
.
globalConfig
.
theme
,
theme
:
self
.
globalConfig
.
theme
,
menu
:
self
.
globalConfig
.
menu
,
menu
:
self
.
globalConfig
.
menu
,
style
:
self
.
globalConfig
.
style
,
style
:
self
.
globalConfig
.
style
,
homepage
:
home
Type
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
config
.
homepage
)
,
homepage
:
home
page
,
});
});
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
...
...
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