This commit is contained in:
李志鹏
2026-04-21 15:57:59 +08:00
parent 483b78ada2
commit 9cd63c90c9
28 changed files with 1568 additions and 6 deletions

View File

@@ -183,4 +183,15 @@ export async function shareImageToWhatsapp (url: string){
const whatsappLink = `https://api.whatsapp.com/send/?text=${encodeURIComponent(message)}`
window.open(whatsappLink, '_blank')
}
}
}
/**
* 倒计时
* @param time 倒计时时间,单位秒
* @returns 倒计时字符串,格式为 mm:ss
*/
export function CountDown(time: number) {
const mm = String(Math.floor(time / 60)).padStart(2, '0');
const ss = String(time % 60).padStart(2, '0');
return `${mm}:${ss}`;
}