MerchantList.wxml 6.54 KB
<view class="layout">
  <view class="fixed">
    <search-box bindsearch="search" searchType="2" value="{{storeName}}" couponDetails="{{couponDetailStyle}}"></search-box>
    <view class="dropdown-box flex">
      <view class="item flex" bindtap="showIndexList" data-type="0">
        城市
        <view class="value flex">
          {{cityCode || '请选择'}}
          <view class="icon">
            <image webp src="{{IMGURL}}index/arrow.png?v={{img_version}}"></image>
          </view>
        </view>
      </view>
      <view wx:if="{{!newCars}}" class="item flex" bindtap="showIndexList" data-type="1">
        品牌
        <view class="value flex">
          {{brandName||'请选择'}}
          <view class="icon">
            <image webp src="{{IMGURL}}index/arrow.png?v={{img_version}}"></image>
          </view>
        </view>
      </view>
      <view wx:else class="item flex"></view>
      <view class="item flex" bindtap="searchAll">
        <view class="all">
          <image webp src="{{IMGURL}}index/all.png?v={{img_version}}"></image>
        </view>
        所有门店
      </view>
    </view>
  </view>
  <view class="merchant-box">
    <scroll-view scroll-y style="height:calc(100vh - {{fixedHeight}}px);" bindscrolltolower="scrollTolower">
      <block wx:if="{{listFlag}}">
        <block wx:if="{{defaultStore}}">
          <view class="item">
            <view class="current">当前门店</view>
            <view class="name">{{defaultStore.storeName}}</view>
            <view class="address">{{defaultStore.address}}</view>
            <block wx:if="{{defaultStore.brands && defaultStore.brands.length}}">
              <view class="brand flex">
                <block wx:for="{{defaultStore.brands}}" wx:for-index="ind" wx:for-item="i" wx:key="ind">
                  <block wx:if="{{ind < 2}}">
                    <view class="flex">
                      <view class="icon">
                        <image webp src="{{i.brandImage}}"></image>
                      </view>
                      {{i.brandName}}
                    </view>
                  </block>
                </block>
                <block wx:if="{{defaultStore.brands.length > 2}}">...</block>
              </view>
            </block>
            <view class="bottom flex">
              <view class="phone flex" catchtap="phoneCall" data-phone="{{defaultStore.appointmentPhone}}">
                <view class="icon">
                  <image webp src="{{IMGURL}}mine/phone.png?v={{img_version}}"></image>
                </view>
                {{defaultStore.appointmentPhone}}
              </view>
              <view class="btn-box flex">
                <block wx:if="{{flag}}">
                  <view class="flex" catchtap="openLocation" data-item="{{defaultStore}}">
                    <view class="jump">
                      <image webp src="{{IMGURL}}index/navigation.png?v={{img_version}}"></image>
                    </view>
                    <block wx:if="{{defaultStore.distance}}">
                      {{defaultStore.distance}}km
                    </block>
                  </view>
                  <block wx:if="{{unauthorized}}">
                    <view catchtap="authAddress">授权获取位置</view>
                  </block>
                </block>
                <block wx:if="{{!isNavigation}}">
                  <view class="btn text-center" catchtap="chooseStore" data-item="{{defaultStore}}">选择门店</view>
                </block>
              </view>
            </view>
          </view>
        </block>
        <block wx:if="{{list.length}}">
          <block wx:for="{{list}}" wx:key="index">
            <view class="item" wx:if="{{!item.current}}" style="{{couponDetailStyle ? 'border: 1rpx solid #EEEEEE;box-shadow: 0rpx 4rpx 16rpx 0rpx rgba(224, 224, 224, 0.3);':''}}">
              <view class="name">{{item.storeName}}</view>
              <view class="address">{{item.address}}</view>
              <block wx:if="{{item.brands && item.brands.length}}">
                <view class="brand flex">
                  <block wx:for="{{item.brands}}" wx:for-index="ind" wx:for-item="i" wx:key="ind">
                    <block wx:if="{{ind < 2}}">
                      <view class="flex">
                        <view class="icon">
                          <image webp src="{{i.brandImage}}"></image>
                        </view>
                        {{i.brandName}}
                      </view>
                    </block>
                  </block>
                  <block wx:if="{{item.brands.length > 2}}">...</block>
                </view>
              </block>
              <view class="bottom flex">
                <view class="phone flex" catchtap="phoneCall" data-phone="{{item.appointmentPhone}}">
                  <view class="icon">
                    <image webp src="{{IMGURL}}mine/phone-2.png?v={{img_version}}"></image>
                  </view>
                  {{item.appointmentPhone}}
                </view>
                <view class="btn-box flex">
                  <block wx:if="{{flag}}">
                    <view class="flex" catchtap="openLocation" data-item="{{item}}">
                      <view class="jump">
                        <image webp src="{{IMGURL}}index/navigation.png?v={{img_version}}"></image>
                      </view>
                      <block wx:if="{{item.distance}}">
                        {{item.distance}}km
                      </block>
                    </view>
                    <block wx:if="{{unauthorized}}">
                      <view catchtap="authAddress">授权获取位置</view>
                    </block>
                  </block>
                  <block wx:if="{{!isNavigation}}">
                    <view class="btn text-center" catchtap="chooseStore" data-item="{{item}}">选择门店</view>
                  </block>
                </view>
              </view>

            </view>
          </block>
          <block wx:if="{{nothing}}">
            <view class="list-nothing ">到底啦!!</view>
          </block>
        </block>
        <block wx:else>
          <view class="list-nothing">
            暂无相关内容
          </view>
        </block>
      </block>
    </scroll-view>
  </view>
</view>

<index-list listType="1" show="{{showBrand}}" bindclick="choose" default-data="{{brandName}}"></index-list>
<index-list show="{{showCity}}" bindclick="choose" default-data="{{defaultCity}}"></index-list>

<authorize scopeType="userLocation" bindsuccess="authSuccess" bindfail="authFail" show="{{showAuth}}">
</authorize>

<glsx-privacy appletName="广汇车生活"></glsx-privacy>