Commit 44e07e71 authored by chenqikuai's avatar chenqikuai

fix: 修复 产品精选-更多,无法显示产品信息

fix #214
parent 0606b20a
......@@ -2,7 +2,12 @@
<div class="page">
<NavBar title="全部产品" />
<div class="layer1 flex-col">
<GroupTitle class="mt-4" title="产品精选" iconName="icon-shaixuan" @filter="showFilter" />
<GroupTitle
class="mt-4"
title="产品精选"
iconName="icon-shaixuan"
@filter="showFilter"
/>
</div>
<!-- 产品列表 -->
<van-list
......@@ -79,7 +84,10 @@ import {
queryBankList,
} from "@/service/LoanProductService/index";
import { simpleItemInfo } from "@/views/withMenu/Loan/types";
import { eProductStatus, iLoanProdcutItem } from "@/service/LoanProductService/type";
import {
eProductStatus,
iLoanProdcutItem,
} from "@/service/LoanProductService/type";
import { Skeleton, Toast } from "vant";
import {
loanSearchState,
......@@ -148,7 +156,7 @@ export default defineComponent({
limit: LIST_SIZE,
offset: offset.value,
loan_type: mode.value,
product_status: eProductStatus.published
product_status: eProductStatus.published,
}).then((ret) => {
loading.value = false;
if (ret.code === 200) {
......@@ -159,7 +167,7 @@ export default defineComponent({
ret.data.uuid.map((uuid) => {
const promise = queryLoanProductInfo({ uuid }).then((ret) => {
const { max_amount, inst_name, uuid, features, product_name } =
ret.data;
ret.data || {};
return {
max_amount,
product_name,
......@@ -169,13 +177,12 @@ export default defineComponent({
};
});
promiseList.push(promise);
}
);
});
Promise.all(promiseList).then((list) => {
list.forEach(i => {
setSearchResult(i)
})
})
list.forEach((i) => {
setSearchResult(i);
});
});
}
});
};
......@@ -323,7 +330,9 @@ export default defineComponent({
min_amount: +this.reqParams.min2! ? +this.reqParams.min2! : 0,
max_amount: +this.reqParams.max2! ? +this.reqParams.max2! : 9999,
bank_code: this.reqParams.selectedBanks[0],
date: this.reqParams.selectedPerids[0] ? this.reqParams.selectedPerids[0].date : undefined,
date: this.reqParams.selectedPerids[0]
? this.reqParams.selectedPerids[0].date
: undefined,
loan_type: this.mode,
product_status: 4,
guarantee_type: this.reqParams.selectedTypes[0]
......@@ -335,7 +344,7 @@ export default defineComponent({
clearSearchResult();
ret.data.items.map((item) => {
const { max_amount, inst_name, uuid, features, product_name } =
item;
item || {};
setSearchResult({
max_amount,
product_name,
......
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