mod(custom): test
This commit is contained in:
@@ -131,12 +131,15 @@ const get_list = async () => {
|
||||
const timeStr = ref('')
|
||||
|
||||
const countdownFn = () => {
|
||||
const { drawTime } = kjData.value
|
||||
const currentTimestamp = dayjs().valueOf()
|
||||
const timeLeft = drawTime * 1000 - currentTimestamp
|
||||
const timeLeft = kjData.value.drawTime * 1000 - currentTimestamp
|
||||
timeStr.value = dayjs(timeLeft).format('mm分ss秒')
|
||||
|
||||
if (currentTimestamp > drawTime * 1000) {
|
||||
const m = Number(dayjs(timeLeft).format('mm'))
|
||||
const s = Number(dayjs(timeLeft).format('ss'))
|
||||
|
||||
if (m === 0 && s === 0) {
|
||||
console.log('结束')
|
||||
clearInterval(timeId.value)
|
||||
get_list()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user