微信小店联盟带货小程序

list.wxml 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <view class="container">
  2. <!-- 地址列表 -->
  3. <view class="address-list">
  4. <view class="address-item" wx:for="{{addressList}}" wx:key="id">
  5. <view class="address-info" bindtap="selectAddress" data-id="{{item.id}}">
  6. <view class="user-info">
  7. <text class="name">{{item.name}}</text>
  8. <text class="phone">{{item.phone}}</text>
  9. <text class="tag" wx:if="{{item.isDefault}}">默认</text>
  10. </view>
  11. <view class="address">{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
  12. </view>
  13. <view class="address-actions">
  14. <view class="action-item" bindtap="setDefault" data-id="{{item.id}}" wx:if="{{!item.isDefault}}">
  15. <text class="iconfont icon-default"></text>
  16. <text>设为默认</text>
  17. </view>
  18. <view class="action-item" bindtap="editAddress" data-id="{{item.id}}">
  19. <text class="iconfont icon-edit"></text>
  20. <text>编辑</text>
  21. </view>
  22. <view class="action-item" bindtap="deleteAddress" data-id="{{item.id}}">
  23. <text class="iconfont icon-delete"></text>
  24. <text>删除</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <!-- 空状态 -->
  30. <view class="empty" wx:if="{{addressList.length === 0}}">
  31. <image class="empty-icon" src="/static/images/empty-address.png"></image>
  32. <text>暂无收货地址</text>
  33. </view>
  34. <!-- 新增地址按钮 -->
  35. <view class="add-btn" bindtap="addAddress">
  36. <text class="iconfont icon-add"></text>
  37. <text>新增收货地址</text>
  38. </view>
  39. </view>