order.wxml 2.7 KB

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