feat:充值记录、更新余额
This commit is contained in:
1 parent
8e12194caf
commit
6925cf0eca
7 files changed
+339
-129
No files matched your search
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 显示价格把分转换到元
|
||||
* @param price
|
||||
* @returns
|
||||
*/
|
||||
export function displayPrice(price: any, suffix: string = "元") {
|
||||
if (typeof price === 'undefined') return '0.0' + suffix
|
||||
const parsedNumber = typeof price === 'string' ? parseFloat(price) : price
|
||||
return (parsedNumber / 100.0).toFixed(1) + suffix
|
||||
}
|
||||
Reference in new issue
Block a user