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
618fc7ed
Commit
618fc7ed
authored
Dec 10, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 集成登录修改
parent
2fab4fee
Pipeline
#94495
waiting for manual action with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
16 deletions
+29
-16
index.js
src/pages/bootpage/template/integration/index.js
+11
-15
index.js
src/pages/bootpage/template/integrationNew/index.js
+2
-1
baseLoginNewYear.js
src/pages/user/login/template/baseLoginNewYear.js
+8
-0
index.js
src/pages/user/login/template/project/dawu/index.js
+8
-0
No files found.
src/pages/bootpage/template/integration/index.js
View file @
618fc7ed
...
@@ -18,7 +18,10 @@ import imgLogo from '@/assets/bootPage/熊猫图标.png';
...
@@ -18,7 +18,10 @@ import imgLogo from '@/assets/bootPage/熊猫图标.png';
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
const
Integration
=
props
=>
{
const
Integration
=
props
=>
{
const
dataRef
=
useRef
();
const
dataRef
=
useRef
();
let
integrationClient
=
window
?.
globalConfig
?.
client
||
'city'
;
// 集成登录client
const
integratedConfig
=
props
.
integratedConfig
?.
toObject
?
props
.
integratedConfig
.
toObject
()
:
props
.
integratedConfig
||
{};
const
integrationClient
=
integratedConfig
?.
client
||
window
?.
globalConfig
?.
client
||
'city'
;
// 集成登录client
const
[
percentBottom
,
setPercentBottom
]
=
useState
(
-
40
);
const
[
percentBottom
,
setPercentBottom
]
=
useState
(
-
40
);
const
[
currentType
,
setCurrentType
]
=
useState
(
''
);
const
[
currentType
,
setCurrentType
]
=
useState
(
''
);
...
@@ -147,23 +150,26 @@ const Integration = props => {
...
@@ -147,23 +150,26 @@ const Integration = props => {
// 获取集成站点数据
// 获取集成站点数据
useEffect(() => {
useEffect(() => {
const cli = integratedConfig?.client || sessionStorage.getItem('client') || props?.global?.client || '';
localStorage.setItem('integrationClient', cli);
appService
appService
.GetIntegrationConfig({
.GetIntegrationConfig({
type: '集成登录',
type: '集成登录',
userId: window.globalConfig.userInfo?.OID ?? null,
userId: window.globalConfig.userInfo?.OID ?? null,
isEnable: true,
isEnable: true,
client: cli,
})
})
.then(res => {
.then(res => {
const { code, data } = res;
const { code, data
= []
} = res;
if (code !== SERVICE_INTERFACE_SUCCESS_CODE) {
if (code !== SERVICE_INTERFACE_SUCCESS_CODE) {
notification.error({ message: '提示', duration: 3, description: '集成站点配置错误' });
notification.error({ message: '提示', duration: 3, description: '集成站点配置错误' });
} else {
} else {
setNum(data.length);
setNum(data.length);
setDataList(data);
setDataList(data
.sort((a, b) => a.index - b.index)
);
const config = props.global;
const config = props.global;
config.isIntegration = data.length;
config.isIntegration = data.length;
props.updateConfig && props.updateConfig(config);
props.updateConfig && props.updateConfig(config);
if (data.length == 1) {
if (data.length ==
=
1) {
handlePage(data[0], loginAction);
handlePage(data[0], loginAction);
}
}
}
}
...
@@ -171,17 +177,6 @@ const Integration = props => {
...
@@ -171,17 +177,6 @@ const Integration = props => {
.catch(err => {
.catch(err => {
notification.error({ message: '提示', duration: 3, description: '集成站点配置错误' });
notification.error({ message: '提示', duration: 3, description: '集成站点配置错误' });
});
});
appService
.GetIntegratedloginSetting({
ignoreSite: true,
})
.then(res => {
const { code, data } = res;
if (data.client) {
integrationClient = data.client;
localStorage.setItem('integrationClient', data.client);
}
});
}, []);
}, []);
return (
return (
...
@@ -264,6 +259,7 @@ const Integration = props => {
...
@@ -264,6 +259,7 @@ const Integration = props => {
const mapStateToProps = state => ({
const mapStateToProps = state => ({
global: state.getIn(['
global
', '
globalConfig
']),
global: state.getIn(['
global
', '
globalConfig
']),
instance: state.getIn(['
global
', '
instance
']),
instance: state.getIn(['
global
', '
instance
']),
integratedConfig: state.getIn(['
global
', '
integratedConfig
']),
});
});
const mapDispatchToProps = dispatch => ({
const mapDispatchToProps = dispatch => ({
updateConfig(config) {
updateConfig(config) {
...
...
src/pages/bootpage/template/integrationNew/index.js
View file @
618fc7ed
...
@@ -103,7 +103,8 @@ const IntegrationNew = props => {
...
@@ -103,7 +103,8 @@ const IntegrationNew = props => {
client
,
client
,
})
})
.
then
(
res1
=>
{
.
then
(
res1
=>
{
const
list
=
res1
.
data
||
[];
let
list
=
res1
.
data
||
[];
list
=
list
.
sort
((
a
,
b
)
=>
a
.
index
-
b
.
index
);
list
.
length
&&
localStorage
.
setItem
(
'integrationData'
,
JSON
.
stringify
(
list
));
list
.
length
&&
localStorage
.
setItem
(
'integrationData'
,
JSON
.
stringify
(
list
));
setIntegrationData
(
list
);
setIntegrationData
(
list
);
});
});
...
...
src/pages/user/login/template/baseLoginNewYear.js
View file @
618fc7ed
...
@@ -84,11 +84,19 @@ const Login = forwardRef((props, _ref) => {
...
@@ -84,11 +84,19 @@ const Login = forwardRef((props, _ref) => {
action
.
events
.
on
(
'loginVisible'
,
status
=>
{
action
.
events
.
on
(
'loginVisible'
,
status
=>
{
setVisible
(
status
);
setVisible
(
status
);
});
});
action
.
events
.
on
(
'loginHomePage'
,
()
=>
{
props
.
history
.
push
(
`/homePage`
);
});
action
.
events
.
on
(
'loginIndustry'
,
()
=>
{
props
.
history
.
push
(
`/industry`
);
});
// }
// }
return
()
=>
{
return
()
=>
{
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginSuccess'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginSuccess'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginError'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginError'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginVisible'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginVisible'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginHomePage'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginIndustry'
);
}
}
},
[
props
.
loginMode
]);
},
[
props
.
loginMode
]);
...
...
src/pages/user/login/template/project/dawu/index.js
View file @
618fc7ed
...
@@ -79,10 +79,18 @@ const Login = forwardRef((props, _ref) => {
...
@@ -79,10 +79,18 @@ const Login = forwardRef((props, _ref) => {
action
.
events
.
on
(
'loginVisible'
,
status
=>
{
action
.
events
.
on
(
'loginVisible'
,
status
=>
{
setVisible
(
status
);
setVisible
(
status
);
});
});
action
.
events
.
on
(
'loginHomePage'
,
()
=>
{
props
.
history
.
push
(
`/homePage`
);
});
action
.
events
.
on
(
'loginIndustry'
,
()
=>
{
props
.
history
.
push
(
`/industry`
);
});
return
()
=>
{
return
()
=>
{
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginSuccess'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginSuccess'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginError'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginError'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginVisible'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginVisible'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginHomePage'
);
action
&&
action
.
events
&&
action
.
events
.
removeAllListeners
(
'loginIndustry'
);
};
};
},
[
props
.
loginMode
]);
},
[
props
.
loginMode
]);
...
...
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