index.wxml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <view class="p-3 search">
  2. <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" value="{{searchText}}" placeholder="搜索我的订单" leftIcon="" center bind:change="onSearchChange" bind:submit="onSearchSubmit">
  3. <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" />
  4. </t-search>
  5. </view>
  6. <t-tabs t-class="pink" default-value="{{0}}" space-evenly="{{true}}" sticky stickyProps="{{stickyProps}}" bind:change="onTabsChange" bind:click="onTabsClick" bind:scroll="onStickyScroll">
  7. <t-tab-panel label="全部" value="0" />
  8. <t-tab-panel label="待付款" value="1" />
  9. <t-tab-panel label="待发货" value="2" />
  10. <t-tab-panel label="待收货" value="3" />
  11. <t-tab-panel label="已完成" value="4" />
  12. </t-tabs>
  13. <view>
  14. <block wx:for="{{orders}}" wx:key="index">
  15. <template is="ordertpl" data="{{item, index}}" />
  16. </block>
  17. <n-load-more wx:if="{{orders && orders.length > 0}}" status="{{loadMoreStatus}}" no-more-text="没有更多了" />
  18. <t-back-top theme="round"></t-back-top>
  19. </view>
  20. <t-dialog visible="{{showConfirm}}" t-class-confirm="text-black" title="操作确认" content="是否将订单商品重新加入购物车?" confirm-btn="确认" cancel-btn="取消" bind:confirm="confirmDialog" bind:cancel="closeDialog" />
  21. <template name="ordertpl">
  22. <view wx:key="{{index}}" class="order-card text-sm">
  23. <view class="order-card__head text-xs pb-2">
  24. <view>订单编号:</view>
  25. <view>{{item.orderCode}}</view>
  26. <t-icon name="chevron-right" />
  27. <view class="flex-1 text-right text-md">
  28. {{item.orderStatus}}
  29. </view>
  30. </view>
  31. <view class="order-card__items" data-code="{{item.orderCode}}" catchtap="gotoDetail">
  32. <block wx:for="{{item.items}}" wx:for-item="good" wx:for-index="goodidx" wx:key="goodidx">
  33. <template is="goodtpl" data="{{good}}" />
  34. </block>
  35. </view>
  36. <view class="order-card__foot pt-2 ">
  37. <view class="d-flex align-items-center">
  38. <view class="flex-1">共{{item.itemCount}}件商品</view>
  39. <view>合计:</view>
  40. <n-price price="{{item.totalPrice || 0 }}" fill="{{true}}" wr-class="text-bold text-md" symbol-class="popup-sku__price-symbol" />
  41. </view>
  42. <view class="d-flex align-items-center text-xs" style="color: #888">
  43. <view class="flex-1 text-right">(含运费:</view>
  44. <n-price price="{{item.tracePrice || 0 }}" fill="{{true}}" wr-class="" symbol-class="popup-sku__price-symbol" />
  45. <view>)</view>
  46. </view>
  47. <view class="d-flex justify-content-end mt-3 pb-1" style="gap: 30rpx;">
  48. <!-- <t-button t-class="order-card__button">评价</t-button> -->
  49. <t-button t-class="order-card__button pink" data-code="{{item.orderCode}}" catchtap="onRebuy">再次购买</t-button>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <template name="goodtpl">
  55. <view class="d-flex" style="gap: 20rpx;">
  56. <t-image src="{{good.imageUrl}}" t-class="goodimage" />
  57. <view class="flex-1">
  58. <view>{{good.goodTitle}}</view>
  59. <view class="text-xs pt-1" style="color: #888;">{{good.goodSpuTitle}}</view>
  60. </view>
  61. <n-price price="{{good.perPrice || 0 }}" wr-class="" symbol-class="popup-sku__price-symbol" />
  62. </view>
  63. </template>