Commit 6bbdd504 authored by Zhang Xiaojie's avatar Zhang Xiaojie

fix

parent 0cfc2f1e
......@@ -21,11 +21,13 @@
:features="features"
:inst_name="inst_name"
class="mt-5"
@click="$router.push({ name: 'LoanDetail', params: { uuid: hotLoanUuid } })"
@click="
$router.push({ name: 'LoanDetail', params: { uuid: hotLoanUuid } })
"
/>
</Skeleton>
<group-title class="mt-7" title="精彩直播" />
<LiveCard class=" mt-4" />
<LiveCard class="mt-4" />
<group-title
class="mt-7"
v-if="src"
......@@ -34,8 +36,9 @@
/>
<Skeleton :loading="skeLoading" :row="3" class="mt-2">
<img
class=" mx-auto mt-5 w-83 h-22 object-cover object-center rounded-lg"
class="mx-auto mt-5 w-83 h-22 object-cover object-center rounded-lg"
:src="src"
v-if="src"
@click="
$router.push({
name: 'ActivityDetail',
......@@ -126,7 +129,7 @@ export default defineComponent({
product_name: "",
features: "",
inst_name: "",
hotLoanUuid:""
hotLoanUuid: "",
};
},
mounted() {
......@@ -166,8 +169,12 @@ export default defineComponent({
const ret = await queryActivityList({ limit: 1, offset: 0 });
if (ret.code === 200) {
this.skeLoading = false;
this.src = getImageSrcFromFileHash(ret.data.items[0]?.file_name);
this.activityUuid = ret.data.items[0]?.uuid;
if (ret.data.items.length != 0) {
this.src = getImageSrcFromFileHash(ret.data.items[0].file_name);
this.activityUuid = ret.data.items[0].uuid;
} else {
this.src = "";
}
}
},
async fetchLoanProductList() {
......@@ -182,8 +189,8 @@ export default defineComponent({
this.skeLoading = false;
this.hotLoanUuid = ret.data.uuid[0];
const uuid = this.hotLoanUuid;
queryLoanProductInfo( {uuid} ).then((ret) => {
console.log('uuid',uuid);
queryLoanProductInfo({ uuid }).then((ret) => {
console.log("uuid", uuid);
if (ret.code === 200) {
this.max_amount = ret.data.max_amount;
......
......@@ -93,17 +93,18 @@
<group-title
class="mt-7"
title="精彩活动"
v-if="src"
@click="$router.push({ name: 'ActivityList' })"
/>
<Skeleton :loading="skeLoading" :row="3" class="mt-2">
<img
class="mx-5 w-83 h-22 mt-5 rounded-lg"
:src="src"
alt
v-if="src"
@click="
$router.push({
name: 'ActivityDetail',
params: { uuid: uuid },
params: { uuid: activityUuid },
})
"
/>
......@@ -146,12 +147,13 @@ import {
queryLimit,
} from "@/service/LoanProductService";
import { loanMode } from "@/store/loanModeStore";
import { clearSearchResult } from "@/store/loanSearchResultStore"
import { clearSearchResult } from "@/store/loanSearchResultStore";
let skeLoading = ref(false);
let state = reactive({ allProductList: [] as Array<simpleItemInfo> });
const src = ref("");
const uuid = ref("");
const activityUuid = ref("");
const hotNews = ref([]);
const limit = reactive({
en_max_amount: "",
......@@ -183,17 +185,20 @@ const getNews = () => {
});
};
const fetchActivityList = () => {
const fetchActivityList = async () => {
skeLoading.value = true;
queryActivityList({ limit: 1, offset: 0 }).then((ret) => {
const ret = await queryActivityList({ limit: 1, offset: 0 });
if (ret.code === 200) {
skeLoading.value = false;
src.value = getImageSrcFromFileHash(ret.data.items[0]?.file_name);
uuid.value = ret.data.items[0]?.uuid;
if (ret.data.items.length != 0) {
src.value = getImageSrcFromFileHash(ret.data.items[0].file_name);
activityUuid.value = ret.data.items[0].uuid;
} else {
src.value = "";
}
});
skeLoading.value = false;
}
};
const fetchList = () => {
// 取前7贷款产品遍历
skeLoading.value = 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