Promise.all([loanproducttype(),getloanproductlist(p)]).then((result) => {
this.loading = false;
//產品類型
this.producttypes = result[0].jbody.loanProductTypes;
console.log(this.producttypes);
for(var i= 0;i<this.producttypes.length;i++){
this.productTypeNameKV[this.producttypes[i].productType] = this.producttypes[i].productTypeName;
}
//表格數據
this.data1 = result[1].jbody.pageInfo.list;
this.total1 = result[1].jbody.pageInfo.total;
}).catch((error) => {
this.loading = false;
console.log(error)
})
loanproducttype()是請求產品類型 的方法,result[0] 是該接口的返回值。
getloanproductlist(p) 是表格數據的方法,result[1] 是該接口的返回值。
我們遇到什么困難,也不要怕,微笑着面對Ta,消除恐懼的最好辦法就是面對恐懼,加油奧利給!!!