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) => {
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) {
}
console.log("componentDidUpdate");
console.log(this.props);
console.log(prevProps);
////console.log("Registration");
////console.log("componentDidUpdate");
////console.log(this.props.user.admin);
try {
if(this.props.bank_account){
this.props.form.setFieldsValue({
openingbank: this.props.bank_account.bank,
subbranch: this.props.bank_account.second_bank,
subbranchs: this.props.bank_account.card_no,
})
}
}).catch((error) => {
console.log(error);
})
this.setState({
openingbank: this.props.bank_account.bank,
subbranch: this.props.bank_account.second_bank,
subbranchs: this.props.bank_account.card_no,
})
}catch (e) {
}
}
}
yhBankstrue = () => {
this.props.form.validateFieldsAndScroll((err, values) => {

Loading…
Cancel
Save