<!--pages/myAddress/myAddress.wxml-->
<view class="page-my-address">
  <view class="wx-address" bindtap="chooseWxAddress">
    <image class="wx-icon" src="/assets/imgs/7_1_0/wx-icon.png" mode="widthFix"></image>
    <text class="wx-text">使用微信地址</text>
    <image class="arrow-right" src="/assets/imgs/7_1_0/arrow-right.png"  mode="widthFix"></image>
  </view>
  <view class="address-wrap">
    <view class="address-ul">
      <view class="address-list" wx:for="{{addressList}}" wx:key="{{index}}" bindtouchstart="drawStart" bindtouchmove="drawMove" bindtouchend="drawEnd" style="right:{{item.right}}rpx" data-index="{{index}}">
        <view class="name">
          {{item.name}} {{item.phone}}
        </view>
        <view class="address-detail">{{item.fullArea}} {{item.address}}</view>
        <view class="default-address" bindtap="settingDefalutAddress" data-type="{{item.type}}" data-id="{{item.id}}">
          <view class="{{item.type == 1 ? 'theme-color' : ''}} circle-radio"  >
            <image wx:if="{{item.type == 1}}" class="tick-success" src="/assets/imgs/7_1_0/tick-success.png" mode="widthFix"></image>
          </view>
          <text class="setting-default">设为默认地址</text>
        </view>
        <navigator url="/pages/addAddress/addAddress?id={{item.id}}">
          <image class="edit-img" mode="widthFix" src="/assets/imgs/7_1_0/edit.png"></image>
        </navigator>
        <view class="delete" bindtap="deleteAddress" data-id="{{item.id}}">删除</view>
      </view>
    </view>
  </view>
  
  <view class="address-bottom">
    <navigator url="/pages/addAddress/addAddress">
      <button class="address-btn theme-color">新增收货地址</button>
    </navigator>
  </view>
</view>

<share-poster id="getPoster" bindmyevent="myEventListener" avater="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg" codeimg="http://i4.hexun.com/2018-07-05/193365388.jpg" productDesc="1111" userAvatar="http://t2.hddhhn.com/uploads/tu/201806/9999/91480c0c87.jpg"></share-poster>