Commit 50cc4cb2 authored by Zhang Xiaojie's avatar Zhang Xiaojie

fix

parent 5c200d41
<template>
<Skeleton :row="3" :loading="skeLoading">
<van-swipe class="my-swipe" indicator-color="#3E4FAF" style="marginTop:20px">
<van-swipe class="my-swipe" indicator-color="#3E4FAF" style="margin-top:20px">
<van-swipe-item
class="flex justify-center swpiItem"
v-for="item in hotProductList"
v-for="item in state.hotProductList"
:key="item.value"
>
<LoanHotCard
......@@ -38,11 +38,10 @@ const props = defineProps({
});
let skeLoading = ref(true);
let hotProductList: Array<hotProduct> = reactive([]);
let state = reactive({hotProductList: [] as Array<hotProduct>})
watch(props, (newV, oldV) => {
console.log(props.loanMode);
hotProductList = [];
state.hotProductList = [];
fetchList();
});
......@@ -63,7 +62,7 @@ const fetchList = () => {
queryLoanProductInfo({ uuid }).then((ret) => {
const { rate_lower, max_amount, max_date, inst_name, product_name } =
ret.data;
hotProductList.push({
state.hotProductList.push({
rate_lower,
max_amount,
max_date,
......
......@@ -65,11 +65,12 @@
<!-- 非热门贷款 -->
<GroupTitle
title="贷款精选"
v-if="state.allProductList"
@seeMore="$router.push({ name: 'LoanList', params: { mode: mode } })"
/>
<Skeleton :row="3" :loading="skeLoading" style="marginTop:20px">
<Skeleton :row="3" :loading="skeLoading" style="margin-top: 20px" v-if="state.allProductList">
<LoanCard
v-for="item in allProductList"
v-for="item in state.allProductList"
:key="item.value"
:max_amount="item.max_amount"
:product_name="item.product_name"
......@@ -139,7 +140,7 @@ let skeLoading = ref(false);
const setMode = (v: eLoanMode) => {
mode.value = v;
};
let allProductList: Array<simpleItemInfo> = reactive([]);
let state = reactive({ allProductList: [] as Array<simpleItemInfo> });
const src = ref("");
const uuid = ref("");
const hotNews = ref([]);
......@@ -151,7 +152,7 @@ const limit = reactive({
});
watch(mode, () => {
allProductList = [];
state.allProductList = [];
fetchList();
});
......@@ -189,7 +190,7 @@ const fetchList = () => {
queryLoanProductInfo({ uuid }).then((ret) => {
const { max_amount, inst_name, uuid, features, product_name } =
ret.data;
allProductList.push({
state.allProductList.push({
max_amount,
product_name,
features,
......@@ -202,9 +203,9 @@ const fetchList = () => {
});
};
const formatLimit = (limit:string):string=>{
return Number(limit+'0000').toLocaleString()
}
const formatLimit = (limit: string): string => {
return Number(limit + "0000").toLocaleString();
};
const fetchLimit = () => {
limit.state = true;
......
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