// 获取类别
loadType() {
return this.$axios.get("***/***/gettype?code=type");
},
// 获取详情
loadDetail() {
return this.$axios.get("***/***/Detail", {
params: { billcode: this.billcode }
});
},
load() {
var that = this;
this.$axios.all([that.loadType(), that.loadDetail()]).then(
that.$axios.spread(function(TypeRes, detailRes) {
console.log("所有请求完成");
console.log("请求1结果", TypeRes);
console.log("请求2结果", detailRes);
})
);
},
axios.all()解决并发请求
最新推荐文章于 2023-06-23 18:00:44 发布