公寓详情加收藏和附近学校
This commit is contained in:
@@ -295,7 +295,7 @@
|
||||
<span class="title">{{ location && location[housingInfo["data"] && housingInfo["data"]["info"].location.substring(0, 1)] }} > {{ location && location[housingInfo["data"] && housingInfo["data"]["info"].location] }}</span>
|
||||
</div>
|
||||
<div class="dis-f jus-x" style="margin-top: 15px;" v-if="housingInfo['data'] && housingInfo['data'].info.latitude">
|
||||
<div>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<mapInfo
|
||||
:latlng="{
|
||||
longitude: housingInfo['data'].info.longitude * 1,
|
||||
@@ -356,7 +356,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- <div class="distance-info-box pos-r" :class="{ 'show-distance-info-box': showDistance }" :style="{ height: showDistance ? `${50 * annexSchoolList.length + 70}px` : '0px' }"> -->
|
||||
<div class="distance-info-box pos-r" :style="{ height: `${50 * annexSchoolList.length + 70}px` }">
|
||||
<div class="title-box dis-f al-item jus-x">
|
||||
房源
|
||||
@@ -368,7 +367,7 @@
|
||||
<div class="distance-info-left">
|
||||
<div class="distance-info-left-item flexcenter" :class="{ 'pitch': index == academyPitchIndex }" v-for="(item, index) in annexSchoolList" :key="index" @click="selectAcademyIndex(index)">{{ item.alias }}</div>
|
||||
</div>
|
||||
<el-scrollbar v-if="distanceList.length > 0" :style="{ height: 50 * annexSchoolList.length + 'px' }">
|
||||
<el-scrollbar :style="{ height: 50 * annexSchoolList.length + 'px' }">
|
||||
<div class="distance-info-right flex1">
|
||||
<div class="distance-header-box flexacenter">
|
||||
<div class="flexacenter">
|
||||
@@ -804,6 +803,8 @@ import report from "@/components/public/report.vue"
|
||||
|
||||
import store from "@/store"
|
||||
|
||||
import { metersToKilometers, secondsToHoursMinutes } from "@/utils/util.js"
|
||||
|
||||
//页面类型
|
||||
let pageType = ref("")
|
||||
|
||||
@@ -1250,6 +1251,7 @@ onBeforeUnmount(() => {
|
||||
const distanceSchool = () => {
|
||||
api.detailsDistance({
|
||||
uniqid: uniqid.value,
|
||||
istype: 1
|
||||
}).then(res => {
|
||||
const data = res.data
|
||||
if (res.code != 200) return
|
||||
@@ -1329,37 +1331,6 @@ const selectIndex = id => {
|
||||
// showDistance.value = true
|
||||
}
|
||||
|
||||
// 转换 秒数
|
||||
const secondsToHoursMinutes = (seconds, type) => {
|
||||
// 计算小时数
|
||||
const hours = Math.floor(seconds / 3600)
|
||||
// 计算剩余的秒数
|
||||
const remainingSecondsAfterHours = seconds % 3600
|
||||
// 计算分钟数
|
||||
const minutes = Math.floor(remainingSecondsAfterHours / 60)
|
||||
// 计算剩余的秒数
|
||||
const remainingSeconds = remainingSecondsAfterHours % 60
|
||||
|
||||
let text = ""
|
||||
if (type == "chinese") {
|
||||
if (hours != 0) text += hours + "小时"
|
||||
if (minutes != 0) text += minutes + "分钟"
|
||||
if (remainingSeconds != 0 && minutes == 0) text += remainingSeconds + "秒"
|
||||
} else {
|
||||
if (hours != 0) text += hours + "h"
|
||||
if (minutes != 0) text += minutes + "min"
|
||||
if (remainingSeconds != 0 && minutes == 0) text += remainingSeconds + "s"
|
||||
}
|
||||
return text
|
||||
}
|
||||
|
||||
// 转换 米数
|
||||
const metersToKilometers = (input, type) => {
|
||||
let text = ""
|
||||
if (input >= 1000) text = (input / 1000).toFixed(1) + (type == "chinese" ? "公里" : "km")
|
||||
else text = input + (type == "chinese" ? "米" : "m")
|
||||
return text
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
img {
|
||||
@@ -2787,7 +2758,7 @@ img {
|
||||
border-style: solid;
|
||||
border-color: rgba(242, 242, 242, 1);
|
||||
border-radius: 12px;
|
||||
margin-top: 20px;
|
||||
// margin-top: 20px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
/* ::-webkit-scrollbar {
|
||||
@@ -2996,6 +2967,10 @@ img {
|
||||
color: #000000;
|
||||
background: linear-gradient(to right, rgba(255, 255, 255, 0.8) -14%, rgba(80, 227, 194, 0.8) 100%);
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
border-radius: 0 0 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user