💪 optimize: 优化代码逻辑

This commit is contained in:
wangsongsole 2023-10-09 18:05:18 +08:00
parent a79996875f
commit cdf0338696
1 changed files with 4 additions and 2 deletions

View File

@ -752,14 +752,16 @@ export default class addKnockGold extends Component {
onChange={({ target }) => { onChange={({ target }) => {
this.onHandleChange(target.value, "channel") this.onHandleChange(target.value, "channel")
if (target.value == 1) { if (target.value == 1) {
this.onHandleChange("voucher_wechat_lsxd", "provider")
this.onHandleChange(defaultInstructionZfb, "instruction") this.onHandleChange(defaultInstructionZfb, "instruction")
} else if (target.value == 2) { } else if (target.value == 2) {
this.onHandleChange(defaultInstructionWx, "instruction") this.onHandleChange(defaultInstructionWx, "instruction")
} else { } else {
this.onHandleChange("voucher_wechat_lsxd", "provider")
this.onHandleChange("", "instruction") this.onHandleChange("", "instruction")
} }
/* 不是微信渠道时 重置主体value */
if (target.value != 2) {
this.onHandleChange("voucher_wechat_lsxd", "provider")
}
}} }}
value={this.state.model.channel} value={this.state.model.channel}
> >