处理了充值的最大值限制

This commit is contained in:
Xu Chang 2024-05-22 13:57:00 +08:00
parent af13a530ac
commit 88d5b7bcdf
2 changed files with 6 additions and 0 deletions

View File

@ -52,6 +52,9 @@ export default OakComponent({
else {
let price = ToCent(price2);
this.props.onSetPrice(price);
if (this.props.depositMaxCent && price > this.props.depositMaxCent) {
price = this.props.depositMaxCent;
}
this.setState({
price,
priceStr: ToYuan(price),

View File

@ -54,6 +54,9 @@ export default OakComponent({
else {
let price = ToCent(price2);
this.props.onSetPrice!(price);
if (this.props.depositMaxCent && price > this.props.depositMaxCent) {
price = this.props.depositMaxCent
}
this.setState({
price,
priceStr: ToYuan(price),