Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_home
杨树明 5 years ago
commit 663e5103ca

@ -62,38 +62,30 @@ class Bankcardnumberverification extends Component {
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {
if (prevProps.bank_account != this.props.bank_account) { if (prevProps.bank_account != this.props.bank_account) {
let url = `/competitions/${this.props.match.params.identifier}/prize.json`; console.log("componentDidUpdate");
let query=this.props.location&&this.props.location.search; console.log(this.props);
const types = query.split('user_id=') console.log(prevProps);
let userid; ////console.log("Registration");
if(types[1]===undefined){ ////console.log("componentDidUpdate");
userid=this.props.user&&this.props.user.user_id; ////console.log(this.props.user.admin);
}else{ try {
userid=types[1]; if(this.props.bank_account){
} this.props.form.setFieldsValue({
axios.get(url,{params:{ openingbank: this.props.bank_account.bank,
user_id:userid, subbranch: this.props.bank_account.second_bank,
} subbranchs: this.props.bank_account.card_no,
}).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) => { this.setState({
console.log(error); openingbank: this.props.bank_account.bank,
}) subbranch: this.props.bank_account.second_bank,
subbranchs: this.props.bank_account.card_no,
})
}catch (e) {
}
} }
} }
yhBankstrue = () => { yhBankstrue = () => {
this.props.form.validateFieldsAndScroll((err, values) => { this.props.form.validateFieldsAndScroll((err, values) => {

Loading…
Cancel
Save