querysqfaxx() {
const params = {
salesId:1,
}
this.$axios.get(this.api.salesSupport.querySalesPlans, {params}).then((res) => {
this.commonGetResData(res).then(data => {
this.sqfaxxidData = data;
const list = []
for(let i of this.sqfaxxidData){
const params = {
id:i.planid
}
list.push(this.$axios.get(this.api.plan.queryPlanById, {params}))
}
Promise.all(list).then(ress => {
this.sqfaxxData=ress
})
});
});
}
for循环调用接口返回的数据放在同一个列表中
最新推荐文章于 2024-01-04 11:36:42 发布