if(res.data.status === 0) {
const secounds = 5
let num = 0
const timer = setInterval(() => {
if(num < secounds) {
num++
}else {
clearInterval(timer)
alert('自定义函数在这里调用')
}
}, 1000)// 这里的时间不要忘记,否则没有效果
}
if(res.data.status === 0) {
const secounds = 5
let num = 0
const timer = setInterval(() => {
if(num < secounds) {
num++
}else {
clearInterval(timer)
alert('自定义函数在这里调用')
}
}, 1000)// 这里的时间不要忘记,否则没有效果
}