function sum(a, b){ return new Promise((resolve, reject)){ setTimeout(()=>{ return a+b; }, 100000); // 10s后返回求和结果 } } getSumAsync: async funtion(){ let res = await sun(1, 2); console.log("sum:"+res); }