<view
  a:if="{{ store }}"
  id="store-container" class="b2b-store-container"
  style="{{ bgImg ? `background-image: url('${bgImg}');` : '' }}"
>
  <view class="store-content">
    <view class="store-header">
      <view a:if="{{ store.logo }}" class="img-box">
        <image class="img" src="{{ store.logo }}" alt="{{ store.storeName }}"/>
      </view>
      <view class="store-header-center" style="{{ store && !store.hasNearShop ? 'margin-right: 0;' : '' }}">
        <view class="name">{{ store.storeName }}</view>
        <text a:if="{{ store.shopDescribe }}" number-of-lines="{{ 2 }}" class="desc">{{ store.shopDescribe }}</text>
      </view>
      <button a:if="{{ store.hasNearShop }}" class="switch-btn" onTap="handleSwitchStore">门店切换{{ ' >' }}</button>
    </view>
    <view class="store-footer">
      <view class="address-box">
        <text class="address">{{ store.address }}</text>
        <view class="distance-box">
          <text a:if="{{ store.distance }}" class="distance">距你 {{ '<' + store.distance }}</text>
          <text a:if="{{ walk }}" class="distance">，步行{{ walk }}</text>
        </view>
      </view>
      <view class="action-box">
        <button 
          style="{{ color ? ('color: ' + color + ';') : '' }}"
          class="btn" onTap="handleNavigate"
        >
          <am-icon class="icon-nav" type="location_" />导航
        </button>
        <button
          a:if="{{ store.contactMobile }}"
          style="{{ color ? ('color: ' + color + ';') : '' }}"
          class="btn" onTap="handleMakePhoneCall"
        >
          <am-icon class="icon-phone" type="phone_" />电话
        </button>
      </view>
    </view>
  </view>
</view>
<select-store
  a:if="{{ store }}"
  tabBar="{{componentData.tabbarInfo}}"
  shopType="{{componentData.componentExtInfo.shopType || 'ALL'}}"
  ref="setPopup" onSelectStore="onSelectStore" 
/>
<location-tip ref="setLocationTip" onGetLocation="onGetLocation" />