index.wxml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!--index.wxml-->
  2. <view class="wrap">
  3. <view class="address_list">
  4. <view class="address_item" wx:for="{{ dataList }}" wx:key="index">
  5. <view class="item_t">
  6. <view class="item_l" bind:tap="selecteAddress" data-item="{{ item }}">
  7. <view class="item_l_t">
  8. <text class="item_tag" wx:if="{{ item.is_default }}">默认</text>
  9. <text class="item_title">{{ item.area_address+item.address }}</text>
  10. </view>
  11. <view class="item_l_b">
  12. <text class="user_name">{{ item.name }}</text>
  13. <text class="user_phone">{{ item.phone }}</text>
  14. </view>
  15. </view>
  16. <view class="item_r">
  17. <image src="/statics/img/icon_edit.png" class="edit_icon" bind:tap="goAddressDetail" data-item="{{ item }}"></image>
  18. </view>
  19. </view>
  20. <!-- style="{{ item.is_default ? 'justify-content: space-between' : 'justify-content: flex-end' }}" -->
  21. <view class="item_b" style="justify-content: flex-end;">
  22. <!-- <van-checkbox value="{{ item.is_default ? true : false}}" wx:if="{{ item.is_default }}" checked-color="#FFD102" bind:tap="goAddressDetail" data-item="{{ item }}">默认地址</van-checkbox> -->
  23. <view bind:tap="doDeleteAddress" data-id="{{ item.id }}">删除</view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="btn_wrap">
  28. <view class="btn wechat" bind:tap="getAddressFromWechat">
  29. <van-icon name="wechat" size="26" color="#FFFFFF" />
  30. <view class="wenzi">微信导入</view>
  31. </view>
  32. <view class="btn" bind:tap="goAddressDetail">
  33. <van-icon name="plus" size="20" color="#333333" />
  34. <view class="wenzi">添加地址</view>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 确认地址 -->
  39. <van-overlay z-index="1" class-style="background: rgba(0,0,0,.3);" show="{{ showConfirmAdd }}">
  40. <view class="add_pop">
  41. <view class="add_pop_t">请确定您的收货信息</view>
  42. <view class="add_pop_nr">
  43. <view class="add_wenzi">{{ checkedAddress.area_address+checkedAddress.address }}</view>
  44. <view class="add_wenzi grey">{{ checkedAddress.name+' '+ checkedAddress.phone }}</view>
  45. </view>
  46. <view class="add_btns">
  47. <view class="btn cancel" bind:tap="cancelCheck">更换地址</view>
  48. <view class="btn" bind:tap="confirmCheck">确认无误</view>
  49. </view>
  50. </view>
  51. </van-overlay>
  52. <!-- 确认删除 -->
  53. <van-dialog class="custom_dialog" title="确定要删除该地址吗?" show="{{ showDelDialog }}" showCancelButton bind:cancel="onCloseDel" bind:confirm="onConfirmDel"></van-dialog>
  54. <!-- loading -->
  55. <!-- <van-overlay show="{{ loading }}" z-index="100">
  56. <van-loading custom-class="custom_loading" />
  57. </van-overlay> -->