<!--pages/locationAdd/locationAdd.wxml-->
<view class=''>
  <view class="top-card-box">
    <view class="current-location">当前定位</view>
    <view class="location-box">
      <view class="location-address">
        <van-icon name="location" />
        <view class="address-text">{{address||'未授权定位'}}</view>
      </view>
      <view bindtap="getLocation" class="reset-location">
        <image style="width: 40rpx;height: 40rpx;margin-right: 10rpx;" src="/images/icon/location.png" mode="" />
        <view>重新定位</view>
      </view>
    </view>
  </view>
  <view class="content">
    <view class="address-card-box box">
      <view class="my-address">
        <view class="address-title">我的收货地址</view>
        <view class="address-edit" bindtap="editAddress" wx:if="{{addressList.length}}">管理</view>
      </view>
      <van-empty description="暂无地址" wx:if="{{!addressList.length}}" />
      <block wx:else>
        <view class="address-list-box" catchtap="setDefault" data-item="{{item}}" wx:for="{{addressList}}">
        <view class="address-check">
          <van-icon wx:if="{{item.commonAddr==1}}" name="success" color="#FF941A"/>
        </view>
        <view class="address-list">
          <view>{{item.address}}{{item.addressName}}{{item.addrDetail}}</view>
          <view>{{item.receiver}} {{item.mobile}}</view>
        </view>
      </view>
      </block>
    </view>

    <view class="shop-list ">
      <view class="near-shop box">
        <view class="desc">
          附近的门店
        </view>
        <view class="shop">
          海马购超市（红街店）
        </view>
        <view class="desc">
          以为您选择距离最近的可配送店
        </view>
      </view>
      <view class="box">
        <view class="shop">
          京东便利店（优品3店）
        </view>
      </view>
    </view>
  </view>
  <view class="add-address-btn" bindtap="onAddAddr">新建地址</view>
</view>