微信小店联盟带货小程序

order.wxml 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <!--pages/distribution/order.wxml-->
  2. <view class="container">
  3. <!-- 状态切换标签 -->
  4. <view class="tabs">
  5. <view class="tab {{currentTab === 'all' ? 'active' : ''}}" bindtap="switchTab" data-tab="all">全部</view>
  6. <view class="tab {{currentTab === 'pending' ? 'active' : ''}}" bindtap="switchTab" data-tab="pending">待付款</view>
  7. <view class="tab {{currentTab === 'paid' ? 'active' : ''}}" bindtap="switchTab" data-tab="paid">已付款</view>
  8. <view class="tab {{currentTab === 'completed' ? 'active' : ''}}" bindtap="switchTab" data-tab="completed">已完成</view>
  9. </view>
  10. <!-- 订单列表 -->
  11. <scroll-view scroll-y="true" class="order-list" bindscrolltolower="loadMore">
  12. <view class="order-item" wx:for="{{orders}}" wx:key="id">
  13. <view class="order-header">
  14. <text class="order-time">{{item.createTime}}</text>
  15. <text class="order-status {{item.status === 'completed' ? 'completed' : ''}}">{{item.statusText}}</text>
  16. </view>
  17. <view class="goods-info">
  18. <image class="goods-image" src="{{item.goodsImage}}" mode="aspectFill"></image>
  19. <view class="goods-detail">
  20. <view class="goods-name text-overflow">{{item.goodsName}}</view>
  21. <view class="goods-price">
  22. <text class="price">¥{{item.price}}</text>
  23. <text class="quantity">x{{item.quantity}}</text>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="order-footer">
  28. <view class="commission-info">
  29. <text class="label">预计佣金</text>
  30. <text class="amount">¥{{item.commission}}</text>
  31. </view>
  32. <view class="total-info">
  33. <text class="label">订单金额</text>
  34. <text class="amount">¥{{item.totalAmount}}</text>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 加载更多 -->
  39. <view class="loading" wx:if="{{loading}}">
  40. <text class="loading-text">加载中...</text>
  41. </view>
  42. <!-- 无数据提示 -->
  43. <view class="empty" wx:if="{{orders.length === 0}}">
  44. <image class="empty-icon" src="/static/images/empty-order.png" mode="aspectFit"></image>
  45. <text class="empty-text">暂无订单数据</text>
  46. </view>
  47. </scroll-view>
  48. </view>