小程序充值允许保留两位小数
This commit is contained in:
parent
d3ba00901f
commit
2e72a23412
|
|
@ -87,9 +87,9 @@ export default OakComponent({
|
|||
this.onPriceChange(value);
|
||||
}
|
||||
else {
|
||||
const price2 = parseInt(value);
|
||||
const price2 = Number(value);
|
||||
if (!isNaN(price2)) {
|
||||
this.onPriceChange(price2);
|
||||
this.onPriceChange(Math.round(price2 * 100) / 100);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -90,9 +90,9 @@ export default OakComponent({
|
|||
this.onPriceChange(value);
|
||||
}
|
||||
else {
|
||||
const price2 = parseInt(value);
|
||||
const price2 = Number(value);
|
||||
if (!isNaN(price2)) {
|
||||
this.onPriceChange(price2);
|
||||
this.onPriceChange(Math.round(price2 * 100) / 100);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue