|
@@ -1,28 +1,75 @@
|
|
|
<template>
|
|
|
<view class="high-seas-container">
|
|
|
- <navbar>
|
|
|
- <view class="nav">
|
|
|
- <view class="nav-city" @click="$navigateTo('/pages/city/city?activeCity='+JSON.stringify(activeCity))">
|
|
|
- <uni-icons class="city-icon" type="location-filled" size="16"></uni-icons>
|
|
|
- <text class="city-name">{{activeCity.cityName}}</text>
|
|
|
+ <view class="highseas-container" v-if="!project.id">
|
|
|
+ <navbar>
|
|
|
+ <view class="nav">
|
|
|
+ <view class="nav-city"
|
|
|
+ @click="$navigateTo('/pages/city/city?activeCity='+JSON.stringify(activeCity))">
|
|
|
+ <uni-icons class="city-icon" type="location-filled" size="16"></uni-icons>
|
|
|
+ <text class="city-name">{{activeCity.cityName}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="nav-search" @click="$navigateTo('/pages/search/search')"
|
|
|
+ :style="'height:' + boundingClientRect.height + 'px;border-radius:' + boundingClientRect.height + 'px;line-height:'+(boundingClientRect.height-2)+'px'">
|
|
|
+ 搜索房源或项目
|
|
|
+ </view>
|
|
|
+ <view class="wx-operation"
|
|
|
+ :style="'width:' + boundingClientRect.width + 'px;height:'+ boundingClientRect.height+'px;'">
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="nav-search" @click="$navigateTo('/pages/search/search')"
|
|
|
- :style="'height:' + boundingClientRect.height + 'px;border-radius:' + boundingClientRect.height + 'px;line-height:'+(boundingClientRect.height-2)+'px'">
|
|
|
- 搜索房源或项目
|
|
|
- </view>
|
|
|
- <view class="wx-operation"
|
|
|
- :style="'width:' + boundingClientRect.width + 'px;height:'+ boundingClientRect.height+'px;'">
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </navbar>
|
|
|
- <mescroll-body :top="getNavBarHeight()" bottom="20" @init="mescrollInit" @down="downCallback" @up="upCallback"
|
|
|
- :down="{
|
|
|
+ </navbar>
|
|
|
+ <mescroll-body :top="getNavBarHeight()" bottom="20" @init="mescrollInit" @down="downCallback"
|
|
|
+ @up="upCallback" :down="{
|
|
|
auto:false
|
|
|
}">
|
|
|
- <view class="house-list">
|
|
|
- <house-item v-for="(item,index) in list" :house="item" :key="item.id"></house-item>
|
|
|
+ <view class="house-list">
|
|
|
+ <house-item v-for="(item,index) in list" :house="item" :key="item.id"></house-item>
|
|
|
+ </view>
|
|
|
+ </mescroll-body>
|
|
|
+ </view>
|
|
|
+ <view class="project-container" v-else :style="'padding-top: ' + getNavBarHeight() + 'rpx;'">
|
|
|
+ <view class="project-box">
|
|
|
+ <view class="project-item">
|
|
|
+ <view class="project-title">
|
|
|
+ <view class="title-line"></view>
|
|
|
+ <view class="title-label">房源分析</view>
|
|
|
+ </view>
|
|
|
+ <view class="project-content">
|
|
|
+ <view class="air-item">
|
|
|
+ <view class="test-item">
|
|
|
+ <view class="name">总面积(㎡)</view>
|
|
|
+ <view class="number">120</view>
|
|
|
+ </view>
|
|
|
+ <view class="line"></view>
|
|
|
+ <view class="test-item">
|
|
|
+ <view class="name">已租面积(㎡)</view>
|
|
|
+ <view class="number">120</view>
|
|
|
+ </view>
|
|
|
+ <view class="line"></view>
|
|
|
+ <view class="test-item">
|
|
|
+ <view class="name">剩余面积(㎡)</view>
|
|
|
+ <view class="number">120</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="air-item">
|
|
|
+ <view class="test-item">
|
|
|
+ <view class="name">总房源(个)</view>
|
|
|
+ <view class="number">64</view>
|
|
|
+ </view>
|
|
|
+ <view class="line"></view>
|
|
|
+ <view class="test-item">
|
|
|
+ <view class="name">已租房源(个)</view>
|
|
|
+ <view class="number">63</view>
|
|
|
+ </view>
|
|
|
+ <view class="line"></view>
|
|
|
+ <view class="test-item">
|
|
|
+ <view class="name">剩余房源(个)</view>
|
|
|
+ <view class="number">1</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </mescroll-body>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -34,6 +81,8 @@
|
|
|
getOpenHouseListByPage
|
|
|
} from '@/request/api/house.js'
|
|
|
import city from '@/components/city-select/citys.js';
|
|
|
+ const systemInfo = uni.getSystemInfoSync();
|
|
|
+ const fontSize = systemInfo.platform === 'ios' ? 26 : 28; // 根据不同平台设置
|
|
|
export default {
|
|
|
mixins: [MescrollMixin], // 使用mixin
|
|
|
data() {
|
|
@@ -44,34 +93,39 @@
|
|
|
cityName: '',
|
|
|
cityCode: ''
|
|
|
},
|
|
|
- coordinates: ''
|
|
|
+ coordinates: '',
|
|
|
+ project: {},
|
|
|
+ fontSize: fontSize
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.project = this.$store.getters.project;
|
|
|
// #ifdef MP-WEIXIN
|
|
|
this.boundingClientRect = wx.getMenuButtonBoundingClientRect();
|
|
|
// #endif
|
|
|
},
|
|
|
onLoad() {
|
|
|
- uni.$on('changeCity', data => {
|
|
|
- this.activeCity = data;
|
|
|
- this.$store.dispatch('app/changeActiveCity', this.activeCity);
|
|
|
- uni.setStorageSync('vuex_state', this.$store.state);
|
|
|
- this.mescroll.resetUpScroll();
|
|
|
- })
|
|
|
- uni.getLocation({
|
|
|
- type: 'wgs84',
|
|
|
- success: res => {
|
|
|
- this.coordinates = res.longitude + ',' + res.latitude;
|
|
|
- this.$store.dispatch('app/changeCoordinates', this.coordinates);
|
|
|
+ if (!this.$store.getters.project.id) {
|
|
|
+ uni.$on('changeCity', data => {
|
|
|
+ this.activeCity = data;
|
|
|
+ this.$store.dispatch('app/changeActiveCity', this.activeCity);
|
|
|
uni.setStorageSync('vuex_state', this.$store.state);
|
|
|
- this.getLocation();
|
|
|
- },
|
|
|
- fail: () => {
|
|
|
- this.coordinates = this.$store.getters.coordinates;
|
|
|
- this.getLocation();
|
|
|
- }
|
|
|
- });
|
|
|
+ this.mescroll.resetUpScroll();
|
|
|
+ })
|
|
|
+ uni.getLocation({
|
|
|
+ type: 'wgs84',
|
|
|
+ success: res => {
|
|
|
+ this.coordinates = res.longitude + ',' + res.latitude;
|
|
|
+ this.$store.dispatch('app/changeCoordinates', this.coordinates);
|
|
|
+ uni.setStorageSync('vuex_state', this.$store.state);
|
|
|
+ this.getLocation();
|
|
|
+ },
|
|
|
+ fail: () => {
|
|
|
+ this.coordinates = this.$store.getters.coordinates;
|
|
|
+ this.getLocation();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
methods: {
|
|
|
getLocation() {
|
|
@@ -121,7 +175,7 @@
|
|
|
let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
|
|
|
// 导航栏高度 = 胶囊高度 + 上间距 + 下间距 + 微调 (menuButtonInfo.top - uni.getSystemInfoSync()['statusBarHeight'] = 上间距)
|
|
|
let navbarHeight = menuButtonInfo.height + (menuButtonInfo.top - uni.getSystemInfoSync()[
|
|
|
- 'statusBarHeight']) * 2 + 2
|
|
|
+ 'statusBarHeight']) * 2 + 4
|
|
|
// #endif
|
|
|
// #ifdef APP-PLUS || H5
|
|
|
let navbarHeight = 44
|
|
@@ -158,6 +212,67 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
+ .project-container {
|
|
|
+ .project-box {
|
|
|
+ background: #fff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .project-item {
|
|
|
+ padding: 30rpx;
|
|
|
+
|
|
|
+ .project-title {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title-line {
|
|
|
+ width: 18rpx;
|
|
|
+ height: 64rpx;
|
|
|
+ background: $uni-primary;
|
|
|
+ border-radius: 18rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title-label {
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .air-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 20rpx;
|
|
|
+
|
|
|
+ .test-item {
|
|
|
+ flex: 1;
|
|
|
+ width: 0;
|
|
|
+ overflow: hidden;
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ font-size: 24rpx;
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+ line-height: 36rpx;
|
|
|
+ color: $uni-secondary-color;
|
|
|
+ }
|
|
|
+
|
|
|
+ .number {
|
|
|
+ font-size: 18px;
|
|
|
+ color: $uni-primary;
|
|
|
+ }
|
|
|
+
|
|
|
+ .line {
|
|
|
+ height: 32rpx;
|
|
|
+ width: 2rpx;
|
|
|
+ background: $uni-border-1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.high-seas-container {
|
|
|
.nav {
|
|
|
height: 100%;
|
|
@@ -165,6 +280,7 @@
|
|
|
width: 100%;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ justify-content: center;
|
|
|
|
|
|
.nav-city {
|
|
|
height: 50rpx;
|