javascript
// 微信小程序睡眠X秒
sleep(numberMillis) {
var now = new Date();
var exitTime = now.getTime() + numberMillis;
while (true) {
now = new Date();
if (now.getTime() > exitTime) {
return;
}
}
},
javascript
// 微信小程序睡眠X秒
this.sleep(2000);