
发布房源
@@ -80,8 +87,18 @@
@@ -131,7 +148,7 @@
@@ -142,7 +159,7 @@
\ No newline at end of file
diff --git a/src/components/pageTopBar/pageTopBar.vue b/src/components/pageTopBar/pageTopBar.vue
index 4cb8ba9..d58067e 100644
--- a/src/components/pageTopBar/pageTopBar.vue
+++ b/src/components/pageTopBar/pageTopBar.vue
@@ -58,12 +58,12 @@
\ No newline at end of file
diff --git a/src/views/housingView/apartment.vue b/src/views/housingView/apartment.vue
index f520f9e..779020f 100644
--- a/src/views/housingView/apartment.vue
+++ b/src/views/housingView/apartment.vue
@@ -3,11 +3,14 @@
-
+
+
+
@@ -23,6 +26,7 @@ import biserialItem from '../../components/biserialListItem/biserialListItem.vue
import apartmentItem from '@/components/public/apartment-item.vue';
import haveQuestions from '@/components/public/have-questions.vue'
import pageFooter from '@/components/footer/footer.vue'
+import emptyDuck from '@/components/public/empty-duck.vue'
import { ref, onMounted, onUnmounted, watch, getCurrentInstance, nextTick } from 'vue';
import { ElLoading } from 'element-plus'
import Masonry from 'masonry-layout';
@@ -38,6 +42,7 @@ const gridContainer = ref(null);
let list = ref([])
+let listCount = ref(0) // 列表数量
let masonryInstance = null
@@ -75,6 +80,8 @@ const getData = () => {
let data = res.data
list.value = list.value.concat(data.data)
page = data.page * data.limit >= data.count ? 0 : page + 1
+
+ listCount = data.count
nextTick(() => {
masonryInstance.reloadItems();
masonryInstance.layout();
@@ -93,25 +100,28 @@ const handleScroll = () => {
const scrollHeight = document.documentElement.scrollHeight;
const clientHeight = document.documentElement.clientHeight;
const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
-
- if (scrollTop + clientHeight >= scrollHeight) {
- // 进行滚动到底部时的操作
- console.log('已滚动到底部');
- // 执行其他操作...
- getData()
- }
+ if (scrollTop + clientHeight >= scrollHeight) getData()
};
let pitchValue = {}
// 筛选组件的参数的中转
const handleTransfer = (data) => {
- // console.log("data", data.value);
- pitchValue = { ...data.value }
- // console.log("data", pitchValue);
- page = 1
- list.value = []
- getData()
+ for (const key in data.value) {
+ console.log(data.value[key] != pitchValue[key]);
+ if (data.value[key] != pitchValue[key]) {
+ pitchValue = { ...data.value }
+
+ page = 1
+ list.value = []
+ getData()
+ }
+ // if () {
+
+ // }
+ }
+
+
}
@@ -131,4 +141,16 @@ const handleTransfer = (data) => {
width: 386px;
}
}
+
+.empty-box {
+ width: 1200px;
+ height: 500px;
+ background-color: rgba(255, 255, 255, 1);
+ border-radius: 16px;
+ -moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
+ -webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
+ box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.0784313725490196);
+ justify-content: center;
+ margin: 0 auto;
+}
diff --git a/src/views/user.vue b/src/views/user.vue
index 9ab7f70..2bd04df 100644
--- a/src/views/user.vue
+++ b/src/views/user.vue
@@ -69,11 +69,17 @@
共 {{ count['publish'] }} 条房源(上架 {{ stat['listing'] }} | 草稿 {{ stat['draft']
}} | 下架 {{ stat['offshelf'] }})
-
-
-
+
+
+
@@ -91,6 +97,7 @@ import systematicNotificationPop from '@/components/user/systematic-notification
import haveQuestions from '@/components/public/have-questions.vue'
import pageFooter from '@/components/footer/footer.vue'
import biserialListItem from '@/components/biserialListItem/biserialListItem.vue'
+import publicListItem from '@/components/public/public-list-item.vue'
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
const { proxy } = getCurrentInstance()
import { ElLoading } from 'element-plus'
@@ -105,7 +112,7 @@ let user = ref({})
let count = ref({}) // 发布和收藏的数量
let newmessagenum = ref(0)
let validityidentity = ref('')
-let tabState = ref('publish') // fav publish
+let tabState = ref('fav') // fav publish
const identityObj = {
1: "中介认证",
@@ -117,13 +124,15 @@ async function init() {
if (res.code != 200) return
let data = res.data
- if (data.count['publish'] > 0) {
- tabState.value = 'publish'
- getPublishData()
- } else {
- tabState.value = 'fav'
- getFavData()
- }
+ // if (data.count['publish'] > 0) {
+ // tabState.value = 'publish'
+ // getPublishData()
+ // } else {
+ // tabState.value = 'fav'
+ // getFavData()
+ // }
+
+ getFavData()
user.value = data.user
count.value = data.count
@@ -408,6 +417,4 @@ const cutTab = (value) => {
margin-bottom: 20px;
}
}
-
-