Commit fa6eb9e9 authored by 周宏民's avatar 周宏民

pref: 修改 集成登录配置

parent d2045d42
Pipeline #93665 passed with stages
......@@ -162,6 +162,8 @@ const IntegrationNew = props => {
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: apiPath });
} else {
setJumpLoading(false);
jumpProgressEnd();
window.open(apiPath, '_blank');
}
} else {
......@@ -178,7 +180,7 @@ const IntegrationNew = props => {
const toClient = async (item, loginA) => {
const token = props.global?.token || Cookies.get('token');
const cli = item.appKey;
const cli = item.client;
const res = await getWebSiteConfig({
identity: token,
client: cli,
......@@ -229,9 +231,9 @@ const IntegrationNew = props => {
props.logout();
return;
}
const { url, appKey } = item;
const { url, client } = item;
if (item.subType === '内链' && appKey) {
if (item.subType === '内链' && client) {
toClient(item, loginA);
} else {
if (!url) return;
......@@ -247,6 +249,8 @@ const IntegrationNew = props => {
if (item?.openOpt === '当前页打开') {
props.history.push('/thirdParty', { linkUrl: link });
} else {
setJumpLoading(false);
jumpProgressEnd();
window.open(link, '_blank');
}
}
......
......@@ -76,7 +76,7 @@ const IntegratedLogin = props => {
dataIndex: 'icon',
key: 'icon',
align: 'center',
width: 120,
width: 100,
render: (text, record) => {
if (text) {
return (
......@@ -109,23 +109,31 @@ const IntegratedLogin = props => {
{
title: '链接类型',
dataIndex: 'subType',
width: 120,
width: 100,
align: 'center',
render: (text, record) => subTypeMap[text] || '',
render: (text, record) => {
if (text === '内链') {
return (
<>
<span style={{ color: '#1685ff' }}>{record.client || ''}</span>(站内)
</>
);
}
return '站外跳转';
},
},
{
title: 'APPKey',
dataIndex: 'appKey',
width: 120,
title: '地址',
dataIndex: 'url',
width: 250,
align: 'center',
},
{
title: '地址',
dataIndex: 'url',
width: 200,
title: 'AppKey',
dataIndex: 'appKey',
width: 100,
align: 'center',
},
{
title: '操作',
key: 'action',
......@@ -252,15 +260,15 @@ const IntegratedLogin = props => {
if (res.code === 0) {
const _allName = [];
const _groupList = [];
res.data.forEach(item => {
const data = res.data || [];
data.forEach(item => {
const _name = item.name;
_allName.push(_name);
_groupList.push({ value: _name, label: _name });
});
setGroupList(_groupList);
setKeepSystemName(_allName);
setTableData(res.data.sort((a, b) => a.index - b.index));
setTableData(data.sort((a, b) => a.index - b.index));
} else {
res.msg && message.error(res.msg);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment