address.wxml 903 B

123456789101112131415161718192021
  1. <view class="container">
  2. <view class="address-list" wx:if="{{ addressList.length > 0 }}">
  3. <view class="item" wx:for="{{addressList}}" wx:key="id" bindtap="addressAddOrUpdate" data-address-id="{{item.id}}">
  4. <view class="l">
  5. <view class="name">{{item.name}}</view>
  6. <view class="default" wx:if="{{item.isDefault}}">默认</view>
  7. </view>
  8. <view class="c">
  9. <view class="mobile">{{item.tel}}</view>
  10. <view class="address">{{item.addressDetail}}</view>
  11. </view>
  12. <view class="r">
  13. <van-icon catchtap="deleteAddress" data-address-id="{{item.id}}" class="del" name="delete"/>
  14. </view>
  15. </view>
  16. </view>
  17. <view class="empty-view" wx:if="{{ addressList.length <= 0 }}">
  18. <text class="text">收货地址还没有~~~</text>
  19. </view>
  20. <view class="add-address" bindtap="addressAddOrUpdate" data-address-id="0">新建</view>
  21. </view>