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
6dfdec6f
Commit
6dfdec6f
authored
Feb 18, 2022
by
李纪文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改访问其它网站配置获取city问题
parent
068dbe86
Pipeline
#44143
passed with stages
in 1 minute 59 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
initConfig.js
src/initConfig.js
+3
-2
No files found.
src/initConfig.js
View file @
6dfdec6f
import
{
appService
}
from
'./api'
;
import
{
initMicroApps
}
from
'./micro'
;
import
{
params
,
Storeage
}
from
'kit_utils'
;
import
Cookies
from
'js-cookie'
;
import
{
actionCreators
}
from
'./containers/App/store'
;
import
{
getToken
,
isString
}
from
'./utils/utils'
;
import
loader
,
{
render
}
from
'./render'
;
...
...
@@ -59,7 +60,7 @@ export const initGlobalConfig = () => {
}
});
// eslint-disable-next-line react-hooks/rules-of-hooks
const
client
=
params
.
getParams
(
'client'
)
const
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
appService
.
queryConfig
({
client
:
client
||
'city'
,
...
...
@@ -70,7 +71,7 @@ export const initGlobalConfig = () => {
store
.
dispatch
(
actionCreators
.
getConfig
(
Object
.
assign
({})));
const
data
=
res
;
if
(
!
data
.
client
)
{
data
.
client
=
params
.
getParams
(
'client'
)
||
'city'
;
data
.
client
=
params
.
getParams
(
'client'
)
||
Cookies
.
get
(
'city'
)
;
}
// Cookies.set('city', data.client);
store
.
dispatch
(
...
...
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