|
|
|
@ -30,7 +30,13 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
window.document.title = '竞赛';
|
|
|
|
|
// console.log("3获取用户信息");
|
|
|
|
|
// console.log(this.props)
|
|
|
|
|
this.props.triggerRef(this);
|
|
|
|
|
try {
|
|
|
|
|
this.props.triggerRef(this);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log(this.props.bank_account);
|
|
|
|
|
|
|
|
|
|
//初始化值
|
|
|
|
|
if (this.props.bank_account) {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
@ -38,6 +44,11 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
subbranch: this.props.bank_account.second_bank,
|
|
|
|
|
subbranchs: this.props.bank_account.card_no,
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
openingbank: this.props.bank_account.bank,
|
|
|
|
|
subbranch: this.props.bank_account.second_bank,
|
|
|
|
|
subbranchs: this.props.bank_account.card_no,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -50,7 +61,39 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
|
|
|
|
|
|
if (prevProps.bank_account != this.props.bank_account) {
|
|
|
|
|
let url = `/competitions/${this.props.match.params.identifier}/prize.json`;
|
|
|
|
|
let query=this.props.location&&this.props.location.search;
|
|
|
|
|
const types = query.split('user_id=')
|
|
|
|
|
let userid;
|
|
|
|
|
if(types[1]===undefined){
|
|
|
|
|
userid=this.props.user&&this.props.user.user_id;
|
|
|
|
|
}else{
|
|
|
|
|
userid=types[1];
|
|
|
|
|
}
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
|
user_id:userid,
|
|
|
|
|
}
|
|
|
|
|
}).then((result) => {
|
|
|
|
|
if (result.data) {
|
|
|
|
|
try {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank: result.data.bank_account.bank,
|
|
|
|
|
subbranch: result.data.bank_account.second_bank,
|
|
|
|
|
subbranchs: result.data.bank_account.card_no,
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
openingbank: result.data.bank_account.bank,
|
|
|
|
|
subbranch: result.data.bank_account.second_bank,
|
|
|
|
|
subbranchs: result.data.bank_account.card_no,
|
|
|
|
|
})
|
|
|
|
|
}catch (e) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
yhBankstrue = () => {
|
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
@ -64,13 +107,25 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
try {
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// console.log(JSON.stringify(result));
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank: values.openingbank,
|
|
|
|
|
subbranch: values.subbranch,
|
|
|
|
|
subbranchs: values.subbranchs,
|
|
|
|
|
})
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
try {
|
|
|
|
|
// console.log(values.openingbank);
|
|
|
|
|
// console.log(values.subbranch);
|
|
|
|
|
// console.log(values.subbranchs);
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
openingbank: values.openingbank,
|
|
|
|
|
subbranch: values.subbranch,
|
|
|
|
|
subbranchs: values.subbranchs,
|
|
|
|
|
});
|
|
|
|
|
this.setState({
|
|
|
|
|
openingbank: values.openingbank,
|
|
|
|
|
subbranch: values.subbranch,
|
|
|
|
|
subbranchs: values.subbranchs,
|
|
|
|
|
})
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
this.props.showNotification(`提交成功,等待审核!`);
|
|
|
|
|
|
|
|
|
@ -103,24 +158,6 @@ class Bankcardnumberverification extends Component {
|
|
|
|
|
render() {
|
|
|
|
|
const {getFieldDecorator} = this.props.form;
|
|
|
|
|
const {updating, seconds, secondsFlag, basicInfo, phonebool, emailbool, certification, formationdata, bank_account_editable, leader, bank_account} = this.state
|
|
|
|
|
var bank="";
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
if(this.props.bank_account.bank){
|
|
|
|
|
bank=this.props.bank_account.bank;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var second_bank ="";
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
if(this.props.bank_account.second_bank){
|
|
|
|
|
second_bank=this.props.bank_account.second_bank;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
var card_no="";
|
|
|
|
|
if(this.props.bank_account){
|
|
|
|
|
if(this.props.bank_account.card_no){
|
|
|
|
|
card_no=this.props.bank_account.card_no;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div className="flexdirections mt36">
|
|
|
|
|