优化tab的轮播图的数据

This commit is contained in:
A1300399510
2024-03-26 17:30:58 +08:00
parent d8f64a1a5f
commit 9cc3ef52fa
20 changed files with 347 additions and 331 deletions

View File

@@ -1,12 +1,13 @@
<template>
<pageTopBar :bannerList="bannerList.data.apartment"></pageTopBar>
<!-- <pageTopBar :bannerList="bannerList.data.apartment"></pageTopBar> -->
<pageTopBar></pageTopBar>
<!-- 筛选 -->
<div class="screen-box wid1200">
<seach-module @handleTransfer="handleTransfer" :count="listCount" :initPitchValue="pitchValue"></seach-module>
</div>
<div class="list wid1200 flexflex" ref="gridContainer">
<apartment-item v-if="list.length != 0" v-for="item in list" :item="item"></apartment-item>
<apartment-item v-if="list.length != 0" v-for="(item, index) in list" :key="index" :item="item"></apartment-item>
</div>
<div v-if="list.length == 0" class="empty-box wid1200 flexcenter">
@@ -66,7 +67,7 @@ onMounted(() => {
pitchValue.value = store.state.apartmentPitchValue
if (route.query["companyid"]) pitchValue.value["companyid"] = route.query["companyid"]
banner() // 获取轮播图数据
// banner() // 获取轮播图数据
getData() // 获取列表数据
window.addEventListener("scroll", handleScroll)
@@ -147,12 +148,12 @@ const handleTransfer = data => {
}
//轮播
let bannerList = reactive({ data: [] })
let banner = () => {
proxy.$get("/tenement/pc/api/banner").then(res => {
if (res.code === 200) bannerList.data = res.data
})
}
// let bannerList = reactive({ data: [] })
// let banner = () => {
// proxy.$get("/tenement/pc/api/banner").then(res => {
// if (res.code === 200) bannerList.data = res.data
// })
// }
</script>
<style lang="less" scoped>
.screen-box {