Commit c42220e1 by zhanghaozhe

定金支付页面余额为0

parent 8347ddd6
......@@ -181,6 +181,9 @@ class Order extends Component {
useBalance = () => {
let {user_account, depositPrice} = this.state
if (parseFloat(user_account) === 0) {
return
}
let offset = parseFloat(user_account) - parseFloat(depositPrice)
offset = offset > 0 ? depositPrice : user_account
this.setState(prevState => ({useBalance: !prevState.useBalance, offset}))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment