前端-胡立永 5 days ago
parent
commit
bdd525fd73
6 changed files with 105 additions and 79 deletions
  1. +9
    -7
      components/home/homeList.vue
  2. +84
    -63
      pages/tourGuide/tourGuide.vue
  3. +1
    -1
      pages_subpack/category/component/search.vue
  4. +1
    -1
      pages_subpack/category/index.vue
  5. +9
    -6
      pages_subpack/detail/index.vue
  6. +1
    -1
      pages_subpack/house/other.vue

+ 9
- 7
components/home/homeList.vue View File

@ -3,8 +3,8 @@
<view v-if="list.length>0">
<view @click="onDetail(item)" class="se-my-10 se-mx-20 se-px-20 se-py-20 se-br-20 se-bgc-white se-flex" v-for="(item,index) in list" :key="index">
<view class="se-pos se-w-260 se-h-180">
<image v-if="item.iconImage" class="se-a-80 se-pos-lt" :src="item.iconImage" mode=""></image>
<image class="se-w-260 se-h-180 se-br-10" :src="item.images[0]" mode=""></image>
<image v-if="item.iconImage" class="se-a-80 se-pos-lt" :src="item.iconImage" mode="aspectFill"></image>
<image class="se-w-260 se-h-180 se-br-10" :src="item.images[0]" mode="aspectFill"></image>
</view>
<view class="se-pl-10 se-w-p-100">
<view class="se-c-black se-fs-28">
@ -14,22 +14,24 @@
<text>{{item.homeType}}</text>
<text>{{item.timeGo}}</text>
</view>
<view class="se-flex se-flex-h-sb se-flex-ai-c se-mt-10">
<view class="se-flex se-flex-v se-mt-10"
>
<template v-if="item.iconTitles.length>0">
<view class="se-flex">
<view class="se-display-ib se-c-white se-bgc-orange se-fs-22 se-br-8 se-px-10 se-py-5 se-mr-10" v-for="(items,indexs) in item.iconTitles" :key="indexs">
<view class="se-flex se-flex-wrap"
style="flex-wrap: wrap;">
<view class="se-display-ib se-c-white se-bgc-orange se-fs-22 se-br-8 se-px-10 se-py-5 se-mr-10 se-mb-10" v-for="(items,indexs) in item.iconTitles" :key="indexs">
{{items}}
</view>
</view>
</template>
<template v-else><view></view></template>
<view class="se-c-66 se-flex se-flex-ai-c">
<view class="se-c-66 se-flex se-flex-ai-c se-mt-10">
<uv-icon name="eye"></uv-icon>
<text class="se-ml-5 se-fs-18">{{item.num}}</text>
</view>
</view>
<view class="se-flex se-flex-h-sb se-flex-ai-c se-mt-10">
<text class="se-c-red se-fs-24 se-fw-6 se-toe-1">{{item.price}}/{{item.unit}}</text>
<text class="se-c-red se-fs-24 se-fw-6 se-toe-1">{{item.price}}{{item.unit}}</text>
<text class="se-c-66 se-fs-22 se-toe-1">{{item.address}}</text>
</view>
</view>


+ 84
- 63
pages/tourGuide/tourGuide.vue View File

