// components/house-item/house-item.js
const app = getApp();

Component({
  /**
   * 组件的属性列表
   */
  properties: {
    client: Object
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */

  methods: {
    toDetail () {
      wx.navigateTo({
        // url: `/pages/client-detail/client-detail?agency_user_id=${this.properties.client.agency_user_id}&user_id=${this.properties.client.user_id}`
        url: `/pages/client-detail/client-detail?id=${this.properties.client.id}`
      })
    },
    makePhoneCall(){
      app.makePhoneCall(this.properties.client.user_phone);
    },
    toChat () {
      wx.navigateTo({
        url: `/pages/chat/chat?toId=${this.properties.client.user_id}&toName=${this.properties.client.user_name}`,
      })
    }
  }
})
