order.wxml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <view style="background: #f5f5f5; padding: 20rpx 0;">
  2. <view class="container">
  3. <!-- 搜索框 -->
  4. <view class="search-bar">
  5. <input class="search-input" placeholder="搜索订单号或商品名称" />
  6. <image class="search-icon" src="{{souimg}}" />
  7. </view>
  8. <!-- 分类 -->
  9. <view class="category-tabs">
  10. <view wx:for="{{categories}}" wx:key="type">
  11. <view class="category-tab {{item.type === categoriesindex ? 'active' : ''}}" bindtap="tabcategories" data-type="{{item.type}}">{{item.title}}</view>
  12. </view>
  13. </view>
  14. <!-- 列表 -->
  15. <scroll-view
  16. class="list_boxsss"
  17. scroll-y="true"
  18. bindscrolltolower="loadMore"
  19. lower-threshold="100"
  20. >
  21. <view class="order-list">
  22. <block wx:for="{{orders}}" wx:key="order_id">
  23. <view class="order-item" bindtap="goToGoodsList" data-type="{{index}}">
  24. <view class="order-status">
  25. <view class="{{ item.status === 1 ? 'dsh' : item.status === 0 ? 'dfk' : 'ywc' }}">{{item.status === 1 ? "待收货" : item.status === 0 ? "待付款" : "已完成"}}</view>
  26. <view>{{item.createdAt}}</view>
  27. </view>
  28. <view>订单号: {{item.order_id}}</view>
  29. <view class="order-detail">
  30. <image class="order-image" src="{{item.img}}" mode="aspectFill"></image>
  31. <view class="order-info">
  32. <view class="order-title">{{item.name}}</view>
  33. <view style="display: flex; justify-content: space-between;">
  34. <view class="order-description">简单描述</view>
  35. <view class="order-price">¥{{item.real_money}}</view>
  36. </view>
  37. <view class="order-description">数量: 购买数量这个到时候要看怎么获取</view>
  38. </view>
  39. </view>
  40. <view class="order-actions">
  41. <button class="order-action-btn1" bindtap="handleAction1" data-index="{{index}}">
  42. {{ item.status === 1 ? "查看详情" : item.status === 0 ? "取消订单" : "申请售后" }}
  43. </button>
  44. <button class="order-action-btn2" bindtap="handleAction2" data-index="{{index}}">
  45. {{ item.status === 1 ? "确认收货" : item.status === 0 ? "立即支付" : "再来一单" }}
  46. </button>
  47. </view>
  48. </view>
  49. </block>
  50. </view>
  51. <view wx:if="{{ isLoading }}" class="loading-text">加载中...</view>
  52. <view wx:elif="{{ !hasMore }}" class="no-more-text">没有更多了</view>
  53. </scroll-view>
  54. </view>
  55. </view>