feat:额外收费
This commit is contained in:
1 parent
f1e9c596b5
commit
1bd2ba3a8e
12 files changed
+749
-209
No files matched your search
@@ -9,6 +9,12 @@ export function displayPrice(price: any, suffix: string = "元", fixed = 2) {
|
||||
return (parsedNumber / 100.0).toFixed(fixed) + suffix
|
||||
}
|
||||
|
||||
export function displayYuanToYuan(price: any, suffix: string = "元", fixed = 2) {
|
||||
if (typeof price === "undefined") return "0.00" + suffix
|
||||
const parsedNumber = typeof price === "string" ? parseFloat(price) : price
|
||||
return parsedNumber.toFixed(fixed) + suffix
|
||||
}
|
||||
|
||||
export function displayWeight(price: any, fixed = 2) {
|
||||
if (typeof price === "undefined") return "0"
|
||||
const parsedNumber = typeof price === "string" ? parseFloat(price) : price
|
||||
|
||||
Reference in new issue
Block a user