diff --git a/packageA/search/index.vue b/packageA/search/index.vue index 0502efa..510f294 100644 --- a/packageA/search/index.vue +++ b/packageA/search/index.vue @@ -27,46 +27,44 @@ - - - - - - - - - - - {{item.platform_title}} - - - - {{e}} - + + + + + + + + + + {{item.platform_title}} + + + + {{e}} + - + + + + + + {{item.address_city_text}} - - - - - {{item.address_city_text}} - - - {{item.release_time_text}} - - - {{item.views}} - + + {{item.release_time_text}} + + + {{item.views}} @@ -78,7 +76,7 @@ - @@ -111,12 +109,14 @@ - + + :src="item.full_image"> - {{item.title}} + {{item.title}} + {{item.release_time_text}} @@ -133,14 +133,16 @@ - + - 暂无数据信息 - --> + + 请输入要搜索的内容 + 暂无相关数据 + @@ -176,9 +178,9 @@ }, ]; const currentTab = ref(0) - const collectRentList = ref([]) + const searchRentList = ref([]) const rentCount = ref(0) - const collectSchoolList = ref([]) + const searchClassesList = ref([]) const schoolCount = ref(0) const mallList = ref([]) const mallCount = ref(0) @@ -212,16 +214,33 @@ function onChange(e) { console.log('onChange', e); currentTab.value = e.index - console.log('切换tabs', currentTab.value,listQuery.value.keywords); - if(listQuery.value.keywords != null) { + console.log('切换tabs', currentTab.value, listQuery.value.keywords); + if (listQuery.value.keywords != null) { if (currentTab.value == 0) { - collectRentList.value = []; - getRentList(); + searchRentList.value = []; + if(listQuery.value.keywords == null || listQuery.value.keywords == '') { + + }else { + getRentList(); + } + } else if (currentTab.value == 1) { - collectSchoolList.value = []; - getSchoolList(); + searchClassesList.value = []; + if(listQuery.value.keywords == null || listQuery.value.keywords == '') { + + }else { + getSchoolList(); + } + } else { - getGoods(); + mallList.value = []; + if(listQuery.value.keywords == null || listQuery.value.keywords == '') { + + }else { + getGoods(); + // getRentList(); + } + } } } @@ -229,12 +248,13 @@ function search(e) { console.log('搜索', e.value); if (currentTab.value == 0) { - collectRentList.value = []; + searchRentList.value = []; getRentList(); } else if (currentTab.value == 1) { - collectSchoolList.value = []; + searchClassesList.value = []; getSchoolList(); } else { + mallList.value = []; getGoods(); } } @@ -268,17 +288,20 @@ console.log('招租收藏列表', res); if (res.code == 1) { - collectRentList.value = [...collectRentList.value, ...res.data.list]; + searchRentList.value = [...searchRentList.value, ...res.data.list]; rentCount.value = res.data.count + for(let i=0;i