<template>
  <div>
    <van-nav-bar
      @click-left="onClickLeft"
      @click-right="onClickRight"
      style="background-color: #1989fa"
    >
      <template #title>
        <van-col style="color: #ffffff">房源信息</van-col>
      </template>
      <template #left>
        <i
          class="fa fa-arrow-circle-left"
          aria-hidden="true"
          style="color: #ffffff; font-size: 18px"
        ></i>
      </template>
      <template #right>
        <van-icon name="replay" size="18" color="#ffffff" />
      </template>
    </van-nav-bar>
     <van-row style="border-bottom: #efefef solid 3px;">
        <van-col span="24" class="title">
                <i class="fa fa-home" aria-hidden="true"></i> {{data.rFullName}}
        </van-col>
      </van-row>
      <van-cell
        title="楼栋"
        :value="data.BuildingName"
        title-class="title1"
        value-class="value1"
        size="large"
        
      />
      <van-cell
        title="户型"
        :value="data.ModelName"
        title-class="title1"
        value-class="value1"
        size="large"
      />
     <van-cell
        title="产品类型"
        :value="data.HouseType"
        title-class="title1"
        value-class="value1"
        size="large"
      />
      <van-cell
        title="建筑面积"
        :value="data.rBuildingArea"
        title-class="title1"
        value-class="value1"
        size="large"
      />
      <van-cell
        title="室内面积"
        :value="data.rInnerArea"
        title-class="title1"
        value-class="value1"
        size="large"
      />
      <van-cell
        title="其他面积"
        :value="data.rOtherArea"
        title-class="title1"
        value-class="value1"
        size="large"
      />
      <van-cell
        title="销售方式"
        :value="data.SaleType"
        title-class="title1"
        value-class="value1"
        size="large"
      />
       <van-cell
        title="销售状态"
        :value="data.rStateName"
        title-class="title1"
        value-class="value1"
        size="large"
      />
       <van-cell
        title="补差方式"
        :value="data.ReserveType"
        title-class="title1"
        value-class="value1"
        size="large"
      />
       <van-cell
        title="表单价"
        :value="data.rListPrice"
        title-class="title1"
        value-class="value1"
        size="large"
      />
       <van-cell
        title="表总价"
        :value="data.rListTotalPrice"
        title-class="title1"
        value-class="value1"
        size="large"
      />
      <van-cell
        title="当前业主"
        :value="data.OwnerName"
        title-class="title1"
        value-class="value1"
        size="large"
      />
      <van-cell
        title="房源备注"
        :value="data.rRemark"
        title-class="title1"
        value-class="value1"
        size="large"
      />
  </div>
</template>

<script>
import { GetSaRoomInfo } from "@/common/api/loginApi.js";
export default {
  name: "login",
  data() {
    return {
      data: {}, 
    };
  },
  created: function () {
    console.info("created");
    //console.info(this.$util);
    this.$util.persistLogin(this);
    this.GetSaRoomInfo();
  },
  methods: {
    GetSaRoomInfo: function () {
      var that = this;
      var data = {
          userCode:that.$store.state.data.userCode,
          projectId: that.$store.state.projectId,
          roomId:that.$route.query.id
      };
      console.info("data", data);
      GetSaRoomInfo(data).then((res) => {
        console.info("GetSaRoomInfo", res);
        if (!res.result) {
          that.$toast(res.msg);
          return;
        }
       that.data=res.data;
      });
    },    
    onClickLeft() {
      // this.$toast('返回')
      console.info("left");
      this.$router.go(-1);
    },
    onClickRight() {
      this.$router.go(0);
    },
  },
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.title{
    color:#0f0fa7;
    font-size:18px;
    font-weight:900;
    text-align: left;
    margin-left:15px;
    height:40px;
    margin-top:15px;
}
.title1 {
  color: #999;
  text-align: left;
}
.value1{
    color:#0f0fa7;
    font-size:15px;
}
</style>
