实现N秒的倒计时
layer.msg('服务器访问失败', {
time: 2000, //20s后自动关闭
});
let i = 1
window.setInterval(()=>{
i--
if(i==0){
layer.closeAll()
}
},1000)