<!--pages/productDetail/productDetail.wxml-->
<view class="content">
  <view class="infoCard">
    <view wx:if="{{data.linkFirstSlogan}}" class="linkFirstSlogan">
      <text user-select="true">{{data.linkFirstSlogan}}</text>
    </view>
    <view wx:if="{{data.linkSecondSlogan}}" class="linkSecondSlogan">
      <text user-select="true">{{data.linkSecondSlogan}}</text>
    </view>
    <view wx:if="{{data.linkCompany}}" class="title">
      <VanIcon name="home-o" style="margin-right: 10rpx;" />
      <text user-select="true">{{data.linkCompany}}</text>
    </view>
    <view wx:if="{{data.linkCompanyAddress}}" class="address">
      <VanIcon name="location-o" style="margin-right: 10rpx;" /> <text user-select="true">{{data.linkCompanyAddress}}</text>
    </view>
  </view>
  <VanDivider borderColor="#4ac987" contentPosition="center">联系人</VanDivider>

  <block wx:if="{{data.linkList && data.linkList.length > 0}}">
    <view class="contacter" wx:for="{{data.linkList}}" wx:key="index">
      <view class="image" bindtap="checkImage" data-qrCode="{{item.qrCode}}">
        <image src="{{item.qrCode}}" mode="widthFix" />
      </view>
      <view class="info">
        <view class="name">
          <VanIcon class="icon" name="contact" />
          <text user-select="true">{{item.name}}</text>
        </view>

        <view class="phone" bindtap="makePhoneCall" data-phone="{{item.phone}}">
          <VanIcon class="icon" name="phone-o" />
          <text user-select="true">{{item.phone}}</text>
        </view>

        <view class="mail">
          <VanIcon class="icon" name="envelop-o" />
          <text user-select="true">{{item.email}}</text>
        </view>
      </view>
    </view>
  </block>

  <block wx:if="{{data.linkList && data.linkList.length <= 0}}">
    <VanEmpty description="暂无联系人" />
  </block>
</view>

<VanPopup show="{{ showImage }}" bind:close="closeImage">
  <view class="scaleImage">
    <image src="{{currentQrCode}}" show-menu-by-longpress="true" mode="widthFix" />
    <view>长按识别二维码</view>
  </view>
</VanPopup>