diff --git a/src/assets/img/apartmentDetail/collect-red.svg b/src/assets/img/apartmentDetail/collect-red.svg new file mode 100644 index 0000000..29fa84d --- /dev/null +++ b/src/assets/img/apartmentDetail/collect-red.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/assets/styles/apartmentDetail.css b/src/assets/styles/apartmentDetail.css index 74d423a..c8e77a3 100644 --- a/src/assets/styles/apartmentDetail.css +++ b/src/assets/styles/apartmentDetail.css @@ -737,6 +737,10 @@ margin-right: 10px; cursor: pointer; } +.content .details-box .details-left .type-box .item .btn .collect.red { + background-color: #ffeff3; + border-color: #f4dbe1; +} .content .details-box .details-left .type-box .item .btn .collect .icon { width: 18px; height: 17px; diff --git a/src/assets/styles/apartmentDetail.less b/src/assets/styles/apartmentDetail.less index 28dbf7a..bbbf090 100644 --- a/src/assets/styles/apartmentDetail.less +++ b/src/assets/styles/apartmentDetail.less @@ -935,6 +935,11 @@ margin-right: 10px; cursor: pointer; + &.red { + background-color: rgba(255, 239, 243, 1); + border-color: rgba(244, 219, 225, 1); + } + .icon { width: 18px; height: 17px; diff --git a/src/components/public/apartment-item.vue b/src/components/public/apartment-item.vue index dcff230..b2f0784 100644 --- a/src/components/public/apartment-item.vue +++ b/src/components/public/apartment-item.vue @@ -10,13 +10,13 @@
{{ item.title }}
-
+
@@ -326,7 +326,7 @@ const loadload = () => { } .distance { - padding: 0 12px 12px 29px; + padding: 0 1px 12px 29px; border-bottom: 1px dotted #d7d7d7; .figure { font-size: 14px; @@ -361,9 +361,12 @@ const loadload = () => { border-radius: 30px; font-size: 12px; color: #333333; - padding: 0 8px; - margin-right: 6px; + padding: 0 6px; margin-bottom: 5px; + + &:not(:last-of-type) { + margin-right: 6px; + } .vehicle-icon { width: 14px; diff --git a/src/components/public/public-list-item.vue b/src/components/public/public-list-item.vue index 1a5bdfb..d58c5dc 100644 --- a/src/components/public/public-list-item.vue +++ b/src/components/public/public-list-item.vue @@ -199,7 +199,7 @@ watch(() => props.item.status, (newValue, oldValue) => { stateData.value = stateObj[data.status] }) -const cancelCollection = token => emit('cancelCollection', { token, index: props['index'] }) +const cancelCollection = token => emit('cancelCollection', { token }) // 点击跳转详情页 const goDetail = status => { diff --git a/src/views/apartmentDetail.vue b/src/views/apartmentDetail.vue index 414a25a..0b4e640 100644 --- a/src/views/apartmentDetail.vue +++ b/src/views/apartmentDetail.vue @@ -74,7 +74,7 @@
{{ company.title }}
{{ info.propaganda }}
-
+
同品牌
@@ -225,7 +225,11 @@
-
+
+ + 已收藏 +
+
收藏
@@ -439,8 +443,8 @@
-
- +
+
{{ item.name }}
@@ -765,7 +769,7 @@ onMounted(() => { }); const init = () => { - proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then((res) => { + proxy.$get("https://api.gter.net/v1/apartment/details", { uniqid }).then((res) => { if (res.code != 200) { ElMessage.error(res["message"]); return; @@ -804,8 +808,8 @@ const init = () => { const facility = data.info.facility; if (facility) { - facility["public"][0].images = ["https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skdX7qqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MtZCjvF5wr_-kU8uRQ0NDI5", "https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skfHvqqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MsIAzvG5Ar_-kU8uRQ0NDI5"]; - facility["public"][1].images = ["https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skdXfqqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MtdDG6W5Q7_-kU8uRQ0NDI5", "https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skfXnqqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MtcA2vF5A7_-kU8uRQ0NDI5"]; + // facility["public"][0].images = ["https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skdX7qqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MtZCjvF5wr_-kU8uRQ0NDI5", "https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skfHvqqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MsIAzvG5Ar_-kU8uRQ0NDI5"]; + // facility["public"][1].images = ["https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skdXfqqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MtdDG6W5Q7_-kU8uRQ0NDI5", "https://oss.x-php.com/Zvt57TuJSUvkyhw-xG7Y2l-c-5skfXnqqsgFptxhXa6QWi2uePJ5Bg8WFLPIqoYV7MtcA2vF5A7_-kU8uRQ0NDI5"]; let list = []; facilityArr.forEach((key) => { @@ -919,13 +923,17 @@ const openFacilities = () => { const openFacilitiesImg = (current) => { const list = facilitylist.value || []; let urls = []; - + // element.images.forEach((ele) => { + // ele.img.forEach((e) => { + // urls.push(e.imageurl); + // }); + // }); list.forEach((element) => { element.images.forEach((ele) => { - ele.img.forEach((imageurl) => { + ele.img.forEach((e) => { urls.push({ - imageurl, - thumbnail: imageurl, + imageurl: e.imageurl, + thumbnail: e.thumbnail, type: "attachment", }); }); @@ -1050,7 +1058,8 @@ const handleClickNav = (value) => { let dualBrandList = ref([]); // 同品牌数据 // 同品牌请求数据 const dualBrandData = () => { - proxy.$get("/tenement/pc/api/apartment", { token }).then((res) => { + // proxy.$get("/tenement/pc/api/apartment", { token }).then((res) => { + proxy.$get("https://api.gter.net/v1/apartment/lists", { token }).then((res) => { if (res.code != 200) return; let data = res.data; dualBrandList.value = data.data; @@ -1369,6 +1378,17 @@ const openMap = () => { viewMapRef.value.showPop(); isSelectSchool.value = false; }; + +const roomCollect = (id, index) => { + console.log(id, index); + + proxy.$post("https://api.gter.net/v1/apartment/roomCollection", { id }).then((res) => { + if (res.code != 200) return; + const data = res.data; + ElMessage.success(res.message); + roomList.value[index].iscollection = data.status || 0; + }); +};