feat: 微客宝H5客户端 - 基础架构+核心页面

This commit is contained in:
li
2026-03-14 19:44:03 +08:00
parent 54d2f617bb
commit 0e974da09c
3738 changed files with 811180 additions and 21 deletions
+14
View File
@@ -0,0 +1,14 @@
import { padZero } from "../utils/index.mjs";
function getDate(timeStamp) {
const date = new Date(timeStamp * 1e3);
return `${date.getFullYear()}.${padZero(date.getMonth() + 1)}.${padZero(
date.getDate()
)}`;
}
const formatDiscount = (discount) => (discount / 10).toFixed(discount % 10 === 0 ? 0 : 1);
const formatAmount = (amount) => (amount / 100).toFixed(amount % 100 === 0 ? 0 : amount % 10 === 0 ? 1 : 2);
export {
formatAmount,
formatDiscount,
getDate
};