上传视频,页面调整
This commit is contained in:
@@ -27,7 +27,45 @@
|
||||
</view>
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
|
||||
@scrolltolower="lower" @scroll="onScroll">
|
||||
<view class="house-list">
|
||||
<uv-waterfall ref="waterfall" v-model="list" left-gap="10" right-gap="10" column-gap="8"
|
||||
@changeList="changeList">
|
||||
<!-- 第一列数据 -->
|
||||
<template v-slot:list1>
|
||||
<!-- 为了磨平部分平台的BUG,必须套一层view -->
|
||||
<view class="house-list">
|
||||
<block v-for="(item,index) in list1" :key="index">
|
||||
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
|
||||
<image :src="item.files[0].url" mode="widthFix">
|
||||
</image>
|
||||
<view class="info">
|
||||
<view class="title">{{ item.houseTitle }}</view>
|
||||
<view class="desc"><text>{{ item.extent }}m²|{{ item.toward }}</text></view>
|
||||
<view class="price">{{ item.monthlyRent }}元/月</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
<!-- 第二列数据 -->
|
||||
<template v-slot:list2>
|
||||
<!-- 为了磨平部分平台的BUG,必须套一层view -->
|
||||
<view class="house-list">
|
||||
<block v-for="(item,index) in list2" :key="index">
|
||||
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
|
||||
<image :src="item.files[0].url" mode="widthFix">
|
||||
</image>
|
||||
<view class="info">
|
||||
<view class="title">{{ item.houseTitle }}</view>
|
||||
<view class="desc"><text>{{ item.extent }}m²|{{ item.toward }}</text></view>
|
||||
<view class="price">{{ item.monthlyRent }}元/月</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</template>
|
||||
</uv-waterfall>
|
||||
<!-- <view class="house-list">
|
||||
|
||||
<block v-for="(item,index) in list" :key="index">
|
||||
<view class="item" @click="$push('sub_pages/house/detail?houseId=' + item.houseId)">
|
||||
<image :src="item.files[0].url" mode="widthFix">
|
||||
@@ -38,9 +76,8 @@
|
||||
<view class="price">{{ item.monthlyRent }}元/月</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<!-- <view class="item">
|
||||
</block> -->
|
||||
<!-- <view class="item">
|
||||
<image src="https://file.wsdns.cn/20230802/8bf0658596ab458d94666cbf4b1177e9.jpg" mode="widthFix">
|
||||
</image>
|
||||
<view class="info">
|
||||
@@ -50,7 +87,7 @@
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
<u-empty mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" v-if="list.length == 0">
|
||||
</u-empty>
|
||||
</scroll-view>
|
||||
@@ -83,6 +120,8 @@
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
list1: [], // 瀑布流第一列数据
|
||||
list2: [], // 瀑布流第二列数据
|
||||
loadMore: true,
|
||||
status: '加载更多',
|
||||
page: 1,
|
||||
@@ -138,6 +177,10 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 这点非常重要:e.name在这里返回是list1或list2,要手动将数据追加到相应列
|
||||
changeList(e) {
|
||||
this[e.name].push(e.value);
|
||||
},
|
||||
onRefreshList() {
|
||||
const app = this
|
||||
const userId = uni.getStorageSync('userId')
|
||||
@@ -146,7 +189,7 @@
|
||||
// app.where.monthlyRentStart = app.priceScene
|
||||
// app.where.monthlyRentEnd = app.priceScene
|
||||
// }
|
||||
console.log('app: ',app.where);
|
||||
console.log('app: ', app.where);
|
||||
return new Promise((resolve, reject) => {
|
||||
HouseInfoApi.pageHouseInfo(app.where)
|
||||
.then(result => {
|
||||
@@ -170,7 +213,7 @@
|
||||
const app = this
|
||||
DictApi.listDictionary().then(res => {
|
||||
app.dict = res.data
|
||||
|
||||
|
||||
app.price = res.data.price[0].map(d => {
|
||||
return {
|
||||
value: d,
|
||||
@@ -184,20 +227,20 @@
|
||||
}
|
||||
})
|
||||
app.sort = res.data.sort[0].map(d => {
|
||||
console.log('d: ',d);
|
||||
console.log('d: ', d);
|
||||
return {
|
||||
value: d,
|
||||
text: d
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
uni.request({
|
||||
url: 'https://file.wsdns.cn/json/city.js',
|
||||
success(res) {
|
||||
res.data.map(e => {
|
||||
if(e.value == '450000'){
|
||||
if (e.value == '450000') {
|
||||
e.children.map(city => {
|
||||
if(city.value == '450100'){
|
||||
if (city.value == '450100') {
|
||||
app.region = city.children.map(r => {
|
||||
return {
|
||||
value: r.label,
|
||||
@@ -215,32 +258,32 @@
|
||||
onSearch(text) {
|
||||
this.list = []
|
||||
this.page = 1
|
||||
console.log('extentScene: ',this.where.extentScene);
|
||||
if(text == '0-100㎡'){
|
||||
console.log('extentScene: ', this.where.extentScene);
|
||||
if (text == '0-100㎡') {
|
||||
this.where.extentScene = '100'
|
||||
}
|
||||
if(text == '100-150㎡'){
|
||||
if (text == '100-150㎡') {
|
||||
this.where.extentScene = '100-150'
|
||||
}
|
||||
if(text == '150-200㎡'){
|
||||
if (text == '150-200㎡') {
|
||||
this.where.extentScene = '150-200'
|
||||
}
|
||||
if(text == '200-300㎡'){
|
||||
if (text == '200-300㎡') {
|
||||
this.where.extentScene = '200-300'
|
||||
}
|
||||
if(text == '300-400㎡'){
|
||||
if (text == '300-400㎡') {
|
||||
this.where.extentScene = '300-400'
|
||||
}
|
||||
if(text == '400-600㎡'){
|
||||
if (text == '400-600㎡') {
|
||||
this.where.extentScene = '400-600'
|
||||
}
|
||||
if(text == '600-1000㎡'){
|
||||
if (text == '600-1000㎡') {
|
||||
this.where.extentScene = '600-1000'
|
||||
}
|
||||
if(text == '1000㎡以上'){
|
||||
if (text == '1000㎡以上') {
|
||||
this.where.extentScene = '1000'
|
||||
}
|
||||
|
||||
|
||||
this.onRefreshList()
|
||||
// this.$push('/sub_pages/member/member', this.where)
|
||||
},
|
||||
@@ -276,6 +319,7 @@
|
||||
.region {
|
||||
width: 178rpx;
|
||||
background-color: #ffffff;
|
||||
|
||||
* {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
@@ -299,11 +343,11 @@
|
||||
}
|
||||
|
||||
.house-list {
|
||||
width: 700rpx;
|
||||
margin: 20rpx auto;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
// width: 700rpx;
|
||||
// margin: 20rpx auto;
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
// justify-content: space-between;
|
||||
|
||||
.item {
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
Reference in New Issue
Block a user