mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
取整 加入 向下取整和 四首五入取整
This commit is contained in:
parent
9d43d6a33d
commit
2b5d41fd67
@ -269,7 +269,11 @@
|
||||
return $that._mathToFixed1(num);
|
||||
} else if ($that.payFeeOrderInfo.toFixedSign == 3) {
|
||||
return $that._mathCeil(num);
|
||||
} else {
|
||||
}else if ($that.payFeeOrderInfo.toFixedSign == 4) {
|
||||
return $that._mathFloor(num);
|
||||
}else if ($that.payFeeOrderInfo.toFixedSign == 5) {
|
||||
return $that._mathRound(num);
|
||||
} else {
|
||||
return $that._mathToFixed2(num);
|
||||
}
|
||||
},
|
||||
@ -301,6 +305,12 @@
|
||||
_mathFloor: function (_price) {
|
||||
return Math.floor(_price);
|
||||
},
|
||||
/**
|
||||
* 四首五入取整
|
||||
*/
|
||||
_mathRound: function (_price) {
|
||||
return Math.round(_price);
|
||||
},
|
||||
/**
|
||||
* 保留小数点后一位
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user