
import HouseApi from '../../../apis/house'
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    house_id: String
  },
  data: {
    intros: []
  },
  ready () {
    this.getHouseDetail(this.properties.house_id)
  },
  methods: {
    getHouseDetail(house_id){
      wx.showLoading({
        title: '加载数据中'
      })
      HouseApi.houseDetail(house_id).then(res => {
        let house = res.data
        if (house.remarks) {
          this.setData({
            intros: JSON.parse(house.remarks)
          })
        }
        wx.hideLoading()
      }).catch(err => {
        wx.hideLoading()
      })
    },
  }
})