index.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031
  1. <nav type="back" title="选择地址" background-color="{{activeColor?activeColor:'#00b26a'}}" front-color="{{titleColor?titleColor:'#ffffff'}}"></nav>
  2. <view class="containers">
  3. <view class='has-info' wx:if="{{addresses.length > 0}}">
  4. <view bindtap="{{type == 0?'goAddressDetail':'selectAddress'}}" class='info-item' data-address="{{item}}" data-addressid="{{item.id}}" wx:for="{{addresses}}" wx:key="id">
  5. <view class="selected" wx:if="{{type == 1}}">
  6. <image wx:if="{{item.id == nowAddress}}" class="img" src="https://file-cloud.fmode.cn/gou-red.png"></image>
  7. <image wx:else class="img" src="https://file-cloud.fmode.cn/gou-gray.png"></image>
  8. </view>
  9. <view class="info-wrap">
  10. <view class="addr">
  11. <view class="top">{{item.address}}</view>
  12. <view class="text">{{item.full_region}}</view>
  13. </view>
  14. <view class="name">
  15. <view class="text">{{item.name}} {{item.mobile}}</view>
  16. <view class="default" wx:if="{{item.is_default}}">默认</view>
  17. </view>
  18. </view>
  19. <view class="edit-wrap" data-addressid="{{item.id}}" catchtap='goAddressDetail'>
  20. <image class="img" src="https://file-cloud.fmode.cn/edit.png"></image>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="no-info" wx:else>
  25. <image src="https://file-cloud.fmode.cn/position-deny.png" class="img"></image>
  26. <view class="text">没有地址信息</view>
  27. </view>
  28. <view class="btn-wrap" bindtap="addAddress">
  29. <view class="btn" style="color: {{titleColor ? titleColor : ''}}; background: {{activeColor ? activeColor : ''}};">新增收货地址</view>
  30. </view>
  31. </view>