console.log("start"); await new Promise(function(resolve, reject) { setTimeout(function(){ $('.tips-box').hide(); $('.tips-box').attr("date-id","1"); console.log("2.5s后"); resolve({status:1}) }, 2500) }) console.log("end");