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
5987ec34
Commit
5987ec34
authored
3 years ago
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改首页问题
parent
0443c331
Pipeline
#42082
passed with stages
in 1 minute 52 seconds
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
22 deletions
+14
-22
ExtendRightContent.js
src/components/GlobalHeader/ExtendRightContent.js
+1
-1
BasicLayout.js
src/layouts/BasicLayout.js
+1
-1
Site.js
src/layouts/Site.js
+1
-1
micro.js
src/micro.js
+7
-12
login.js
src/pages/user/login/login.js
+4
-7
No files found.
src/components/GlobalHeader/ExtendRightContent.js
View file @
5987ec34
...
...
@@ -125,7 +125,7 @@ const GlobalHeaderRight = props => {
const
url
=
_
.
isString
(
props
.
global
.
get
(
'homepage'
))
?
props
.
global
.
get
(
'homepage'
)
:
props
.
global
.
get
(
'homepage.url'
);
window
.
share
.
event
.
emit
(
'goHome'
,
`/
civbase/civweb4/
${
url
}
`
);
window
.
share
.
event
.
emit
(
'goHome'
,
`/
${
url
}
`
);
url
?
(
window
.
share
.
event
.
emit
(
'listenerMointer'
,
{
label
:
'首页'
,
...
...
This diff is collapsed.
Click to expand it.
src/layouts/BasicLayout.js
View file @
5987ec34
...
...
@@ -839,7 +839,7 @@ const BasicLayout = props => {
if
(
lastIndex
>=
0
)
{
history
.
push
(
newTabList
[
lastIndex
].
path
);
}
else
{
history
.
replace
(
`/
civweb4/
${
props
.
global
.
homepage
}
`
);
history
.
replace
(
`/
${
props
.
global
.
homepage
}
`
);
}
props
.
updateSelectedKeys
(
newActiveKey
);
props
.
updatePathname
(
newActiveKey
);
...
...
This diff is collapsed.
Click to expand it.
src/layouts/Site.js
View file @
5987ec34
...
...
@@ -345,7 +345,7 @@ class Site {
window
.
history
.
replaceState
(
''
,
''
,
`/
civbase/civweb4/
${
self
.
globalConfig
.
homepage
}
`
,
`/
${
self
.
globalConfig
.
homepage
}
`
,
);
self
.
getCityStationsForUser
().
then
(
res
=>
{
window
.
share
.
event
.
emit
(
'updateSite'
,
res
);
...
...
This diff is collapsed.
Click to expand it.
src/micro.js
View file @
5987ec34
...
...
@@ -211,23 +211,18 @@ export const defaultApp = () => {
const
config
=
createStoreage
.
get
(
'globalConfig'
);
if
(
config
&&
config
.
token
)
{
const
basePath
=
config
.
homepage
!==
''
&&
FILTER_FOLER_REG
.
test
(
config
.
homepage
)
?
'civweb4'
:
'civweb4'
;
if
(
config
&&
config
.
home
)
{
setDefaultMountApp
(
`/civbase/
${
config
.
home
.
path
.
replace
(
/^
\/
/
,
''
)}
`
);
}
else
{
const
homepage
=
_
.
isNull
(
config
.
homepage
)
?
'/index'
:
'/'
+
config
.
homepage
;
setDefaultMountApp
(
`/
${
pkg
.
name
.
toLocaleLowerCase
()}
/
${
basePath
}${
homepage
}
`
);
createStoreage
.
set
(
'init_web4'
,
true
)
}
// if(config.productType && config.productType !== 'civweb4') {
// setDefaultMountApp(`/civbase/${config.productType}/${config.homepage.replace(/^\//, '')}`);
// const basePath =config.homepage !== '' && FILTER_FOLER_REG.test(config.homepage) ?'civweb4' :'civweb4';
// if(config && config.home) {
// setDefaultMountApp(`/civbase/${config.home.path.replace(/^\//, '')}`);
// } else {
// const homepage = _.isNull(config.homepage) ? '/index': '/' + config.homepage;
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/
civweb4
${homepage}`);
// setDefaultMountApp(`/${pkg.name.toLocaleLowerCase()}/
${basePath}
${homepage}`);
// createStoreage.set('init_web4', true)
// }
setDefaultMountApp
(
`/civbase/
${
config
.
homepage
.
replace
(
/^
\/
/
,
''
)}
`
);
if
(
config
.
homepage
.
indexOf
(
'civweb4'
)
>
-
1
)
createStoreage
.
set
(
'init_web4'
,
true
);
}
};
...
...
This diff is collapsed.
Click to expand it.
src/pages/user/login/login.js
View file @
5987ec34
...
...
@@ -218,12 +218,12 @@ class Login {
:
response
;
if
(
result
&&
result
.
length
>
0
)
{
const
config
=
result
.
shift
();
const
homeType
=
config
.
productType
||
'civweb4'
;
self
.
globalConfig
=
Object
.
assign
(
self
.
globalConfig
,
config
,
{
theme
:
self
.
globalConfig
.
theme
,
menu
:
self
.
globalConfig
.
menu
,
style
:
self
.
globalConfig
.
style
,
homepage
:
params
.
getParams
(
'redirect'
)
||
self
.
globalConfig
.
homepage
||
config
.
homepage
,
// productType: config.productType || self.globalConfig.productType || 'civweb4'
homepage
:
homeType
+
'/'
+
(
params
.
getParams
(
'redirect'
)
||
self
.
globalConfig
.
homepage
||
config
.
homepage
),
});
if
(
self
.
globalConfig
.
hasOwnProperty
(
'webConfig'
))
{
...
...
@@ -235,8 +235,6 @@ class Login {
}
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
// createStoreage.set('globalConfig', self.globalConfig);
// window.globalConfig.productType = self.globalConfig.productType;
self
.
getProjectItems
().
then
(()
=>
{
window
.
subSysCfg
=
{};
result
.
forEach
(
item
=>
{
...
...
@@ -278,8 +276,9 @@ class Login {
:
response
;
if
(
resultData
&&
resultData
.
length
>
0
)
{
const
mainConf
=
resultData
.
shift
();
const
mainType
=
mainConf
.
productType
||
'civweb4'
;
if
(
mainConf
.
homepage
)
self
.
globalConfig
.
homepage
=
mainConf
.
homepage
;
self
.
globalConfig
.
homepage
=
`
${
mainType
}
/
${
mainConf
.
homepage
}
`
;
if
(
mainConf
.
bannerLogo
)
self
.
globalConfig
.
bannerLogo
=
mainConf
.
bannerLogo
;
if
(
mainConf
.
logo
)
self
.
globalConfig
.
logo
=
mainConf
.
logo
;
...
...
@@ -301,8 +300,6 @@ class Login {
}
else
{
// loginSuccess
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
// createStoreage.set('globalConfig', self.globalConfig);
// window.globalConfig.productType = self.globalConfig.productType;
// console.log("===loginSuccess===")
getIndustry
?
self
.
events
.
emit
(
'toggleIndustry'
)
...
...
This diff is collapsed.
Click to expand it.
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