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

pref: 修改 集成登录配置

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