Commit 3c5e87ca authored by 周宏民's avatar 周宏民

feat: 弥勒集成登录支持跳营收

parent a55a8e06
Pipeline #92646 waiting for manual action with stages
......@@ -8,6 +8,7 @@ import { connect } from 'react-redux';
import { actionCreators } from '@/containers/App/store';
import { getUserInfo, getWebSiteConfig } from '@/api/service/base';
import { log, params, encipher } from '@wisdom-utils/utils/lib/helpers';
import axios from 'axios';
import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
import { message, Button } from 'antd';
......@@ -221,17 +222,51 @@ const IntegrationMile = props => {
timer2.current = null;
}, time * 1000);
};
const onLink = (item, loginA) => {
if (!integrationData[item.name]) {
message.warning('当前账号没有权限,请联系管理人员配置');
return;
const toRevenue = async item => {
setJumpLoading(true);
jumpProgressStart();
startTiming(6);
try {
const res = await appService.getTicketByToken({ token: window.globalConfig?.token });
if (res.code === 0) {
// 营收是api-bcs,直饮水是api-ddw
const apiPath = `${item.url}/api-ddw/sysUser/ssoGCK?sysFlag=0&${item.paramName}=${res.data}`;
setLinkUrl(apiPath);
const res2 = await axios({
url: apiPath,
method: 'get',
dataType: 'json',
});
if (res2?.data?.resultcode !== 'no') {
setLinkUrl('');
setJumpLoading(false);
jumpProgressEnd();
message.warning('没权限,请联系管理员');
}
} else {
res.msg && message.error(res.msg);
setJumpLoading(false);
jumpProgressEnd();
}
} catch (error) {
setJumpLoading(false);
jumpProgressEnd();
}
};
const onLink = (item, loginA) => {
// if (!integrationData[item.name]) {
// message.warning('当前账号没有权限,请联系管理人员配置');
// return;
// }
const { url, client } = item;
if (!url && !client) return message.warning('未配置功能路径');
if (url) {
if (item.paramName) {
toRevenue(item);
return;
}
setJumpLoading(true);
jumpProgressStart();
setLinkUrl(url);
let time = 15;
if (!url.includes('user/noscret')) {
......@@ -433,20 +468,34 @@ const IntegrationMile = props => {
: null}
</div>
</div>
{showBackBtn ? (
{!linkUrl ? (
<div
className={classNames(styles.iframeExit, 'animate__animated', 'animate__fadeIn')}
className={classNames(styles.iframeBack, 'animate__animated', 'animate__fadeIn')}
onClick={() => props.logout()}
>
<div className={styles.iframeBackLeft}>
<img src={arrowLeftImg} alt="返回" />
</div>
<div className={styles.iframeExitIcon}>
<div className={styles.iframeBackIcon}>
<img src={backImg} alt="返回" />
退出
</div>
</div>
) : null}
{linkUrl && showBackBtn ? (
<div
className={classNames(styles.iframeExit, 'animate__animated', 'animate__fadeIn')}
onClick={() => setLinkUrl('')}
>
<div className={styles.iframeExitLeft}>
<img src={arrowLeftImg} alt="返回" />
</div>
<div className={styles.iframeExitIcon}>
<img src={backImg} alt="返回" />
返回
</div>
</div>
) : null}
{iframeItem}
{!linkUrl ? <div className={classNames(styles.CarouselRipples, 'CarouselRipples')} data-ripple="ripple" /> : null}
</div>
......
......@@ -5,7 +5,7 @@
overflow: hidden;
background: url('@/assets/images/integration/danling/背景.png') center/100% 100% no-repeat;
.iframeExitIcon {
.iframeBackIcon {
position: absolute;
top: 0;
right: -45px;
......@@ -28,8 +28,8 @@
}
.iframeExit:hover {
.iframeExitIcon {
.iframeBack:hover {
.iframeBackIcon {
right: 0;
}
......@@ -38,7 +38,6 @@
}
}
.iframeBackLeft {
position: absolute;
top: 0;
......@@ -58,7 +57,7 @@
}
}
.iframeExit {
.iframeBack {
width: 44px;
height: 44px;
position: absolute;
......@@ -71,6 +70,73 @@
z-index: 110;
}
.iframeExitIcon {
position: absolute;
top: 0;
left: -45px;
display: flex;
height: 44px;
width: 44px;
background: rgba(28, 94, 180, 0.95);
border-radius: 0 7px 7px 0;
flex-direction: column;
justify-content: space-around;
align-items: center;
font-size: 12px;
transition: all 0.2s;
padding: 3px 0;
img {
width: 17px;
height: 12px;
}
}
.iframeExit:hover {
.iframeExitIcon {
left: 0;
}
.iframeExitLeft {
left: -15px;
}
}
.iframeExitLeft {
position: absolute;
top: 0;
left: 0;
width: 14px;
height: 44px;
background: rgba(28, 94, 180, 0.95);
border-radius: 0 7px 7px 0;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s;
img {
width: 6px;
height: 11px;
}
}
.iframeExit {
width: 44px;
height: 44px;
position: absolute;
top: 4px;
left: 0;
color: #FFF;
cursor: pointer;
user-select: none;
position: absolute;
z-index: 110;
}
.integrationMile_exit {
......@@ -105,7 +171,8 @@
.integrationMile_icon {
margin-right: 20px;
img{
img {
max-height: 60px;
}
......
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