index.wxml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!--pages/address/index.wxml-->
  2. <view class="container">
  3. <navigation-bar title="收货地址"></navigation-bar>
  4. <scroll-view class="record-list" type="list" scroll-y>
  5. <view class="address-list">
  6. <view class="empty-box" wx:if="{{ addressList.length <= 0 }}">
  7. <image src="https://oss.dayaedu.com/ktyq/1739864764800.png"></image>
  8. <view class="empty-text">暂无收货地址</view>
  9. </view>
  10. <view wx:for="{{ addressList }}" wx:key="index" class="address-item" bind:tap="onSelectAddress" data-id="{{ item.id }}">
  11. <view class="item-users">
  12. <image src="./image/icon-checked.png" wx:if="{{ item.id === id }}" class="iconChecked"></image>
  13. <view class="item-user">
  14. <text class="username">{{ item.name }}</text>
  15. <text>{{ item.phoneNumber }}</text>
  16. </view>
  17. </view>
  18. <view class="detailAddress">
  19. {{ item.provinceName }}{{ item.cityName }}{{ item.regionName }}{{ item.detailAddress }}
  20. </view>
  21. <view class="item-btn-group">
  22. <button class="btn del-btn" catch:tap="onRemoveAddress" data-id="{{ item.id }}">删除</button>
  23. <button class="btn update-btn" catch:tap="onUpdateAddress" data-id="{{ item.id }}">修改</button>
  24. </view>
  25. </view>
  26. </view>
  27. </scroll-view>
  28. <view class="pop-btn-list">
  29. <button class="submit-btn" bind:tap="onShowAddress">添加新地址</button>
  30. </view>
  31. <van-popup round lock-scroll="{{true}}" z-index="{{102}}" show="{{showDialog}}">
  32. <view class="dialog-section">
  33. <!-- <view class="dialog-title">删除地址</view> -->
  34. <view class="dialog-content">确认删除该地址吗?</view>
  35. <view class="dialog-btn-group">
  36. <view class="btn" bind:tap="onDialogClose">取消</view>
  37. <view class="btn del-btn" bind:tap="onDialogConfirm">删除</view>
  38. </view>
  39. </view>
  40. </van-popup>
  41. </view>