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

fix

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