<template>
  <view class="zuFang" :class="{'zuFang--elder':$uiStyle==='elder'}">
    <image class="image" src="/subPages/static/images/rent/rent_out.png" mode="scaleToFill"/>
    <view class="content">
      <view class="cell-list" @tap="checkRecord">
        <view class="title">本地房源</view>
        <view class="cell">
          <image class="left-icon" mode="aspectFit" src="/subPages/static/images/rent/local_house.png"/>
          <view class="text">
            <view class="name">门牌找房</view>
            <view class="desc">真实房源 地址门牌 定位精准</view>
            <view class="desc">基于门牌地图迅速查找周边房源</view>
          </view>
          <!-- <image class="right-icon" mode="aspectFit" src="/static/images/common/forward.png" /> -->
        </view>
      </view>
   <!--    <view class="cell-list" @tap="jumpToH5">
        <view class="title">第三方服务</view>
        <view class="cell">
          <image class="left-icon" mode="aspectFit" src="/subPages/static/images/rent/thirty_service.png"/>
          <view class="text">
            <view class="name">宁波市房产交易信息服务网</view>
            <view class="desc">真实 及时 全域 权威</view>
            <view class="desc">服务由宁波市房产市场管理中心提供</view>
          </view>
        </view>
      </view> -->
    </view>
  </view>
</template>

<script>
const app = getApp();
export default {
  name: "zuFang",
  data() {
    return {
    }
  },
  onLoad() {

  },
  methods: {
    // 跳转到宁波租房网
    jumpToH5 () {
      app.globalData.jumpUrl='https://zl.cnnbfdc.com/rentallisting?r=c8fd3c63-55e5-4a67-8cf8-9cedadd0f1a2&page=0'
      // #ifdef MP-WEIXIN || H5
      uni.navigateTo({
        url: '/subPages/pages/webview/webview',
      });
      // #endif
      // #ifdef MP-ALIPAY
      if(uni.getEnvVersion() === 'develop') {
        uni.navigateTo({
          url: '/subPages/pages/webview/webview',
        });
      } else {
        uni.showToast({title: '暂未开放', duration: 1000});
      }
      // #endif
    },
    // 查看门牌发布的租房记录
    checkRecord () {
      uni.navigateTo({
        url: '/subPages/pages/rent/zuFang/houseList'
      });
    }
  },
} 
</script>

<style lang="scss" scoped>
.zuFang {
  .image {
    width: 100%;
    height: 25vh;
  }
  .content {
    .cell-list {
      background-color: #fff;
      padding: 0 15px;
      margin-bottom: 10px;
      .title {
        height: 35px;
        line-height: 35px;
        border: 0.5px solid #f1eeee;
      }
      .cell {
        display: flex;
        align-items: center;
        padding: 10px 0;
        .left-icon {
          width: 60px;
          height: 60px;
          margin-right: 8px;
        }
        .text {
          width: calc(100% - 60px);
          .name {
            font-size: 16px;
            font-weight: 700;
            color: #333333;
            padding-bottom: 5px;
          }
          .desc {
            font-size: 13px;
            font-weight: 300;
            color: #999999;
            padding-bottom: 2px;
          }
        }
        // .right-icon {
        //   width: 20px;
        //   height: 20px;
        // }
      }
    }
  }
}

.zuFang--elder {
  .content {
    .cell-list {
      .title {
        font-size: calc(13px * $zlb-elder-font-scale);
      }
      .cell {
        .left-icon {
          width: 80px;
          height: 80px;
        }
        .text {
          width: calc(100% - 80px);
          .name {
            font-size: calc(12px * $zlb-elder-font-scale);
          }
          .desc {
            font-size: calc(10px * $zlb-elder-font-scale);
          }
        }
      }
    }
  }
}
</style>