@ -1,7 +1,7 @@
<template>
<view class="Locations">
<map style="width: 100%;height: 60vh"
<map style="width: 100%;height: 60vh;pointer-events: auto;"
:layer-style='5'
:show-location='true'
:latitude="position.latitude"
@ -24,7 +24,7 @@
<!-- 搜索功能 -->
<view class="search-container">
<view class="se-bgc-white se-pb-20 se-pt-30 se-px-40">
<uv-search @search="onSearch()" placeholder="搜索租房信息" :showAction="false" v-model="keyword"></uv-search>
<uv-search @search="onSearch" placeholder="搜索租房信息" :showAction="false" v-model="keyword" :disabled="false"></uv-search>
</view>
<view class="se-pb-10 se-px-40 se-bgc-white">
<uv-drop-down ref="dropDown" sign="dropDown_1" text-active-color="#1EC77A"
@ -46,55 +46,10 @@
</view>
</view>
<uv-tabs :list="houseTypeList" :activeStyle="{ color: '#1EC77A', fontWeight: 600 }" lineColor="#1EC77A"
lineHeight="8rpx" lineWidth="50rpx" keyName="title" :current="currentHouseType"
@click="onClickHouseType"></uv-tabs>
<view class="Locations-list">
<!-- 房源列表 -->
<view v-if="list.length > 0">
<view @click="onDetail(item)" class="se-my-10 se-mx-20 se-px-20 se-py-20 se-br-20 se-bgc-white se-flex"
v-for="(item, index) in list" :key="index">
<view class="se-pos se-w-260 se-h-180">
<image v-if="item.iconImage" class="se-a-80 se-pos-lt" :src="item.iconImage" mode=""></image>
<image class="se-w-260 se-h-180 se-br-10" :src="item.images[0]" mode=""></image>
</view>
<view class="se-pl-10 se-w-p-100">
<view class="se-c-black se-fs-28">
{{ item.title }}
</view>
<view class="se-flex se-flex-h-sb se-flex-ai-c se-fs-24 se-mt-10 se-c-66">
<text>{{ item.homeType }}</text>
<text>{{ item.timeGo }}</text>
</view>
<view class="se-flex se-flex-h-sb se-flex-ai-c se-mt-10">
<template v-if="item.iconTitles.length > 0">
<view class="se-flex">
<view
class="se-display-ib se-c-white se-bgc-orange se-fs-22 se-br-8 se-px-10 se-py-5 se-mr-10"
v-for="(items, indexs) in item.iconTitles" :key="indexs">
{{ items }}
</view>
</view>
</template>
<template v-else>
<view></view>
</template>
<view class="se-c-66 se-flex se-flex-ai-c">
<uv-icon name="eye"></uv-icon>
<text class="se-ml-5 se-fs-18">{{ item.num }}</text>
</view>
</view>
<view class="se-flex se-flex-h-sb se-flex-ai-c se-mt-10">
<text class="se-c-red se-fs-24 se-fw-6 se-toe-1">{{ item.price }}/{{ item.unit }}</text>
<text class="se-c-66 se-fs-22 se-toe-1">{{ item.address }}</text>
</view>
</view>
</view>
</view>
<uv-empty v-else text="没有哦" textSize="30rpx" iconSize="200rpx" icon="list"></uv-empty>
<homeList :list="list"></homeList>
</view>
@ -104,7 +59,11 @@
<script>
import { housePageList, houseType, houseArea, houseIconClass, housePrice, houseYear } from "@/common/api.js"
import { getInfo } from "@/common/api.js"
import homeList from "@/components/home/homeList.vue"
export default {
components: {
homeList
},
data() {
return {
scale: 12, //
@ -166,7 +125,7 @@ export default {
activeName: 'region',
//
priceId: null,
typeId: null,
classId: null,
yearId: null
}
},
@ -447,7 +406,7 @@ export default {
title: that.keyword, //
areaId: that.areaId, //
priceId: that.priceId, //
typeId: that.typeId, //
classId: that.classId, //
yearId: that.yearId //
}
@ -531,7 +490,11 @@ export default {
},
//
onSearch() {
onSearch(value) {
// 使使keyword
if (value !== undefined) {
this.keyword = value;
}
console.info('搜索关键词:', this.keyword)
this.pageNo = 1
this.list = []
@ -539,19 +502,59 @@ export default {
},
//
selectMenu(name) {
selectMenu(e) {
const { name, active, type } = e;
this.activeName = name;
// type 1 type1
if (type == 1) {
this.clickItem({
name: 'vip_type',
label: 'VIP文档',
value: e.active ? 1 : 0
});
} else {
const find = this.result.find(item => item.name == this.activeName);
if (find) {
const findIndex = this[this.activeName].child.findIndex(item => item.label == find.label && item.value == find.value);
this[this.activeName].activeIndex = findIndex;
} else {
this[this.activeName].activeIndex = 0;
}
}
},
//
clickItem(item) {
console.log('选择筛选项:', item);
//
this[this.activeName].label = item.label;
this[this.activeName].value = item.value;
clickItem(e) {
let { label, value } = e;
//
const findIndex = this.result.findIndex(item => item.name == this.activeName);
if (this.defaultValue.indexOf(value) > -1 && this[this.activeName].label) {
label = this[this.activeName].label;
}
//
if (findIndex > -1) {
this.$set(this.result, findIndex, {
name: this.activeName,
label,
value
});
} else {
this.result.push({
name: this.activeName,
label,
value
});
}
//
this.result = this.result.filter(item => this.defaultValue.indexOf(item.value) == -1);
console.log('筛选结果:', this.result);
//
this.handleFilter(item);
this.handleFilter({ label, value });
},
//
@ -565,7 +568,7 @@ export default {
} else if (this.activeName === 'rent') {
this.priceId = item.value === 'all' ? null : item.value
} else if (this.activeName === 'type') {
this.typeId = item.value === 'all' ? null : item.value
this.classId = item.value === 'all' ? null : item.value
} else if (this.activeName === 'duration') {
this.yearId = item.value === 'all' ? null : item.value
}
@ -585,7 +588,7 @@ export default {
houseArea({}).then(response => {
let arr = [
{
label: '全部区域',
label: '全部',
value: 'all'
}
]
@ -609,7 +612,7 @@ export default {
console.info('类型数据', response.result)
let arr = [
{
label: '全部类型',
label: '全部',
value: 'all'
}
]
@ -631,7 +634,7 @@ export default {
housePrice({}).then(response => {
let arr = [
{
label: '全部价格',
label: '全部',
value: 'all'
}
]
@ -654,7 +657,7 @@ export default {
console.info('年限数据', response.result)
let arr = [
{
label: '全部年限',
label: '全部',
value: 'all'
}
]
@ -697,7 +700,25 @@ export default {
.Locations {
.search-container {
position: relative;
background-color: #fff;
z-index: 100;
//
.se-bgc-white {
position: relative;
z-index: 101;
}
//
/deep/ .uv-drop-down {
position: relative;
z-index: 102;
}
/deep/ .uv-drop-down-popup {
z-index: 103 !important;
}
border-bottom: 1rpx solid #f0f0f0;
}


+ 1
- 1
pages_subpack/category/component/search.vue View File

@ -1,7 +1,7 @@
<template>
<view>
<view class="se-bgc-white se-pb-20 se-pt-30 se-px-40">
<uv-search @search="onSearch()" placeholder="搜索租房信息" :showAction="false" v-model="keyword"></uv-search>
<uv-search @search="onSearch" placeholder="搜索租房信息" :showAction="false" v-model="keyword"></uv-search>
</view>
<view class="se-pb-10 se-px-40 se-bgc-white">
<uv-drop-down ref="dropDown" sign="dropDown_1" text-active-color="#20CD7D"


+ 1
- 1
pages_subpack/category/index.vue View File

@ -1,6 +1,6 @@
<template>
<view class="uv-page">
<searchVue @onSearch="onSearch($event)" @onParent="onDropDown($event)" />
<searchVue @onSearch="onSearch" @onParent="onDropDown" />
<!-- <view class="se-pb-200">
<view v-if="list.length>0">
<view @click="onDetail(item)" class="se-my-10 se-mx-20 se-px-20 se-py-20 se-br-20 se-bgc-white se-flex" v-for="(item,index) in list" :key="index">


+ 9
- 6
pages_subpack/detail/index.vue View File

@ -23,9 +23,9 @@
<view class="se-flex-1 se-flex-v-sa">
<text class="se-c-66 se-fw-5">价格</text>
<text class="se-c-red se-fw-6 se-mt-20">
{{detail.price}}
{{detail.price}}{{ detail.unit }}
<template v-if="detail.commonClass=='1860388156800077826'">
<!-- <template v-if="detail.commonClass=='1860388156800077826'">
<text class="price-unit" v-if="detail.homeType.includes('出租')">//</text>
<text class="price-unit" v-else-if="detail.homeType.includes('流转')
&& detail.homeType.includes('让')">万元/</text>
@ -38,7 +38,7 @@
</template>
<template v-else>
<text class="price-unit"></text>
</template>
</template> -->
</text>
</view>
@ -98,7 +98,7 @@
</view>
<view class="se-flex se-fs-24" v-if="detail.homeBian">
<view class="se-flex-2 se-py-20">
<text class="se-c-66 se-mr-20">房屋周边</text>
<text class="se-c-66 se-mr-20">房屋亮点</text>
<text class="se-c-black se-fw-6">{{detail.homeBian}}</text>
</view>
</view>
@ -235,7 +235,7 @@
<view class="se-flex se-flex-ai-c se-pb-10">
<view class="line-green"></view>
<view class="se-ml-10 se-fs-32 se-c-black se-fw-6">
房东评价
用户评价
</view>
</view>
<view v-if="rateList.length>0">
@ -446,7 +446,10 @@
userHead:uni.getStorageSync('userInfo').headImage,
userName:uni.getStorageSync('userInfo').nickName,
userValue: that.userValue,
userImage:that.userImages.map(item => item.url).join(','),
}
// userImage
if(that.userImages.length > 0){
params.userImage = that.userImages.map(item => item.url).join(',')
}
saveComment(params).then(response=>{
that.show = false


+ 1
- 1
pages_subpack/house/other.vue View File

@ -392,7 +392,7 @@
price: this.form.price, //
timeGo: "", // -
title: `${this.form.type === 'rent' ? '出租' : '流转'}-其他农村资源-${this.form.address.split('市')[1] || this.form.address}`, // -
unit: "", // -
unit: "", // -
image: this.form.images.map(item => item.url).join(','), // - 使
iconImage: "", //
homeImage: "", // -


Loading…
Cancel
Save