diff --git a/src/assets/img/detail/imageIcon.png b/src/assets/img/detail/imageIcon.png new file mode 100644 index 0000000..6224c1d Binary files /dev/null and b/src/assets/img/detail/imageIcon.png differ diff --git a/src/assets/img/detail/videoIcon.png b/src/assets/img/detail/videoIcon.png new file mode 100644 index 0000000..ea19c5a Binary files /dev/null and b/src/assets/img/detail/videoIcon.png differ diff --git a/src/components/seachModule/seachModule.vue b/src/components/seachModule/seachModule.vue index f811b0b..bd78af0 100644 --- a/src/components/seachModule/seachModule.vue +++ b/src/components/seachModule/seachModule.vue @@ -160,22 +160,29 @@ historyArr.data = JSON.parse(localStorage.getItem('historyArr')) || [] //搜索数据 let seachList = (item) => { // console.log(123) - let string=seachAllType.keyword + let string = seachAllType.keyword if (!string.replace(/\s/g, "")) return if (historyArr.data.indexOf(seachAllType.keyword) === -1) { historyArr.data.push(seachAllType.keyword) } localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); - if (routePath.value === '/') { - route.push({ - path: '/seachPage', - query: { - keyword: seachAllType.keyword - } - }) - }else{ - setSeachConditions() - } + route.push({ + path: '/seachPage', + query: { + keyword: seachAllType.keyword, + isNeedHousing:routePath.value === '/needHousing' + } + }) + // if (routePath.value === '/') { + // route.push({ + // path: '/seachPage', + // query: { + // keyword: seachAllType.keyword + // } + // }) + // }else{ + // setSeachConditions() + // } // getDataList(seachAllType) } @@ -418,6 +425,7 @@ defineExpose({ border-radius: 0 8px 8px 0; line-height: 48px; cursor: pointer; + transform: translateX(-3px); } .img { diff --git a/src/components/seachPage/input.vue b/src/components/seachPage/input.vue index 62a4140..7555242 100644 --- a/src/components/seachPage/input.vue +++ b/src/components/seachPage/input.vue @@ -25,20 +25,33 @@
-
- 个人房源 521 + 个人房源 {{ seachKey.key&&seachKey.key.personal&&seachKey.key.personal.count }}
- 个人房源 521 + 个人房源 {{ seachKey.key&&seachKey.key.personal&&seachKey.key.personal.count }}
-
+
+ 求房源 {{ seachKey.key&&seachKey.key.personal&&seachKey.key.personal.count }} +
+ 求房源 {{ seachKey.key&&seachKey.key.personal&&seachKey.key.personal.count }} +
+
+ +
+
+
+
@@ -52,12 +65,12 @@
- 中介房源 82 + 中介房源 {{ seachKey.key&&seachKey.key.intermediary&&seachKey.key.intermediary.count }}
- 中介房源 82 + 中介房源 {{ seachKey.key&&seachKey.key.intermediary&&seachKey.key.intermediary.count }}
+ :class="{ 'select-top-btn-bg': tabType === 'apartment' }" v-if="!isNeedHousing">
@@ -65,9 +78,9 @@
- 品牌公寓 6 + 品牌公寓 {{ seachKey.key&&seachKey.key.studentapartment&&seachKey.key.studentapartment.count }}
- 学生公寓 6 + 学生公寓 {{ seachKey.key&&seachKey.key.studentapartment&&seachKey.key.studentapartment.count }}
@@ -203,7 +216,11 @@ let getDataList = props.getDataList //搜索内容 let seachVal = ref('') +let isNeedHousing=ref(false) seachVal.value = route.currentRoute.value.query.keyword + +//判断是否从求房源页面跳转 +isNeedHousing.value = route.currentRoute.value.query.isNeedHousing==='true' //搜索key let seachKey = reactive({ key: {} }) @@ -253,11 +270,11 @@ let setPageKey = () => { //搜索初始化 let searchInit = (data) => { + console.log(123456) api.search({ keyword: data }).then(res => { if (res.code === 200) { seachKey.key = res.data seachAllType.searchid = setPageKey() - // console.log(seachAllType) getDataList(seachAllType, tabType.value) } else { ElMessage({ @@ -269,7 +286,7 @@ let searchInit = (data) => { } //搜索数据 let seachList = (item) => { - if(seachVal.value.replace(/\s/g,""))return + if(!seachVal.value.replace(/\s/g,""))return if (!seachVal.value) { return } diff --git a/src/components/selectTabBox/selectTabBox.vue b/src/components/selectTabBox/selectTabBox.vue index a049029..be97c65 100644 --- a/src/components/selectTabBox/selectTabBox.vue +++ b/src/components/selectTabBox/selectTabBox.vue @@ -242,6 +242,25 @@ import store from '../../store/index'; //数据包 let configData = reactive({ data: {} }) +//保存筛选参数 +let setStoreSelectData=(obj,data,type)=>{ + console.log(store.state.seachSelect) + // otherCheck['list'] + // releaseObj.id + // gender.id + // hireDate.id + // hireDate.title + // hireTypeObj.id + // hireTypeObj.title + // hireTypeObj.hireId + // selectTabCheck.id + // selectTabCheck.title + // selectTabCheck.data + // selectData.data + // schoolSelectObj.id + // schoolSelectObj.title +} + //监听路由 const route = useRouter() let routePath = ref('') @@ -362,15 +381,6 @@ let nextSchoolData = () => { //设置状态 let setSelectPosition = (type) => { selectPosition.value = type - // if (type === 'school') { - // selectTabCheck.id = ''; - // selectTabCheck.title = '不限' - // selectTabCheck.data = []; - // selectData.data = [] - // } else { - // schoolSelectObj.id = '' - // schoolSelectObj.title = '' - // } } //点击区域/学校选项 @@ -533,6 +543,7 @@ let otherCheck = reactive({ list: [] }) //设置其他 let setOtherCheck = (data) => { + // setStoreSelectData('otherCheck',data) setSeachCondition('', data) } diff --git a/src/main.js b/src/main.js index 149c0ca..cd98fd1 100644 --- a/src/main.js +++ b/src/main.js @@ -41,6 +41,7 @@ import Axios from '@/utils/axios'; api.index().then(res => { if (res.code === 200) { + console.log(123) store.state.seachTypeData = res.data.combination store.state.indexData = res.data store.state.ListSelectBtn = res.data.recommendedTab diff --git a/src/store/index.js b/src/store/index.js index bd6cc50..3fcf5a7 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -9,7 +9,6 @@ export default createStore({ wechat: {}, // 微信号 二维码等数据 nav: [], // 顶部的导航数据 apartment: {}, // 公寓筛选的字段 -// <<<<<<< HEAD routeList:{ index:{ path:'/', @@ -20,9 +19,8 @@ export default createStore({ title:'', } },//导航路由列表 -// ======= + seachSelect:{},//保存筛选条件 showloginmodal: false, // 是否需要登录状态 -// >>>>>>> 542e853 (提交) }, getters: { diff --git a/src/views/detail.vue b/src/views/detail.vue index 16191bc..d40f48b 100644 --- a/src/views/detail.vue +++ b/src/views/detail.vue @@ -44,8 +44,11 @@
-
- +
+
+ +
+
@@ -185,6 +188,31 @@ img { } } } + + .image-box { + margin-top: 35px; + + .img-video { + width: 26px; + height: 26px; + } + + .img-icon { + width: 22px; + height: 22px; + } + + .num-box { + width: 20px; + height: 20px; + border-radius: 50%; + color: #333333; + font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif; + font-weight: 400; + font-style: normal; + font-size: 14px; + } + } } \ No newline at end of file diff --git a/src/views/seachIndex.vue b/src/views/seachIndex.vue index 7f58ddb..ec99364 100644 --- a/src/views/seachIndex.vue +++ b/src/views/seachIndex.vue @@ -181,7 +181,7 @@ onMounted(() => { routeQuery.data = route.currentRoute.value.query console.log(routeQuery) if(routeQuery.data.keyword){ - inputModuleInfo.value.searchInit(routeQuery.data.keyword) + inputModuleInfo.value.searchInit(routeQuery.data.keyword)//调用搜索组件的搜索功能 route.currentRoute.value.query={} }else{ getDataList()