From c1df4e8cbf06b270521d8a3b4db29d494198f2f9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RQ919RC\\Pc" <1300399510@qq.com> Date: Mon, 26 May 2025 19:04:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=E5=92=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AD=A6=E6=A0=A1=E8=B7=9D=E7=A6=BB=E5=8D=95=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/apartmentDetail.css | 2 +- src/assets/styles/apartmentDetail.less | 2 +- src/components/apartment/sameBrandItem.vue | 1 + src/components/apartment/seachModule.vue | 2 +- src/components/public/apartment-item.vue | 18 ++--- src/components/public/viewMap.vue | 2 +- src/components/seachPage/input.vue | 84 ++++++++++++++++++++-- src/views/apartmentDetail.vue | 81 +++++++++++++-------- src/views/detail.vue | 4 +- src/views/housingView/apartment.vue | 2 + 10 files changed, 148 insertions(+), 50 deletions(-) diff --git a/src/assets/styles/apartmentDetail.css b/src/assets/styles/apartmentDetail.css index c533352..7ece524 100644 --- a/src/assets/styles/apartmentDetail.css +++ b/src/assets/styles/apartmentDetail.css @@ -999,7 +999,7 @@ color: #555555; line-height: 30px; padding: 0 15px; - margin-bottom: 26px; + margin-bottom: 20px; white-space: pre-line; } .content .details-box .details-right { diff --git a/src/assets/styles/apartmentDetail.less b/src/assets/styles/apartmentDetail.less index 6131c14..8650d9a 100644 --- a/src/assets/styles/apartmentDetail.less +++ b/src/assets/styles/apartmentDetail.less @@ -1438,7 +1438,7 @@ color: #555555; line-height: 30px; padding: 0 15px; - margin-bottom: 26px; + margin-bottom: 20px; white-space: pre-line; } } diff --git a/src/components/apartment/sameBrandItem.vue b/src/components/apartment/sameBrandItem.vue index 8930153..0e54900 100644 --- a/src/components/apartment/sameBrandItem.vue +++ b/src/components/apartment/sameBrandItem.vue @@ -51,6 +51,7 @@ const gobrand = (item) => router.push(`/apartmentDetail?uniqid=${item.uniqid}`); box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529); padding: 8px 0; cursor: pointer; + transition: all .3s; &:not(:last-of-type) { margin-bottom: 20px; diff --git a/src/components/apartment/seachModule.vue b/src/components/apartment/seachModule.vue index 65ba042..5b8c5fb 100644 --- a/src/components/apartment/seachModule.vue +++ b/src/components/apartment/seachModule.vue @@ -23,7 +23,7 @@
历史搜索
-
+
{{ item }}
diff --git a/src/components/public/apartment-item.vue b/src/components/public/apartment-item.vue index 0f30503..ccd4b9c 100644 --- a/src/components/public/apartment-item.vue +++ b/src/components/public/apartment-item.vue @@ -50,20 +50,20 @@
距离
{{ item.distance.alias }}
-
{{ calculateDistance(item.distance.distance) }}km
+
{{ item.distance.distance }}公里
-
+
- {{ calculateDuration(item.distance.walking_duration) }} + {{ item.distance.walking_duration }}时长(分)
-
+
- {{ calculateDuration(item.distance.transit_duration) }} + {{ item.distance.transit_duration }}时长(分)
-
+
- {{ calculateDuration(item.distance.driving_duration) }} + {{ item.distance.driving_duration }}时长(分)
@@ -85,10 +85,10 @@
HK$
-
{{ it.discountprice || it["price"] }}
+
{{ it.discountprice || it.price }}
/月
-
HK${{ it.discountprice }}/月
+
HK${{ it.price }}/月
diff --git a/src/components/public/viewMap.vue b/src/components/public/viewMap.vue index 8ef50d4..fcfbc3c 100644 --- a/src/components/public/viewMap.vue +++ b/src/components/public/viewMap.vue @@ -130,7 +130,7 @@ defineExpose({ #container { cursor: pointer; - width: 816px; + width: 814px; height: 180px; margin-top: 20px; // margin-bottom: 40px; diff --git a/src/components/seachPage/input.vue b/src/components/seachPage/input.vue index 9da2995..75b2699 100644 --- a/src/components/seachPage/input.vue +++ b/src/components/seachPage/input.vue @@ -124,17 +124,26 @@
- - {{ listSort.check }} + +
+ {{ listSort.check }} + +
+
@@ -438,13 +447,14 @@ let selectTabCheck = reactive({ //最新发布选项 let listSort = shallowReactive({ type: [ + { title: "综合", type: "default" }, { title: "最新发布", type: "timestamp" }, { title: "热门", type: "hotnum" }, { title: "价格从低到高", type: "rentasc" }, { title: "价格从高到低", type: "rentdesc" }, ], - checkType: "timestamp", - check: "最新发布", + checkType: "default", + check: "综合", }); //搜索列表排序 let listSortCheck = (item) => { @@ -844,6 +854,20 @@ img { color: #000000; text-align: center; cursor: pointer; + + .sort-btn { + cursor: pointer; + color: #000; + line-height: 24px; + font-size: 14px; + font-weight: 650; + + .sort-icon { + width: 20px; + height: 20px; + margin-left: 10px; + } + } } .img { @@ -1003,3 +1027,51 @@ img { --el-dropdown-menuItem-hover-fill: rgba(246, 246, 246, 1); } + \ No newline at end of file diff --git a/src/views/apartmentDetail.vue b/src/views/apartmentDetail.vue index ade286c..d74cc39 100644 --- a/src/views/apartmentDetail.vue +++ b/src/views/apartmentDetail.vue @@ -95,16 +95,30 @@
距离
{{ distancePitch.alias }}
- {{ distancePitch.distance }}km + {{ distancePitch.distance }}公里
[切换院校]
-
+ + +
+ + {{ distancePitch.walking_duration }}时长(分) +
+
+ + {{ distancePitch.transit_duration }}时长(分) +
+
+ + {{ distancePitch.driving_duration }}时长(分)
@@ -179,7 +193,7 @@
{{ spotObj.content }}
- + @@ -603,14 +617,20 @@
距离
{{ item.alias }}
- {{ item.distance }}km + {{ item.distance }}公里
-
- - - - {{ item }} +
+ + {{ item.walking_duration }}时长(分) +
+
+ + {{ item.transit_duration }}时长(分) +
+
+ + {{ item.driving_duration }}时长(分)
@@ -1236,8 +1256,8 @@ let isOperateShow = ref(true); // 底部操作栏是否显示 const handleScroll = () => { if (Math.random() > 0.3) return; - let body = document.documentElement ? document.documentElement : document.body ? document.body : document.querySelector(".element") - let offsetHeight = body.offsetHeight + let body = document.documentElement ? document.documentElement : document.body ? document.body : document.querySelector(".element"); + let offsetHeight = body.offsetHeight; const clientHeight = document.documentElement.clientHeight; const scrollTop = document.documentElement.scrollTop; const top = scrollTop + clientHeight; @@ -1254,7 +1274,7 @@ const handleScroll = () => { const topDistance = 260 - 36 + headerHeight + leftHeight + 223; if (top > topDistance && isFixed.value == false) { isFixed.value = true; - FixedBottom.value = document.querySelector(".index-footer").getBoundingClientRect().height + 20 + FixedBottom.value = document.querySelector(".index-footer").getBoundingClientRect().height + 20; } if (top < topDistance && isFixed.value == true) isFixed.value = false; @@ -1422,24 +1442,25 @@ const getMapDistance = () => { let arr = []; let pitch = null; distance.forEach((element) => { - let obj = {}; - element.distance = calculateDistance(element.distance); - if (element.walking && element.walking.duration) obj["walking"] = calculateDuration(element.walking.duration); - if (element.transit && element.transit.duration) obj["transit"] = calculateDuration(element.transit.duration); - if (element.driving && element.driving.duration) obj["driving"] = calculateDuration(element.driving.duration); - const target = { - name: element.name, - distance: element.distance, - alias: element.alias, - sid: element.sid, - obj, - }; - arr.push(target); - if (element.sid == sid) pitch = target; + // let obj = {}; + // element.distance = calculateDistance(element.distance); + // if (element.walking && element.walking.duration) obj["walking"] = calculateDuration(element.walking.duration); + // if (element.transit && element.transit.duration) obj["transit"] = calculateDuration(element.transit.duration); + // if (element.driving && element.driving.duration) obj["driving"] = calculateDuration(element.driving.duration); + // const target = { + // name: element.name, + // distance: element.distance, + // alias: element.alias, + // sid: element.sid, + // obj, + // }; + // arr.push(target); + if (element.sid == sid) pitch = element }); - if (pitch == null) pitch = arr[0]; - distanceList.value = arr; + if (pitch == null) pitch = distance[0]; + + distanceList.value = distance; distancePitch.value = pitch; }); }; @@ -1450,6 +1471,7 @@ const openSelectSchool = () => { isSelectSchool.value = true; nextTick(() => { + return const item = selectSchoolRef.value.querySelector(`.item${distancePitch.value.sid}`); if (!item) return; selectSchoolRef.value.scrollTo({ top: item.offsetTop - 20, behavior: "smooth" }); @@ -2055,6 +2077,7 @@ const cutRemarkType = (value) => (remarkTypeid.value = value); font-size: 14px; color: #555555; margin-top: 7px; + padding-bottom: 7px; .abbreviation { font-family: "PingFangSC-Semibold", "PingFang SC Semibold", "PingFang SC", sans-serif; @@ -2143,7 +2166,7 @@ const cutRemarkType = (value) => (remarkTypeid.value = value); padding-left: 20px; &:not(:last-of-type) { - border-bottom: 1px dashed #d7d7d7; + border-bottom: 1px #d7d7d7 dotted; } .avatar { diff --git a/src/views/detail.vue b/src/views/detail.vue index 999c4cc..e5568b6 100644 --- a/src/views/detail.vue +++ b/src/views/detail.vue @@ -8,7 +8,7 @@
-
+
@@ -1825,7 +1825,7 @@ img { } .top-bar { - width: 750px; + min-width: 750px; background: inherit; background-color: rgba(255, 255, 255, 1); box-sizing: border-box; diff --git a/src/views/housingView/apartment.vue b/src/views/housingView/apartment.vue index ae112fd..c6c01f5 100644 --- a/src/views/housingView/apartment.vue +++ b/src/views/housingView/apartment.vue @@ -126,6 +126,8 @@ const getData = () => { localStorage.setItem("apartmentPitchValue", JSON.stringify(pitchValue.value)); + pitchValue.value['sid'] = pitchValue.value['school'] || 0; + proxy .$post("https://api.gter.net/v1/apartment/lists", { limit: 1000, page, ...pitchValue.value }) .then((res) => {