Commit 44e07e71 authored by chenqikuai's avatar chenqikuai

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

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