更新有赚绑定银行卡逻辑判断 review by sunkai
Showing
1 changed file
with
8 additions
and
2 deletions
@@ -60,7 +60,13 @@ export default class BankCard extends Component { | @@ -60,7 +60,13 @@ export default class BankCard extends Component { | ||
60 | 60 | ||
61 | let bankBranch = this.state.bankBranch; | 61 | let bankBranch = this.state.bankBranch; |
62 | if (!bankBranch || !bankBranch.trim()) { | 62 | if (!bankBranch || !bankBranch.trim()) { |
63 | - this.setState({messageTips: '请输入分行/支行信息'}); | 63 | + this.setState({messageTips: '请输入正确的分行和支行信息'}); |
64 | + return | ||
65 | + } | ||
66 | + | ||
67 | + bankBranch = bankBranch.trim(); | ||
68 | + if (bankBranch.length < 4) { | ||
69 | + this.setState({messageTips: '请输入正确的分行和支行信息'}); | ||
64 | return | 70 | return |
65 | } | 71 | } |
66 | 72 | ||
@@ -72,7 +78,7 @@ export default class BankCard extends Component { | @@ -72,7 +78,7 @@ export default class BankCard extends Component { | ||
72 | } | 78 | } |
73 | 79 | ||
74 | this.setState({messageTips: '', isUpdate: true}); | 80 | this.setState({messageTips: '', isUpdate: true}); |
75 | - this.props.checkBankCard && this.props.checkBankCard(this.state.name, this.state.number, this.state.bankCode, this.state.cardNo,this.state.bankBranch); | 81 | + this.props.checkBankCard && this.props.checkBankCard(this.state.name, this.state.number, this.state.bankCode, this.state.cardNo,bankBranch); |
76 | } | 82 | } |
77 | 83 | ||
78 | renderUnBind() { | 84 | renderUnBind() { |
-
Please register or login to post a comment