+ {this.state.certification === 1 &&userdata?
+
+
this.realNameCertificationModal1 = form}
+ certification={certification}
+ Getdata={(id) => this.getdata(id)}
+ onCancel={() => this.onCancel()}
+ >
+
+
+ : ""}
+
+ {this.state.certification === 2 &&userdata ?
+
this.realNameCertificationModal2 = form}
+ certification={certification}
+ Getdata={(id) => this.getdata(id)}
+ onCancel={() => this.onCancel()}
+
+ > : ""}
+
+
*实名信息
+
+ {userdata && userdata.authentication == "uncertified" ?
+
通过实名认证后才能获得证书
: ""
+ }
+ {userdata && userdata.authentication == "uncertified" ?
+
this.checkBasicInfo(1)}>立即认证
: ""
+ }
+
+
+
+
姓名:
+
{userdata && userdata.name}
+
+ {
+ userdata && userdata.authentication == "uncertified" ? "" :
+ userdata && userdata.authentication == "applying" ?
+
待审核!
this.Cancellationofapplication(1)}>撤销认证
+ :
+
+
已认证
+
+ }
+
+
+
+
+
性别:
+
{userdata && userdata.gender == 0 ? "男" : "女"}
+
+
+
+
*职业信息
+
+ {
+ userdata && userdata.professional_certification == "uncertified" ?
+
通过职业认证后才能获得证书
+
+ : ""}
+ {
+ userdata && userdata.professional_certification == "uncertified" ?
+
this.checkBasicInfo(2)}>立即认证
+
+ : ""}
+
+
+
+
职业:
+
{userdata && userdata.identity && identityMap[userdata.identity]}
+ {
+ userdata && userdata.professional_certification == "uncertified" ?
+ "" :
+ userdata && userdata.professional_certification == "applying" ?
+
+
待审核!
this.Cancellationofapplication(2)}>撤销认证
+
+ :
+
+
已认证
+
this.checkBasicInfo(2)}>重新认证
+
+
+ }
+
+
+
+
{userdata && userdata.technical_title ? "职称:" : ""}{userdata && userdata.student_id ? "学号:" : ""}
+
{userdata && (userdata.technical_title || userdata.student_id)}
+
+
+
学校:
+
{userdata && userdata.school_name}
+
+
+
院系:
+
{userdata && userdata.department_name}
+
+
+
+
手机号:
+ {
+ userdata && userdata.phone ?
+
{userdata && userdata.phone}
+ :
+
未绑定
+ }
+
this.phonebools()}>{userdata && userdata.phone ? (phonebool === false ? "更换" : "") : (phonebool === false ? "立即绑定" : "")}
+
+ {/*手机号绑定*/}
+ {
+ phonebool === true &&userdata ?
+
this.hideUpdating(i)}
+ getdata={(id) => this.getdata(id)}>
+ : ""
+ }
+
+
+
+
Email:
+
{userdata && userdata.mail}
+
this.emailbools()}>{userdata && userdata.mail ? (emailbool === false ? "更换" : "") : (emailbool === false ? "立即绑定" : "")}
+
+ {
+ emailbool === false ? "" :
+ (
+ userdata?
+
this.hideUpdating(i)}
+ getdata={(id) => this.getdata(id)}>
+ :""
+ )
+ }
+ {
+ leader === true ?
+
+ {
+ bank_account_editable === true ?
+
this.hideUpdating(i)}
+ getdata={(id) => this.getdata(id)}
+ GetawardinformationAPI={() => this.GetawardinformationAPI()}
+ bank_account={this.state.bank_account}
+ >
+ :
+ admins===true?
+
this.hideUpdating(i)}
+ getdata={(id) => this.getdata(id)}
+ GetawardinformationAPI={() => this.GetawardinformationAPI()}
+ bank_account={this.state.bank_account}
+ >
+ :
+
+
+
签/领/开户行及银行卡号
+
为保障奖金的及时发放,请队长如实填写你名下的银行卡信息
+
+ {
+ bank_account && bank_account ?
+
+
+
开户行:
+
{bank_account && bank_account.bank}
+
+
+
支行:
+
{bank_account && bank_account.second_bank}
+
+
+
账号:
+
{bank_account && bank_account.card_no}
+
+
+ :
+ ""
+ }
+
+
+ }
+
+ :
+
+ {
+ admins===true?
+ this.hideUpdating(i)}
+ getdata={(id) => this.getdata(id)}
+ GetawardinformationAPI={() => this.GetawardinformationAPI()}
+ bank_account={this.state.bank_account}
+ >
+ :""
+ }
+
+ }
+
+
+
+ )
+ }
+}
+
+export default CompetitionContentspdfpeopledata;
+
diff --git a/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js
new file mode 100644
index 000000000..934369aac
--- /dev/null
+++ b/public/react/src/modules/courses/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/Mailboxvalidation.js
@@ -0,0 +1,270 @@
+import React, {Component} from 'react';
+import {Button, Layout, Input, Form} from 'antd';
+import axios from 'axios';
+import {getImageUrl} from 'educoder';
+import mycompetotionchild from './mycompetotionchild.css';
+import {getHiddenName} from "../../../../user/account/AccountBasicEdit";
+import '../../../../courses/css/Courses.css'
+
+export const identityMap = {"teacher": "教师", "student": "学生", "professional": "专业人士"}
+
+class Mailboxvalidation extends Component {
+ constructor(props) {
+ super(props)
+ this.state = {
+ basicInfo: {},
+ updating: '',
+ secondsFlag: false,
+ seconds: 60,
+ phonebool: false,
+ emailbool: false,
+ formationdata: [],
+ bank_account_editable: false,
+ leader: false,
+ bank_account: undefined,
+ certification: 1
+ }
+ }
+
+ componentDidMount() {
+ window.document.title = '竞赛';
+ // console.log("3获取用户信息");
+ // console.log(this.props);
+ }
+
+
+ // 绑定邮箱
+ onEmailSubmit = () => {
+ this.props.form.validateFieldsAndScroll((err, values) => {
+ if (!err) {
+ let {id} = this.props.userdata;
+ let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
+ if (reg.test(values.email)) {
+ let url = `/users/accounts/${id}/email_bind.json`
+ axios.post((url), {
+ email: values.email,
+ code: values.emailValidateCode
+ }).then((result) => {
+ if (result) {
+ this.props.showNotification("邮箱地址绑定成功!");
+ this.hideUpdating(2);
+ this.props.getdata(id);
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ } else {
+ this.props.showNotification("请输入正确的邮箱地址");
+ }
+ }
+ })
+ }
+ //取消编辑
+ hideUpdating = (i) => {
+ if (i === 1) {
+ this.props.hideUpdating(1);
+ } else if (i === 2) {
+ this.props.hideUpdating(2);
+
+
+ } else if (i === 3) {
+
+ }
+
+ }
+
+ // 获取验证码
+ getCode = (index) => {
+ let url = `/accounts/get_verification_code.json`
+ let login = '';
+ let values = this.props.form.getFieldsValue();
+ if (index == 3) {
+ //绑定手机号码
+ login = values.phone;
+ let reg = /^1\d{10}$/;
+ if (reg.test(login) == false) {
+ this.props.showNotification(`请先输入正确的手机号码`);
+ return;
+ }
+ } else if (index == 4) {
+ // 绑定邮箱
+ login = values.email;
+ let reg = /^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
+ if (reg.test(login) == false) {
+ this.props.showNotification(`请先输入正确的邮箱地址`);
+ return;
+ }
+ }
+ let type = index;
+ if (!login) {
+ this.props.showNotification(`请先输入${index == 3 ? "手机号码" : "邮箱地址"}`);
+ return;
+ }
+ axios.get((url), {
+ params: {
+ login, type
+ }
+ }).then((result) => {
+ if (result) {
+ // 倒计时
+ this.setState({
+ secondsFlag: true
+ })
+ this.remainTime();
+ }
+ }).catch((error) => {
+ console.log(error);
+ })
+ }
+
+ // 获取验证码倒计时
+ remainTime = () => {
+ this.setState({
+ seconds: 60
+ })
+ this.timer = setInterval(() => {
+ let {seconds} = this.state;
+ let s = parseInt(seconds) - 1;
+ if (s > -1) {
+ this.setState({
+ seconds: s
+ })
+ } else {
+ this.setState({
+ secondsFlag: false
+ })
+ clearInterval(this.timer);
+ }
+ }, 1000)
+ }
+
+ phonebools = () => {
+ this.setState({
+ phonebool: true
+ })
+ }
+
+ emailbools = () => {
+ console.log("点击了邮箱");
+ this.setState({
+ emailbool: true
+ })
+ }
+
+
+ render() {
+ const {getFieldDecorator} = this.props.form;
+ const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
+ console.log(emailbool);
+ return (
+