<view class="blue-bg"></view>
<scroll-view>
  <view class="agent-detail">
    <view class="agent-intro">
      <view class="agent-avator" style="background-image: url({{agentDetail.avatar || 'https://4dkk2.4dage.com/v3/img/apps/vrhouse/avatar_default.jpg?_=246'}})">
        <image src="{{ agentDetail.tag_image }}"></image>
      </view>
      <view class="agent">
        <view class="agent-name-w">
          <text class="name">{{ agentDetail.name }}</text>
          <text >{{ agentDetail.type }}</text>
          <view class="agent-icon" bindtap="showWorkCard"></view>
        </view>
        <view class="organ">{{ agentDetail.store ? agentDetail.store : ''}}</view>
      </view>
    </view>
    <view class="rate-w">
      <view class="rate-top rate-list">
        <view class="rate-item">
          <view class="rate">{{ agentDetail.volume_half_year }}</view>
          <view class="rate-title">客户评价总分</view>
        </view>
        <view class="rate-item">
          <view class="rate">{{ agentDetail.recent_recommend_vrs }}</view>
          <view class="rate-title">30天服务客户数</view>
        </view>
      </view>
      <view class="rate-list">
        <view class="rate-item">
          <view class="rate">{{ agentDetail.volume_half_year }}</view>
          <view class="rate-title">近半年成交（套）</view>
        </view>
        <view class="rate-item">
          <view class="rate">{{ agentDetail.deal_average_period}}</view>
          <view class="rate-title">平均成交周期（天）</view>
        </view>
      </view>
    </view>
  </view>

  <view class="house-list">
    <view class="main-title">推荐房源（5）</view>
    <house-item wx:for="{{house_list}}" house="{{item}}" wx:key="index" />
  </view>
</scroll-view>

<view class="footer">
  <button class=" btn" data-action="toChat" open-type="getUserInfo" bindtap="bindgetuserinfo" wx:if="{{ !loginStatus }}">在线咨询</button>
  <view class="btn" bindtap="toChat" wx:else>在线咨询</view>
  <view class="btn mobile-btn" bindtap="makePhone">电话咨询</view>
</view>

<modal wx:if="{{ showCard }}">
  <view class="work-card">
    <view class="close-btn" bindtap="hideWorkCard"></view>
    <view>从业资格</view>
    <view class="photo">
      <image src="{{ agentDetail.work_pass_image }}"></image>
    </view>
  </view>
</modal>