Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
CivManage
Commits
9c19b664
Commit
9c19b664
authored
Jul 05, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '集成登录网站配置'
parent
7c2c8f2f
Pipeline
#54560
passed with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
83 deletions
+72
-83
AddModal.jsx
src/pages/integratedLogin/AddModal.jsx
+1
-1
Integrate.jsx
src/pages/integratedLogin/Integrate.jsx
+3
-3
Master.jsx
src/pages/integratedLogin/Master.jsx
+59
-78
api.js
src/services/integratedLogin/api.js
+9
-1
No files found.
src/pages/integratedLogin/AddModal.jsx
View file @
9c19b664
...
@@ -185,7 +185,7 @@ const AddModal = props => {
...
@@ -185,7 +185,7 @@ const AddModal = props => {
marginTop
:
8
,
marginTop
:
8
,
}
}
}
}
>
>
Upload
上传
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
src/pages/integratedLogin/Integrate.jsx
View file @
9c19b664
...
@@ -302,7 +302,7 @@ const Integrate = () => {
...
@@ -302,7 +302,7 @@ const Integrate = () => {
新增
新增
</
Button
>
</
Button
>
</
div
>
</
div
>
{
/*
<Button
<
Button
type=
"primary"
type=
"primary"
onClick=
{
masterStation
}
onClick=
{
masterStation
}
style=
{
{
style=
{
{
...
@@ -310,8 +310,8 @@ const Integrate = () => {
...
@@ -310,8 +310,8 @@ const Integrate = () => {
verticalAlign
:
'middle'
,
verticalAlign
:
'middle'
,
}
}
}
}
>
>
网站配置
集成登录
网站配置
</Button>
*/
}
</
Button
>
</
div
>
</
div
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
div
className=
{
styles
.
table
}
>
<
div
className=
{
styles
.
table
}
>
...
...
src/pages/integratedLogin/Master.jsx
View file @
9c19b664
...
@@ -3,9 +3,8 @@
...
@@ -3,9 +3,8 @@
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Button
,
message
,
Upload
,
Select
,
Col
,
Row
}
from
'antd'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Button
,
message
,
Upload
,
Select
,
Col
,
Row
}
from
'antd'
;
import
{
import
{
AddIntegratedLogin
,
AddIntegratedloginSetting
,
EditIntegratedLogin
,
GetIntegratedloginSetting
,
SaveSystemInfo
,
}
from
'@/services/integratedLogin/api'
;
}
from
'@/services/integratedLogin/api'
;
import
{
PlusOutlined
,
LoadingOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
LoadingOutlined
}
from
'@ant-design/icons'
;
import
{
get
,
PUBLISH_SERVICE
}
from
'@/services'
;
import
{
get
,
PUBLISH_SERVICE
}
from
'@/services'
;
...
@@ -36,15 +35,29 @@ const Master = props => {
...
@@ -36,15 +35,29 @@ const Master = props => {
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
[
imgBed
,
setImgBed
]
=
useState
();
const
[
imgBed
,
setImgBed
]
=
useState
();
const
[
imageUrl
,
setImageUrl
]
=
useState
();
const
[
imageUrl
,
setImageUrl
]
=
useState
();
const
[
im
,
setIm
]
=
useState
();
const
[
previewModal
,
setPreviewModal
]
=
useState
(
false
);
const
[
previewModal
,
setPreviewModal
]
=
useState
(
false
);
const
[
keepImgeUrl
,
setKeepImgeUrl
]
=
useState
(
''
);
const
[
keepImgeUrl
,
setKeepImgeUrl
]
=
useState
(
''
);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
visible
)
{
if
(
visible
)
{
// SaveSystemInfo({})
GetIntegratedloginSetting
().
then
(
res
=>
{
form
.
setFieldsValue
({
if
(
res
.
code
===
0
)
{
primaryColor
:
'#0087F7'
,
console
.
log
(
res
.
data
);
form
.
setFieldsValue
(
res
.
data
);
setImageUrl
(
window
.
location
.
origin
+
`/
${
res
.
data
.
logo
}
`
);
setIm
(
res
.
data
.
logo
);
}
else
{
form
.
setFieldsValue
({
primaryColor
:
'#0087F7'
,
});
}
});
});
}
else
{
setImageUrl
(
''
);
setIm
(
''
);
setKeepImgeUrl
(
''
);
form
.
resetFields
();
}
}
},
[
visible
]);
},
[
visible
]);
...
@@ -54,75 +67,29 @@ const Master = props => {
...
@@ -54,75 +67,29 @@ const Master = props => {
console
.
log
(
obj
);
console
.
log
(
obj
);
form
.
validateFields
().
then
(
validate
=>
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
if
(
validate
)
{
// setLoading(true);
AddIntegratedloginSetting
({
...
obj
,
SaveSystemInfo
({
})
configName
:
'集成登录网站配置'
,
.
then
(
res
=>
{
configValue
:
JSON
.
stringify
(
obj
),
if
(
res
.
code
===
0
)
{
}).
then
(
res
=>
{
onCancel
();
if
(
res
.
data
==
0
)
{
callBackSubmit
();
console
.
log
(
res
.
data
);
notification
.
success
({
}
message
:
'提示'
,
});
duration
:
3
,
// if (obj.iconUrl.file) {
description
:
res
.
msg
||
'操作成功'
,
// obj.iconUrl = obj.iconUrl.file.response.data;
});
// }
}
else
{
// if (type === 'add') {
notification
.
error
({
// AddIntegratedLogin({
message
:
'提示'
,
// ...obj,
duration
:
3
,
// accountType: 'Panda',
description
:
res
.
msg
||
'操作失败'
,
// })
});
// .then(res => {
}
// if (res.code === 0) {
})
// onCancel();
.
catch
(
err
=>
{
// setLoading(false);
console
.
log
(
err
);
// callBackSubmit();
});
// notification.success({
// message: '提示',
// duration: 3,
// description: res.msg || '新增成功',
// });
// } else {
// setLoading(false);
// notification.error({
// message: '提示',
// duration: 3,
// description: res.msg || '新增失败',
// });
// }
// })
// .catch(err => {
// setLoading(false);
// });
// } else {
// EditIntegratedLogin({
// ...obj,
// accountType: 'Panda',
// id: pickItem.ID,
// })
// .then(res => {
// if (res.code === 0) {
// onCancel();
// setLoading(false);
// callBackSubmit();
// notification.success({
// message: '提示',
// duration: 3,
// description: res.msg || '编辑成功',
// });
// } else {
// setLoading(false);
// notification.error({
// message: '提示',
// duration: 3,
// description: res.msg || '编辑失败',
// });
// }
// })
// .catch(err => {
// setLoading(false);
// });
// }
}
}
});
});
};
};
...
@@ -150,6 +117,8 @@ const Master = props => {
...
@@ -150,6 +117,8 @@ const Master = props => {
};
};
const
handleChange
=
info
=>
{
const
handleChange
=
info
=>
{
setKeepImgeUrl
(
''
);
setIm
(
''
);
if
(
info
.
file
.
status
===
'uploading'
)
{
if
(
info
.
file
.
status
===
'uploading'
)
{
setLoading
(
true
);
setLoading
(
true
);
return
;
return
;
...
@@ -177,7 +146,7 @@ const Master = props => {
...
@@ -177,7 +146,7 @@ const Master = props => {
marginTop
:
8
,
marginTop
:
8
,
}
}
}
}
>
>
Upload
上传
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
@@ -191,6 +160,7 @@ const Master = props => {
...
@@ -191,6 +160,7 @@ const Master = props => {
console
.
log
(
props
.
path
);
console
.
log
(
props
.
path
);
console
.
log
(
process
.
env
.
PROXY
);
console
.
log
(
process
.
env
.
PROXY
);
setImageUrl
(
window
.
location
.
origin
+
`/
${
props
.
path
}
`
);
setImageUrl
(
window
.
location
.
origin
+
`/
${
props
.
path
}
`
);
setIm
(
props
.
path
);
setKeepImgeUrl
(
props
.
path
);
setKeepImgeUrl
(
props
.
path
);
form
.
setFieldsValue
({
logo
:
`
${
props
.
path
}
`
});
form
.
setFieldsValue
({
logo
:
`
${
props
.
path
}
`
});
}
}
...
@@ -198,7 +168,7 @@ const Master = props => {
...
@@ -198,7 +168,7 @@ const Master = props => {
return
(
return
(
<
Modal
<
Modal
title=
"
主
站配置"
title=
"
集成登录网
站配置"
style=
{
{
top
:
'150px'
}
}
style=
{
{
top
:
'150px'
}
}
width=
"700px"
width=
"700px"
destroyOnClose
destroyOnClose
...
@@ -223,7 +193,16 @@ const Master = props => {
...
@@ -223,7 +193,16 @@ const Master = props => {
>
>
<
Input
placeholder=
"请输入标题"
autoComplete=
"off"
/>
<
Input
placeholder=
"请输入标题"
autoComplete=
"off"
/>
</
Item
>
</
Item
>
<
Item
label=
"副标题"
name=
"subtitle"
>
<
Item
label=
"副标题"
name=
"subtitle"
rules=
{
[
{
required
:
true
,
message
:
'标题为必填项'
,
},
]
}
>
<
Input
placeholder=
"请输入副标题"
autoComplete=
"off"
/>
<
Input
placeholder=
"请输入副标题"
autoComplete=
"off"
/>
</
Item
>
</
Item
>
<
Row
>
<
Row
>
...
@@ -296,6 +275,8 @@ const Master = props => {
...
@@ -296,6 +275,8 @@ const Master = props => {
onCancel=
{
()
=>
{
onCancel=
{
()
=>
{
setPreviewModal
(
false
);
setPreviewModal
(
false
);
}
}
}
}
imageUrl=
{
im
}
keepImgeUrl=
{
keepImgeUrl
}
callBackSubmit=
{
onOk
}
callBackSubmit=
{
onOk
}
/>
/>
</
Modal
>
</
Modal
>
...
...
src/services/integratedLogin/api.js
View file @
9c19b664
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Description:
* @Description:
* @Author: leizhe
* @Author: leizhe
* @Date: 2022-06-09 10:01:10
* @Date: 2022-06-09 10:01:10
* @LastEditTime: 2022-07-0
4 18:05:57
* @LastEditTime: 2022-07-0
5 10:26:56
* @LastEditors: leizhe
* @LastEditors: leizhe
*/
*/
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
}
from
'@/services/index'
;
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
}
from
'@/services/index'
;
...
@@ -24,3 +24,11 @@ export const GetIntegratedloginIcon = param =>
...
@@ -24,3 +24,11 @@ export const GetIntegratedloginIcon = param =>
get
(
`
${
PUBLISH_SERVICE
}
/GetIntegratedloginIcon`
,
param
);
get
(
`
${
PUBLISH_SERVICE
}
/GetIntegratedloginIcon`
,
param
);
export
const
SaveSystemInfo
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/SaveSystemInfo`
,
param
);
export
const
SaveSystemInfo
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/HostManager/SaveSystemInfo`
,
param
);
// 集成登录-添加集成登录网站配置
export
const
AddIntegratedloginSetting
=
param
=>
post
(
`
${
PUBLISH_SERVICE
}
/AddIntegratedloginSetting`
,
param
);
// 集成登录-获取集成登录网站配置
export
const
GetIntegratedloginSetting
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/GetIntegratedloginSetting`
,
param
);
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