修改没有房产的页面

This commit is contained in:
赵毅 2025-09-03 16:27:50 +08:00
parent f6741c1a9b
commit f58cec3d0d
5 changed files with 162 additions and 91 deletions

View File

@ -201,7 +201,7 @@ export default {
? this.city.ad_code
: uni.getStorageSync("ad_code"),
page_num: this.page_num,
page_size: this.page_size,
page_size: 9999,
}).then((res) => {
console.log(res.rows);
this.communityList = res.rows;

View File

@ -106,6 +106,18 @@ image {
position: relative;
}
.swiperBox_no1 {
height: 300rpx;
width: 710rpx;
position: relative;
margin-top: 170rpx;
margin: 170rpx auto 0;
}
.swiperBox_no_img{
border-radius: 15rpx;
}
.swiperBox1 swiper {
height: 100%;
}
@ -154,6 +166,12 @@ image {
margin-top: -96rpx;
}
.swiperBox_no2 {
height: 150rpx;
width: 710rpx;
margin: 0 auto;;
}
.funcList {
display: flex;
align-items: center;

View File

@ -1,21 +1,59 @@
<template>
<div class="container">
<div class="empty" v-if="communityList.length == 0">
<view class="container">
<!-- <view class="empty" v-if="communityList.length == 0">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png" alt="" />
<text>当前账户未绑定任何项目房源信息</text>
<button class="emptyBtn" @click="addCommunity">新增房产绑定</button>
<!-- <button class="emptyBtn2" @click="refresh">刷新</button> -->
</div>
<div v-else>
<div class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<div class="searchBox_add">
<div class="emptyCommunity" @click="addCommunity">
{{ communityVal }}
</div>
</div>
</div>
</view> -->
<div class="swiperBox1">
<view v-if="communityList.length == 0">
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add">
<view class="emptyCommunity" @click="addCommunity">
{{ communityVal }}
</view>
</view>
</view>
<view class="swiperBox_no1">
<swiper @animationfinish="swipers" autoplay circular>
<image src="http://localhost:8080/community_no_image1.png" mode="aspectFill" class="swiperBox_no_img"
@click="addCommunity" />
</swiper>
<view class="dot">
<view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
:key="index">
</view>
</view>
</view>
<view class="swiperBox_no2">
<swiper @animationfinish="swipers" autoplay circular>
<image src="http://localhost:8080/community_no_image2.png" mode="aspectFill" class="swiperBox_no_img"
@click="addCommunity" />
</swiper>
</view>
<view class="funcList">
<u-grid :col="rowNum" :border="false">
<u-grid-item v-for="(item, index) in functionList" @click="addCommunity" :key="index">
<image class="grid_Pic" :src="item.nav_icon" mode=""></image>
<text class="grid_Text">{{ item.nav_name }}</text>
</u-grid-item>
</u-grid>
</view>
</view>
<view v-else>
<view class="searchBox" :style="{ height: localHeight + 'px', paddingTop: top + 'px' }">
<view class="searchBox_add">
<view class="emptyCommunity" @click="addCommunity">
{{ communityVal }}
</view>
</view>
</view>
<view class="swiperBox1">
<swiper @animationfinish="swipers" autoplay circular>
<swiper-item v-for="(item, index) in bannerList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" />
@ -27,15 +65,15 @@
:key="index">
</view>
</view>
</div>
</view>
<div class="swiperBox2">
<view class="swiperBox2">
<swiper @animationfinish="swipers" autoplay circular>
<swiper-item v-for="(item, index) in streamerList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" class="swiperBox2_img" />
</swiper-item>
</swiper>
</div>
</view>
<view class="funcList">
<u-grid :col="rowNum" :border="false">
@ -46,66 +84,66 @@
</u-grid>
</view>
<div v-for="(item, index) in tileList" :key="index" :class="['ads', index == 0 ? 'ads_first' : '']"
<view v-for="(item, index) in tileList" :key="index" :class="['ads', index == 0 ? 'ads_first' : '']"
@click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" />
</div>
</view>
<div class="tabs">
<div v-for="(item, index) in categoryList" :key="index"
<view class="tabs">
<view v-for="(item, index) in categoryList" :key="index"
:class="['tabItem', selectedTab === index ? 'active2' : '']" @click="selectTab(index, item)">
{{ item.category_name }}
</div>
</div>
</view>
</view>
<div class="newsList">
<div class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
<div class="newsItem_left">
<div class="newsItem_left_tit">{{ item.title }}</div>
<div class="newsItem_left_sub">{{ item.author }}</div>
</div>
<div class="newsItem_right">
<view class="newsList">
<view class="newsItem" v-for="item in infoList" @click="detail(item)" :key="item.id">
<view class="newsItem_left">
<view class="newsItem_left_tit">{{ item.title }}</view>
<view class="newsItem_left_sub">{{ item.author }}</view>
</view>
<view class="newsItem_right">
<image :src="item.list_image" mode="aspectFill" />
</div>
</div>
</div>
</view>
</view>
</view>
<div class="tips">{{ loadMoreText }}</div>
<view class="tips">{{ loadMoreText }}</view>
<div class="bigAds" v-if="ads1Show">
<div class="bigAdsCon">
<div class="bigAdsCon_img">
<view class="bigAds" v-if="ads1Show">
<view class="bigAdsCon">
<view class="bigAdsCon_img">
<swiper @animationfinish="swipers" autoplay circular>
<swiper-item v-for="(item, index) in largePopList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" />
</swiper-item>
</swiper>
</div>
<div class="close" @click="closeAds">
</view>
<view class="close" @click="closeAds">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_close.png">
</image>
</div>
</div>
</div>
</view>
</view>
</view>
<div class="bigAds" v-if="ads2Show">
<div class="bigAdsCon2">
<div class="bigAdsCon2_img">
<view class="bigAds" v-if="ads2Show">
<view class="bigAdsCon2">
<view class="bigAdsCon2_img">
<swiper :current="currentSwiperIndex" @change="onSwiperChange" @animationfinish="swipers" autoplay circular>
<swiper-item v-for="(item, index) in popList" :key="index">
<image :src="item.ad_picture" mode="aspectFill" />
</swiper-item>
</swiper>
</div>
<div class="AdsBtnList">
<div class="AdsBtnItem1" @click="closeAds2">取消</div>
<div class="AdsBtnItem2" @click="onDetailClick">了解详情</div>
</div>
</div>
</div>
</div>
</view>
<view class="AdsBtnList">
<view class="AdsBtnItem1" @click="closeAds2">取消</view>
<view class="AdsBtnItem2" @click="onDetailClick">了解详情</view>
</view>
</view>
</view>
</view>
<nav-footer :current="3" />
</div>
</view>
</template>
<script>
@ -136,7 +174,7 @@ export default {
functionList: [
{
create_time: "2025-07-04 17:28:35",
create_time: "",
id: 4,
is_published: 1,
jump_target: 1,
@ -146,11 +184,11 @@ export default {
other_appid: "",
other_path: "",
sort: 5,
update_time: "2025-08-29 11:39:54",
update_time: "",
visible_communities: ""
},
{
create_time: "2025-07-05 10:48:27",
create_time: "",
id: 5,
is_published: 1,
jump_target: 1,
@ -160,11 +198,11 @@ export default {
other_appid: "",
other_path: "",
sort: 4,
update_time: "2025-08-29 11:40:02",
update_time: "",
visible_communities: "",
},
{
create_time: "2025-07-05 10:49:02",
create_time: "",
id: 7,
is_published: 1,
jump_target: 1,
@ -174,7 +212,7 @@ export default {
other_appid: "",
other_path: "",
sort: 2,
update_time: "2025-08-29 11:39:21",
update_time: "",
visible_communities: ""
}
],
@ -243,7 +281,6 @@ export default {
res.rows = res.rows.filter((item) => {
return item.front_end_display != 1;
});
console.log("🚀 ~ onLoad ~ res.rows:", res.rows)
if (!uni.getStorageSync("changeCommData")) {
uni.setStorageSync("changeCommData", { name: res.rows[0].name, id: res.rows[0].community_id })
uni.setStorageSync("isShowNav", res.rows[0].room_owner_list[0].type)
@ -258,7 +295,6 @@ export default {
if (this.communityList.length == 0) {
this.communityVal = "添加我的房产";
} else {
console.log("🚀 ~ onLoad ~ this.communityList:", this.communityList)
this.communityVal = uni.getStorageSync("changeCommData").name;
}
this.getfunctionNum();

View File

@ -1,6 +1,7 @@
page {
background-color: #f6f7fb;
background-color: #ffffff;
padding: 0;
overflow-y: hidden;
}
.container {
@ -22,9 +23,22 @@ image {
margin-top: 180rpx;
}
.emptyTitle {
font-size: 36rpx;
color: #222222;
margin-top: 50rpx;
font-weight: bold;
}
.emptyMsg {
font-size: 28rpx;
color: #999999;
margin: 30rpx;
}
.empty image {
width: 340rpx;
height: 240rpx;
width: 500rpx;
height: 400rpx;
}
.addBtn {
@ -57,11 +71,13 @@ image {
border-bottom: 1rpx solid #EBEBEB;
padding: 30rpx 0;
}
.communityItem_left{
.communityItem_left {
display: flex;
align-items: center;
}
.communityItem_left_img {
width: 160rpx;
height: 140rpx;
@ -69,9 +85,11 @@ image {
overflow: hidden;
margin-right: 30rpx;
}
.communityItem_left_msg{
.communityItem_left_msg {
flex: 1;
}
.communityItem_left_msg_tit {
font-size: 30rpx;
color: #222222;
@ -86,7 +104,7 @@ image {
color: #999999;
}
.communityItem_right{
.communityItem_right {
width: 34rpx;
height: 34rpx;
margin-left: 80rpx;

View File

@ -1,35 +1,35 @@
<template>
<view class="container">
<view class="empty" v-if="communityList.length == 0">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_newEmpty.png"
<view class="emptyTitle">绑定房源</view>
<view class="emptyMsg">请绑定房源信息 以便使用其他功能</view>
<image src="http://localhost:8080/community_no_image3.png"
alt="" />
没有添加任何房产
</view>
<div class="communityList">
<div class="communityItem" v-for="item in communityList" :key="item.community_id"
<view class="communityList">
<view class="communityItem" v-for="item in communityList" :key="item.community_id"
@click="choseCommunity(item)">
<div class="communityItem_left">
<div class="communityItem_left_img">
<view class="communityItem_left">
<view class="communityItem_left_img">
<image :src="item.pic" mode="aspectFill"></image>
</div>
<div class="communityItem_left_msg">
<div class="communityItem_left_msg_tit">{{ item.name }}<span> {{ item.room_owner_list.length }}
</span></div>
<div class="communityItem_left_msg_msg">{{ item.addr }}</div>
</div>
</div>
<div class="communityItem_right">
</view>
<view class="communityItem_left_msg">
<view class="communityItem_left_msg_tit">{{ item.name }}<span> {{ item.room_owner_list.length }}
</span></view>
<view class="communityItem_left_msg_msg">{{ item.addr }}</view>
</view>
</view>
<view class="communityItem_right">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check1.png"
v-if="item.community_id != currentCommunity.id"></image>
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_check2.png"
v-if="item.community_id == currentCommunity.id"></image>
</div>
</div>
</div>
</view>
</view>
</view>
<div class="addBtn" @click="addCommunity">添加我的房产</div>
<view class="addBtn" @click="addCommunity">去绑定房源</view>
</view>
</template>
@ -80,7 +80,6 @@ export default {
uni.setStorageSync('changeCommData', { id: e.community_id, name: e.name });
uni.setStorageSync('currentCommunityAddr',e.addr);
uni.setStorageSync("isShowNav", e.room_owner_list[0].type)
console.log("🚀 ~ choseCommunity ~ e.room_owner_list[0].type:", e.room_owner_list[0].type)
NavgateTo("1")
},
},