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
9534bd37
Commit
9534bd37
authored
Jun 17, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改云平台登录刷新的bug
parent
922c788c
Pipeline
#89905
failed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
7 deletions
+34
-7
reducer.js
src/containers/App/store/reducer.js
+8
-2
index.js
src/pages/bootpage/template/demonstration/index.js
+6
-1
index.js
src/pages/bootpage/template/integration/index.js
+1
-1
login.js
src/pages/user/login/login.js
+19
-3
No files found.
src/containers/App/store/reducer.js
View file @
9534bd37
...
...
@@ -42,7 +42,11 @@ const proxy = require('../../../../config/proxy');
const
keywordStorage
=
new
Storage
(
`__global_search_keywords__micro_
${
window
.
location
.
hostname
}
`
);
const
recentVisitedStorage
=
new
Storage
(
`__global_recent_visited__micro_
${
window
.
location
.
hostname
}
`
);
const
recentProductStorage
=
new
Storage
(
`__global__recent_product__micro_
${
window
.
location
.
hostname
}
`
);
const
currentProduct
=
`__global__recent_productIndex__micro_
${
window
.
location
.
hostname
}
_
${
sessionStorage
.
getItem
(
'client'
)
||
params
.
getParams
(
'client'
)
||
'city'
}
`
;
const
currentProduct
=
`__global__recent_productIndex__micro_
${
window
.
location
.
hostname
}
_
${
sessionStorage
.
getItem
(
'client'
,
)
||
params
.
getParams
(
'client'
)
||
'city'
}
`
;
sessionStorage
.
setItem
(
currentProduct
,
0
);
Cookies
.
set
(
'loginMode'
,
Cookies
.
get
(
'loginMode'
)
||
'pdw'
);
export
const
initialState
=
fromJS
({
...
...
@@ -88,7 +92,9 @@ const appReducer = (state = initialState, action) => {
window
.
arcgisAssetsPath
=
`
${
window
.
location
.
origin
}
/
${
pkg
.
name
.
toLocaleLowerCase
()}
/assets`
;
window
.
__INITIAL_STATE__
.
mdi
=
'SDI'
;
window
.
__INITIAL_STATE__
.
menu
=
'banner-left'
;
window
.
globalConfig
=
AppConfig
(
window
.
__INITIAL_STATE__
);
const
temp
=
AppConfig
(
window
.
__INITIAL_STATE__
)
temp
.
displayMode
=
window
.
__INITIAL_STATE__
?.
displayMode
||
''
window
.
globalConfig
=
temp
;
// eslint-disable-next-line no-undef
...
...
src/pages/bootpage/template/demonstration/index.js
View file @
9534bd37
...
...
@@ -455,7 +455,12 @@ const Demonstration = props => {
};
},
[]);
useEffect
(()
=>
{
getData
();
if
(
props
.
global
?.
userInfo
)
{
getData
();
}
else
{
timer
.
current
&&
clearInterval
(
timer
.
current
);
timer
.
current
=
null
;
}
window
.
addEventListener
(
'resize'
,
debounce
(
onResize
,
300
));
onResize
();
...
...
src/pages/bootpage/template/integration/index.js
View file @
9534bd37
...
...
@@ -157,7 +157,7 @@ const Integration = props => {
.catch(err => {
notification.error({ message: '提示', duration: 3, description: '集成站点配置错误' });
});
}, [
props.global.token
]);
}, []);
return (
<div className={styles.bootPage}>
...
...
src/pages/user/login/login.js
View file @
9534bd37
...
...
@@ -225,6 +225,15 @@ class Login {
if
(
loginMode
&&
loginMode
===
'iotWechat'
)
ddCode
=
null
;
// self.qrcodeLogin(self.globalConfig.qrcodeData.code);
if
(
token
)
{
if
(
loginMode
===
'qywx'
)
{
// 微信登录刷新退出登录
Cookies
.
set
(
'token'
,
''
,
{
path
:
'/'
,
});
const
client
=
this
?.
global
?.
client
||
sessionStorage
.
getItem
(
'client'
)
||
null
;
window
.
location
.
href
=
`
${
WX_REDIRECT_URI
}
?client=
${
client
}
`
;
return
;
}
self
.
getToweb
(
token
,
noTokenSite
);
// eslint-disable-next-line no-empty
}
else
if
(
ddCode
&&
loginMode
===
'dingding'
)
{
...
...
@@ -279,7 +288,14 @@ class Login {
self
.
isSignIn
=
true
;
self
.
globalConfig
.
userInfo
=
window
?.
globalConfig
?.
transformUserInfo
?.(
response
.
data
)
??
{};
self
.
updateConfig
&&
self
.
updateConfig
(
self
.
globalConfig
);
self
.
getUserInfoAndConfig
(
null
,
true
);
let
flag
=
true
;
const
loginMode
=
Cookies
.
get
(
'loginMode'
);
if
(
loginMode
===
'qywx'
)
{
flag
=
false
;
}
// flag 为true 时,不会进引导页或集成登录
self
.
getUserInfoAndConfig
(
null
,
flag
);
}
else
{
self
.
logout
&&
self
.
logout
();
if
(
params
.
getParams
(
'token'
))
{
...
...
@@ -345,8 +361,8 @@ class Login {
}
});
}
//
eslint-disable-next-line prettier/prettier
if
(
!
flag
&&
this
.
isSignIn
&&
this
.
globalConfig
.
userInfo
.
Industries
.
length
&&
this
.
globalConfig
.
userInfo
.
Industries
.
length
>
1
&&
!
window
.
qiankunStarted
)
{
//
根据配置信息里的 displayMode 判断显示哪个引导页
if
(
!
flag
&&
this
.
isSignIn
&&
this
.
globalConfig
.
displayMode
===
'demonstration'
&&
!
window
.
qiankunStarted
)
{
this
.
createContext
(
this
);
this
.
updateConfig
&&
this
.
updateConfig
(
this
.
globalConfig
);
this
.
events
&&
this
.
events
.
emit
(
'loginIndustry'
);
...
...
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