请求三个接口:
this.$modal.confirm('是否对id为"' + this.ids + '"的数据发起申请?').then(() => {
// 发起第一个请求
return getInitiate(data);
}).then(() => {
// 第一个请求成功后,继续发起第二个请求
return Promise.all([
drawingQr(this.itemList[0].id)
]);
}).then(() => {
// 第二个请求成功后,继续发起第三个请求
return Promise.all([
updateStatus(data),
this.getList()
]);
}).then(() => {
// 所有请求都成功后,显示成功消息
this.$modal.msgSuccess("申请成功");
}).catch(() => {
// 捕获错误
});