vue method中async await解决回调
// 采取async await 方式调用 async getdetails() { // 异常需要通过try catch捕获 try { const getData = { projectId: this.projectId, }; let location = await getProjectId(getData); if (location.data) { let name =location.data.name; let result = await postProjectDetails(data); if (result.data) { } } } catch (err) { console.log(err); } },