tips-nearby-store-comp.wxml 3.11 KB
<view class="comp-item">
  <view class="cont">
    <!-- 导航 -->
    <view wx:if="{{searchMode == 1}}" class="nav nav1">
      <view class="place">
        您当前所在城市:
        <span class="city">{{localCity}}</span>
      </view>
      <view bindtap="onSearchHandModeHandler" data-data="1" class="btn">手动选择</view>
    </view>
    <view wx:else class="nav nav2">
      <view class="area">
        <!-- 省 -->
        <picker bindchange="bindPickerChangeProvince" value="{{provinceIndex}}" range="{{provinceList}}" range-key="name">
          <view bindtap="getProvince" class="area-item">
            <span class="val">
              {{provinceList[provinceIndex].name ? provinceList[provinceIndex].name : '省'}}
            </span>
            <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
          </view>
        </picker>
        <!-- 市 -->
        <picker bindchange="bindPickerChangeCity" value="{{cityIndex}}" range="{{cityList}}" range-key="name">
          <view class="area-item">
            <span class="val">{{cityList[cityIndex].name ? cityList[cityIndex].name : '市'}}</span>
            <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
          </view>
        </picker>
        <!-- 区 -->
        <picker bindchange="bindPickerChangeDistrict" value="{{districtIndex}}" range="{{districtList}}" range-key="name">
          <view class="area-item">
            <span class="val">
              {{districtList[districtIndex].name ? districtList[districtIndex].name : '区'}}
            </span>
            <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-drow-down.png" />
          </view>
        </picker>
      </view>
      <view bindtap="onSearchAutoModeHandler" data-data="2" class="btn">自动选择</view>
    </view>
    <!-- 门店列表 -->
    <scroll-view scroll-y="{{true}}" class="pos">
      <view bindtap="onSelectHandler" data-data="{{item}}" data-index="{{index}}" wx:for="{{addressList}}" wx:key="{{index}}" class="pos-item">
        <view wx:if="{{selectedMode}}" class="check">
          <image wx:if="{{item.selected}}" class="icon" mode="widthFix" src="../../image/oss/icon/icon-check.png" />
        </view>
        <view class="info">
          <view class="tit">
            <view class="name">{{item.storeName}}</view>
            <view class="distance">距您{{item.distance}}</view>
          </view>
          <view class="address">{{item.storeAddress}}</view>
        </view>
        <view bindtap="onShowLocHandler" data-data="{{item}}" class="loc">
          <image class="icon" mode="widthFix" src="../../image/oss/icon/icon-loc.png" />
          <view class="txt">导航</view>
        </view>
      </view>
      <view wx:if="{{addressList.length <= 0}}" class="empty">该区域无门店,换一个地方试试</view>
    </scroll-view>
    <!-- 按钮 -->
    <view wx:if="{{selectedMode}}" class="btn-wrap">
      <view wx:if="{{curAddress}}" bindtap="onSubmitHandler" class="store-btn">选择门店</view>
      <view wx:else class="store-btn disable">选择门店</view>
    </view>
  </view>
</view>