登录
This commit is contained in:
@@ -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}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user