<!--pages/more/delivery_address/delivery_address.wxml-->
<scroll-view scroll-y style='height: calc(100vh - 100rpx)'>
  <view class='address-item rpx26 flex-row' hover-class="view-hover">
    <view style='margin-top: 30rpx;' class=''>
      <text class='iconfont icon-location rpx40'></text>
    </view>
    <view class='address-content'>
      <view class='address-name-phone'>
        <text class='name'>李锋</text>
        <text>13512345678</text>
      </view>
      <view class='address-location'>广东省深圳市龙华新区淘金地大厦E710</view>
      <view class='flex-row a-center j-between'>
        <view class='flex-row a-center' data-default_id = "1" bindtap='setDefaultAddress'>
          <text class='iconfont rpx40 {{default_id == 1 ? "icon-yixuanze" : "icon-weixuanze"}}'></text>
          <text class='set-default-text'>{{default_id == 1 ? "默认地址" : "设为默认地址"}}</text>
        </view>
        <view class='flex-row a-center '>
          <button class='rpx24 edit-delete-btn hui'  bindtap='editAddress'>编辑</button>
          <button class='rpx24 edit-delete-btn delecte-btn hui' bindtap='deleteAddress'>删除</button>
        </view>
      </view>
    </view>
  </view>
  <view class='address-item rpx26 flex-row' hover-class="view-hover">
    <view style='margin-top: 30rpx;' class=''>
      <text class='iconfont icon-location rpx40'></text>
    </view>
    <view class='address-content'>
      <view class='address-name-phone'>
        <text class='name'>李锋</text>
        <text>13512345678</text>
      </view>
      <view class='address-location'>广东省深圳市龙华新区淘金地大厦E710</view>
      <view class='flex-row a-center j-between'>
        <view class='flex-row a-center' data-default_id = "2" bindtap='setDefaultAddress'>
          <text class='iconfont rpx40 {{default_id == 2 ? "icon-yixuanze" : "icon-weixuanze"}}'></text>
          <text class='set-default-text'>{{default_id == 2 ? "默认地址" : "设为默认地址"}}</text>
        </view>
        <view class='flex-row a-center'>
          <button class='rpx24 edit-delete-btn hui' bindtap='editAddress'>编辑</button>
          <button class='rpx24 edit-delete-btn delecte-btn hui' bindtap='deleteAddress'>删除</button>
        </view>
      </view>
    </view>
  </view>
  <view class='address-item rpx26 flex-row' hover-class="view-hover">
    <view style='margin-top: 30rpx;' class=''>
      <text class='iconfont icon-location rpx40'></text>
    </view>
    <view class='address-content'>
      <view class='address-name-phone'>
        <text class='name'>李锋</text>
        <text>13512345678</text>
      </view>
      <view class='address-location'>广东省深圳市龙华新区淘金地大厦E710</view>
      <view class='flex-row a-center j-between'>
        <view class='flex-row a-center' data-default_id = "3" bindtap='setDefaultAddress'>
          <text class='iconfont rpx40 {{default_id == 3 ? "icon-yixuanze" : "icon-weixuanze"}}'></text>
          <text class='set-default-text'>{{default_id == 3 ? "默认地址" : "设为默认地址"}}</text>
        </view>
        <view class='flex-row a-center'>
          <button class='rpx24 edit-delete-btn hui' bindtap='editAddress'>编辑</button>
          <button class='rpx24 edit-delete-btn delecte-btn hui' bindtap='deleteAddress'>删除</button>
        </view>
      </view>
    </view>
  </view>
</scroll-view>
<button class='add-address-btn white rpx26 main-bg' hover-class="btn-hover" bindtap='addNewAddress'>+ 添加新地址</button>
