forked from Gitlink/forgeplus-react
74 lines
1.6 KiB
TypeScript
74 lines
1.6 KiB
TypeScript
import React, { FC } from 'react';
|
||
import {
|
||
ShixunsDetailModelState,
|
||
GlobalSettingModelState,
|
||
ConnectProps,
|
||
Loading,
|
||
connect,
|
||
Dispatch,
|
||
} from 'umi';
|
||
import { Modal, message } from 'antd';
|
||
import Fetch from '@/utils/fetch';
|
||
|
||
interface PageProps extends Partial<ConnectProps> {
|
||
shixunsDetail: ShixunsDetailModelState;
|
||
globalSetting: GlobalSettingModelState;
|
||
loading: boolean;
|
||
dispatch: Dispatch;
|
||
}
|
||
|
||
const AuthModal: FC<PageProps> = ({
|
||
shixunsDetail,
|
||
globalSetting,
|
||
loading,
|
||
dispatch,
|
||
...props
|
||
}) => {
|
||
return (
|
||
<Modal
|
||
centered
|
||
keyboard={false}
|
||
closable={false}
|
||
zIndex={6666}
|
||
title="提示"
|
||
visible={shixunsDetail.actionTabs.key === 'Banner-Auth'}
|
||
okText="确定"
|
||
cancelText="取消"
|
||
onOk={() => {
|
||
dispatch({
|
||
type: 'shixunsDetail/setActionTabs',
|
||
payload: {},
|
||
});
|
||
window.location.href = 'https://www.educoder.net/account/certification';
|
||
}}
|
||
onCancel={() => {
|
||
dispatch({
|
||
type: 'shixunsDetail/setActionTabs',
|
||
payload: {},
|
||
});
|
||
}}
|
||
>
|
||
<p className="tc font16">
|
||
当前竞赛需要实名认证,请先完成实名认证后再报名参赛
|
||
<br />
|
||
请问是否前往进行认证?
|
||
</p>
|
||
</Modal>
|
||
);
|
||
};
|
||
export default connect(
|
||
({
|
||
shixunsDetail,
|
||
loading,
|
||
globalSetting,
|
||
}: {
|
||
shixunsDetail: ShixunsDetailModelState;
|
||
loading: Loading;
|
||
globalSetting: GlobalSettingModelState;
|
||
}) => ({
|
||
shixunsDetail,
|
||
globalSetting,
|
||
loading: loading.models.index,
|
||
}),
|
||
)(AuthModal);
|