1.技术点:Promise+async+await
2.使用:
async getRealTimeTask(postBody) {
// 接口请求 看你自己的实际封装
let res = await Util.http.post(`/api/bg/getRealTimeTask`, postBody);
console.log(res);
},
3.注意:一定要返回Promise 才能通过await去修饰 从而拿到成功的数据
1.技术点:Promise+async+await
2.使用:
async getRealTimeTask(postBody) {
// 接口请求 看你自己的实际封装
let res = await Util.http.post(`/api/bg/getRealTimeTask`, postBody);
console.log(res);
},
3.注意:一定要返回Promise 才能通过await去修饰 从而拿到成功的数据