123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263 |
- <template>
- <view>
- <view class="main-left cross-center search">
- <image src="https://t17.9026.com/web/statics/image/index/search.png" mode=""></image>
- <input style="width: 560rpx;" type="text" v-model="name" placeholder="搜索楼盘"
- placeholder-style="font-size:28rpx;color:#999;" @input="search" />
- </view>
- <view class="properties_list">
- <view class="item main-left" v-for="(item,index) in dataList" :key="index" @click="selectEstate(index,item.name,item.id)">
- <view class="left">
- <image :src="item.cover_img" mode=""></image>
- </view>
- <view class="main-between-y right ">
- <view class="title">{{item.name}}</view>
- <view class="addr">{{item.address}}</view>
- <view class="content t-omit-two" v-html="item.details"></view>
- </view>
- <image class="bg" src="https://t17.9026.com/web/statics/image/sale/properties_gradual.png" mode="">
- </image>
- </view>
- <app-no-goods v-if="dataList.length === 0" :title="'暂无数据'" background="#f7f7f7"></app-no-goods>
- </view>
- <u-popup v-model="show" mode="center" border-radius="14" @close="show = false">
- <view class="model">
- <viwe class="main-right">
- <image src="https://t17.9026.com/web/statics/image/index/close.png" mode=""
- style="width: 25rpx;height: 24rpx;" @click="show=false"></image>
- </viwe>
- <viwe class="title">{{dataList[selectIndex].name}}</viwe>
- <viwe class="main-left cross-center addr">
- <image src="https://t17.9026.com/web/statics/image/index/location.png" mode=""
- style="width: 18rpx;height: 20rpx;margin-right: 8rpx;"></image>
- {{dataList[selectIndex].address}}
- </viwe>
- <viwe class="img">
- <image class="img" :src="dataList[selectIndex].cover_img" mode=""></image>
- </viwe>
- <viwe class="desc t-omit-three" v-html="dataList[selectIndex].details"></viwe>
- <button type="default" class="btn" @click="bindingEstate">确认选择</button>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- import appNoGoods from '@/components/page-component/app-no-goods/app-no-goods.vue';
- import uPopup from '@/components/basic-component/u-popup/u-popup.vue';
- export default {
- components: {
- appNoGoods,
- uPopup
- },
- data() {
- return {
- type:'',
- show: false,
- page:1,
- name:'',
-
- dataList:[],
- selectIndex:-1,
- };
- },
- onLoad(option) {
- this.type=option.type
- this.getDate(1)
- },
- methods:{
- selectEstate(index,name,id){
- // if(this.type==='addCustomer'){
- var pages = getCurrentPages();
- var currPage = pages[pages.length - 1]; //当前页面
- var prevPage = pages[pages.length - 2]; //上一个页面
- prevPage.$vm.estateInfo={id:id,name:name}
- // uni.navigateBack()
- // return
- // }
- this.selectIndex=index
- this.show=true
- },
- bindingEstate(){
- uni.navigateBack()
- // this.$request({
- // url: this.$api.sale.binding_estate,
- // data: {
- // estate_id:this.dataList[this.selectIndex].id
- // },
- // method: 'post'
- // }).then(res=>{
- // uni.showToast({
- // icon:'none',
- // title:res.msg
- // })
- // })
- },
- search(e){
- this.$utils.debounce(()=>{
- this.getDate(1,this.name)
- },800)
- },
- getDate(page){
- this.$request({
- url: this.$api.sale.estate_list,
- data: {
- page: page,
- is_myself: 0,
- name: this.name,
- },
- method: 'post'
- }).then(res=>{
- if(res.code===0){
- this.dataList=res.data.list
- }
- })
- }
- },
- onReachBottom() {
- this.page++
- this.getDate(this.page)
- }
- }
- </script>
- <style lang="scss" scoped>
- .model {
- width: 626rpx;
- height: 839rpx;
- background: #FFFFFF;
- border-radius: 14rpx;
- padding: 37rpx 49rpx;
- .title {
- font-size: 36rpx;
- font-weight: bold;
- color: #222222;
- }
- .addr {
- font-size: 22rpx;
- font-weight: 500;
- color: #999999;
- margin-top: 20rpx;
- }
- .img {
- width: 528rpx;
- height: 311rpx;
- border-radius: 14rpx;
- margin-top: 28rpx;
- }
- .desc {
- font-size: 26rpx;
- font-weight: 500;
- color: #222222;
- line-height: 36rpx;
- margin-top: 36rpx;
- max-height: 100rpx;
- }
- .btn {
- width: 525rpx;
- height: 85rpx;
- background: #A18353;
- border-radius: 6rpx;
- margin: 49rpx auto;
- font-size: 32rpx;
- font-weight: bold;
- color: #FFFFFF;
- }
- }
- .page {
- padding: 22rpx 0 0 0;
- min-height: 100vh;
- }
- .search {
- width: 680rpx;
- height: 82rpx;
- background: #FFFFFF;
- border: 1rpx solid #EEEEEE;
- border-radius: 4rpx;
- margin: 0 auto;
- padding-left: 22rpx;
- image {
- width: 22rpx;
- height: 22rpx;
- margin-right: 18rpx;
- }
- }
- .properties_list {
- background-color: #F8F8F8;
- .item {
- font-family: PingFang SC;
- margin: 25rpx auto;
- width: 678rpx;
- height: 206rpx;
- background: #FFFFFF;
- border-radius: 10rpx;
- // background-image: url(https://t17.9026.com/web/statics/image/sale/properties_gradual.png);
- padding: 25rpx;
- position: relative;
- .bg {
- position: absolute;
- top: 0;
- left: 0;
- width: 80%;
- height: 100%;
- }
- .left {
- image {
- width: 153rpx;
- height: 153rpx;
- border-radius: 10rpx;
- }
- }
- .right {
- margin-left: 25rpx;
- .title {
- font-size: 30rpx;
- font-weight: bold;
- color: #222222;
- }
- .addr {
- font-size: 22rpx;
- font-weight: 500;
- color: #222222;
- }
- .content {
- font-size: 24rpx;
- font-weight: 500;
- color: #666666;
- line-height: 34rpx;
- }
- }
- }
- .addPro {
- position: fixed;
- bottom: 0;
- width: 100%;
- height: 100rpx;
- background: #A18353;
- font-size: 32rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #FFFFFF;
- }
- }
- </style>
|