addritem.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <wxs module="phoneReg">
  2. var toHide = function (array) {
  3. var mphone = array.substring(0, 3) + '****' + array.substring(7);
  4. return mphone;
  5. }
  6. module.exports.toHide = toHide;
  7. </wxs>
  8. <view class="address-item-wrapper item-wrapper-class">
  9. <t-swipe-cell class="swipe-out">
  10. <view class="address {{isDrawLine ? 'draw-line' : ''}}" bindtap="onSelect" data-item="{{address}}">
  11. <view class="address-left" wx:if="{{extraSpace}}">
  12. <t-icon wx:if="{{address.checked}}" name="check" color="#FA4126" size="46rpx" />
  13. </view>
  14. <view style="display: flex;align-items: center; flex: 1;">
  15. <view style="margin-right: 30rpx;" wx:if="{{!isManage}}">
  16. <t-icon name="location" size="40rpx" color="#333" />
  17. </view>
  18. <view class="address-content">
  19. <view class="title title-class">
  20. <text class="text-style">{{address.name}}</text>
  21. <text class="text-lighter">{{phoneReg.toHide(address.phone || '')}}</text>
  22. </view>
  23. <view class="label-adds">
  24. <text class="adds address-info-class">
  25. <text wx:if="{{address.isDefault}}" class="tag tag-default default-tag-class">默认</text>
  26. <text wx:if="{{address.addressTag}}" class="tag tag-primary normal-tag-class">{{address.addressTag}}</text>
  27. <text class="address-text">{{address.detailAddress}}</text>
  28. </text>
  29. </view>
  30. </view>
  31. </view>
  32. <view catch:tap="onEdit" data-item="{{address}}" class="address-edit" wx:if="{{isEdit}}">
  33. <t-icon name="{{customIcon}}" class-prefix="{{classPrefix}}" size="46rpx" color="#BBBBBB" />
  34. </view>
  35. </view>
  36. <view wx:if="{{isManage}}" slot="right" class="swipe-right-del delete-class" bindtap="onDelete" data-item="{{address}}">
  37. 删除
  38. </view>
  39. </t-swipe-cell>
  40. </view>