import React, { useCallback, useState } from 'react' import styles from './index.module.scss' import TopCom from '@/components/TopCom' import topImg from '@/assets/img/team/top.png' import history from '@/utils/history' import ZinfoPop from '@/components/ZinfoPop' import { A4_APIcheck } from '@/store/action/all' function A7team() { const toFromFu = useCallback(async (can?: string) => { const res = await A4_APIcheck() if (res.code === 0) { // 0:未认证 | 1:已认证 | 2:认证中 if (res.data === 1) { setTitPop({ txt1: '您已完成认证', txt2: '无需重复申请' }) } else if (res.data === 2) { setTitPop({ txt1: '申请审核中', txt2: '请勿重复申请' }) } else if (res.data === 0) { if (can) history.push(`/proof/${can}`) else history.push(`/codeAuth`) } } }, []) // 打开提示弹窗 const [titPop, setTitPop] = useState({ txt1: '', txt2: '' }) return (
请选择认证方式
toFromFu('live')}>
申请认证
toFromFu()}>
邀请码认证
{/* 提示的弹窗 */} {titPop.txt1 ? ( setTitPop({ txt1: '', txt2: '' })} /> ) : null}
) } const MemoA7team = React.memo(A7team) export default MemoA7team