Commit cb04f89f authored by chenqikuai's avatar chenqikuai

fix

parent d2e5dee8
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
> >
<LoanCard <LoanCard
v-for="item in state.allProductList" v-for="item in state.allProductList"
:key="item.value" :key="item.uuid"
:max_amount="item.max_amount" :max_amount="item.max_amount"
:product_name="item.product_name" :product_name="item.product_name"
:features="item.features" :features="item.features"
...@@ -217,26 +217,32 @@ const fetchList = () => { ...@@ -217,26 +217,32 @@ const fetchList = () => {
}).then((ret) => { }).then((ret) => {
if (ret.code === 200) { if (ret.code === 200) {
skeLoading.value = false; skeLoading.value = false;
const promiseList = [] as Promise<any>[]
ret.data.uuid.map((uuid) => { ret.data.uuid.map((uuid) => {
queryLoanProductInfo({ uuid }).then((ret) => { const promise = queryLoanProductInfo({ uuid }).then((ret) => {
const { const {
max_amount, max_amount,
inst_name, inst_name,
uuid, uuid,
features, features,
product_name, product_name,
product_status,
} = ret.data; } = ret.data;
count.value = count.value + 1; count.value = count.value + 1;
state.allProductList.push({ return {
max_amount, max_amount,
product_name, product_name,
features, features,
inst_name, inst_name,
uuid, uuid,
}); }
}); });
promiseList.push(promise)
}); });
Promise.all(promiseList).then(list=>{
list.forEach(i=>{
state.allProductList.push(i)
})
})
} }
}); });
count.value = 0; count.value = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment