mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-08 01:42:28 +08:00
调整ui
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <u-navbar :is-back="true" title="房源列表" :border-bottom="false"></u-navbar> -->
|
||||
<view class="search-list-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<customNavbar title="资产列表" />
|
||||
<u-sticky offset-top="0">
|
||||
<view class="sticky">
|
||||
<filterDropdown :menuTop="0" :filterData="filterData" :defaultSelected="defaultSelected" :updateMenuName="true" @confirm="confirm" dataFormat="Object"></filterDropdown>
|
||||
@@ -8,24 +9,24 @@
|
||||
</u-sticky>
|
||||
<view class="u-p-l-10 u-p-r-10 waterfall">
|
||||
<u-waterfall v-model="flowList" ref="uWaterfall">
|
||||
<template v-slot:left="{leftList}">
|
||||
<view class="demo-warter" v-for="(item, index) in leftList" :key="index">
|
||||
<u-lazy-load threshold="750" border-radius="12" :image="item.image" :index="index"
|
||||
@click="clickImage(item.id)"></u-lazy-load>
|
||||
<view class="item-title">{{item.villageName}} {{item.type == '整租' ? item.houseNum + item.houseHall + item.toiletNum : item.roomType}}</view>
|
||||
<view class="item-price">¥{{item.price}}</view>
|
||||
<view class="item-desc">{{item.type}} | {{item.type == '整租' ? item.houseArea : item.roomArea}}㎡ | {{item.decoration}} </view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:right="{rightList}">
|
||||
<view class="demo-warter" v-for="(item, index) in rightList" :key="index">
|
||||
<u-lazy-load threshold="750" border-radius="10" :image="item.image" :index="index"
|
||||
@click="clickImage(item.id)"></u-lazy-load>
|
||||
<view class="item-title">{{item.villageName}} {{item.type == '整租' ? item.houseNum + item.houseHall + item.toiletNum : item.roomType}}</view>
|
||||
<view class="item-price">¥{{item.price}}</view>
|
||||
<view class="item-desc">{{item.type}} | {{item.type == '整租' ? item.houseArea : item.roomArea}}㎡ | {{item.decoration}} </view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:left="{leftList}">
|
||||
<view class="demo-warter" v-for="(item, index) in leftList" :key="index">
|
||||
<u-lazy-load threshold="750" border-radius="12" :image="item.coverImgUrl" :index="index"
|
||||
@click="clickImage(item.id)"></u-lazy-load>
|
||||
<view class="item-title">{{item.name}}</view>
|
||||
<view class="item-desc">{{ item.footPrint}}㎡</view>
|
||||
<view class="item-price">¥{{item.rentFee}}</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-slot:right="{rightList}">
|
||||
<view class="demo-warter" v-for="(item, index) in rightList" :key="index">
|
||||
<u-lazy-load threshold="750" border-radius="10" :image="item.coverImgUrl" :index="index"
|
||||
@click="clickImage(item.id)"></u-lazy-load>
|
||||
<view class="item-title">{{item.name}}</view>
|
||||
<view class="item-desc">{{ item.footPrint}}㎡</view>
|
||||
<view class="item-price">¥{{item.rentFee}}</view>
|
||||
</view>
|
||||
</template>
|
||||
</u-waterfall>
|
||||
<u-loadmore bg-color="rgb(240, 240, 240)" :status="loadStatus" @loadmore="findHouseList" style="height: 80rpx;line-height: 80rpx;"></u-loadmore>
|
||||
<u-back-top :scroll-top="scrollTop" top="1000"></u-back-top>
|
||||
@@ -91,59 +92,42 @@
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
methods: {
|
||||
findHouseList() {
|
||||
let url = "/api/houseApi/findHouseRoomList";
|
||||
let defaultData = {
|
||||
state:1,
|
||||
villageCity:uni.getStorageSync('lifeData').vuex_city,
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
orderByColumn: 'update_time,create_time',
|
||||
isAsc: 'desc'
|
||||
}
|
||||
this.$u.get(url, {...defaultData,...this.searchData}).then(result => {
|
||||
console.log(this.searchData);
|
||||
console.log(result);
|
||||
const data = result.rows;
|
||||
if(this.pageNum>1 && data.length < this.pageSize){
|
||||
return this.loadStatus = 'nomore';
|
||||
}
|
||||
this.houseList = data;
|
||||
for (let i = 0; i < this.houseList.length; i++) {
|
||||
// 先转成字符串再转成对象,避免数组对象引用导致数据混乱
|
||||
let item = this.houseList[i]
|
||||
if(!item.faceUrl.includes(config.staticUrl)){
|
||||
item.image = config.staticUrl+item.faceUrl
|
||||
}else{
|
||||
item.image = item.faceUrl
|
||||
}
|
||||
if(item.type == 0){
|
||||
item.type = '整租'
|
||||
}else if(item.type == 1){
|
||||
item.type = '合租'
|
||||
}
|
||||
if(item.roomType == 1){
|
||||
item.roomType = '主卧'
|
||||
}else if(item.roomType == 2){
|
||||
item.roomType = '次卧'
|
||||
}else{
|
||||
item.roomType = '未知'
|
||||
}
|
||||
if(this.$u.test.isEmpty(item.houseNum)){
|
||||
item.houseNum = ''
|
||||
}
|
||||
if(this.$u.test.isEmpty(item.houseHall)){
|
||||
item.houseHall = ''
|
||||
}
|
||||
if(this.$u.test.isEmpty(item.toiletNum)){
|
||||
item.toiletNum = ''
|
||||
}
|
||||
this.flowList.push(item);
|
||||
}
|
||||
++ this.pageNum
|
||||
this.loadStatus = 'loadmore';
|
||||
});
|
||||
},
|
||||
findHouseList(type = 0) {
|
||||
if(type == 1){
|
||||
this.pageNum = 1
|
||||
this.flowList = []
|
||||
this.$refs.uWaterfall.clear();
|
||||
}
|
||||
let url = "/assets/findAssetList";
|
||||
this.$u.post(url, {
|
||||
state:1,
|
||||
villageCity:uni.getStorageSync('lifeData').vuex_city,
|
||||
pageNum: this.pageNum,
|
||||
pageSize: this.pageSize,
|
||||
orderByColumn: 'update_time,create_time',
|
||||
isAsc: 'desc'
|
||||
}).then(result => {
|
||||
const data = result.data.result;
|
||||
if(this.pageNum>1 && data.length < this.pageSize){
|
||||
// return this.loadStatus = 'nomore';
|
||||
}
|
||||
this.houseList = data;
|
||||
for (let i = 0; i < this.houseList.length; i++) {
|
||||
// 先转成字符串再转成对象,避免数组对象引用导致数据混乱
|
||||
let item = this.houseList[i]
|
||||
// if(!item.faceUrl.includes(config.staticUrl)){
|
||||
// item.image = config.staticUrl+item.faceUrl
|
||||
// }else{
|
||||
// item.image = item.faceUrl
|
||||
// }
|
||||
this.flowList.push(item);
|
||||
}
|
||||
++ this.pageNum
|
||||
this.loadStatus = 'loadmore';
|
||||
}).catch(err => {
|
||||
console.log("失败:", err)
|
||||
})
|
||||
},
|
||||
findVillageList() {
|
||||
let url = "/api/houseApi/findVillageList";
|
||||
this.$u.get(url,{
|
||||
@@ -213,6 +197,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.search-list-page{
|
||||
padding-top: 175rpx;
|
||||
}
|
||||
.waterfall{
|
||||
// padding-top: 85rpx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user