11.2 单点页新建完成

This commit is contained in:
jl-zhoujl2
2022-11-02 16:49:12 +08:00
parent bb9013a612
commit d15de01b29
7 changed files with 185 additions and 5 deletions

View File

@ -0,0 +1,52 @@
import React, { useEffect, useRef } from 'react';
import '@/assets/zjl_style.less';
import chionceLoginPic01 from '@/assets/choiceLogin/chionceLoginPic01.png';
import chionceLoginPic02 from '@/assets/choiceLogin/chionceLoginPic02.png';
import { history } from 'umi';
import { getToSecondUrl } from '../service';
export default () => {
const urlRef = useRef(null);
//跳转到2.0
const contentLeftClick = async () => {
urlRef.current && window.open(urlRef.current);
}
//跳转到3.0
const contentRightClick = () => {
history.replace({ pathname: '/Dashboard' });
}
useEffect(() => {
const getUrl = async () => {
const response = await getToSecondUrl();
if (response?.success) {
urlRef.current = response?.data;
}
}
getUrl();
}, [])
return (
<div className="choiceLoginBody">
<div className="choiceLoginBlock">
<div className="choiceLoginContent">
<div className="contentLeft" onClick={contentLeftClick}>
<img src={chionceLoginPic01} alt="联通电子招投标交易平台" />
<h4><br /></h4>
</div>
<div className="contentRight" onClick={contentRightClick}>
<img src={chionceLoginPic02} alt="联通智慧供应链招标采购中心" />
<h4><br /></h4>
</div>
</div>
<div className="loginMassage">
<p><span></span></p>
<p>2021<span>31</span>线</p>
<p>2022613<span></span>线</p>
<p>线<span></span>线</p>
</div>
</div>
</div>
)
}

View File

@ -66,5 +66,11 @@ export async function getDictionaries() {
export async function getProjectById(id?: any) {
return request('/api/biz-service-ebtp-project/v1/projectRecord/' + id);
}
/**
* 获取跳转2.0的URL
*/
export async function getToSecondUrl() {
return request('/api/core-service-ebtp-userinfo/zglt/v1/getUrl');
}