orders.wxml 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!--pages/orders/orders.wxml-->
  2. <view class="container">
  3. <navigation-bar title="我的订单"></navigation-bar>
  4. <view class="record-content">
  5. <view class="record-tab">
  6. <view wx:for="{{tabList}}" wx:key="id" class="{{item.id == tabIdx ? 'active' : ''}}" catch:tap="switchTab" data-idx="{{item.id}}">
  7. {{item.label}}
  8. </view>
  9. </view>
  10. <scroll-view class="record-list" type="list" scroll-y bindscrolltolower="loadMore">
  11. <block wx:if="{{ recordList.length }}">
  12. <view class="list-item-group">
  13. <view class="list-item" wx:for="{{recordList}}" wx:key="index" data-orderno="{{item.orderNo}}" data-wechatstatus="{{item.wechatStatus}}" bind:tap="onDetail">
  14. <view class="item-top">
  15. <text class="{{ item.wechatStatus == 'WAIT_PAY' || item.wechatStatus == 'WAIT_USE' || item.wechatStatus == 'REFUNDING' ? 'red' : item.wechatStatus === 'CLOSED' ? 'closed' : '' }}">{{ item.statusName }}</text>
  16. <view class="item-mid">{{ item.createTime }}</view>
  17. </view>
  18. <view class="item-content">
  19. <view class="imgCon">
  20. <image class='goods-icon' wx:for="{{item.studentPaymentOrderDetails}}" wx:key="studentIndex" src="{{item.goodsUrl}}" mode="" />
  21. </view>
  22. <view class="goods-desc">
  23. <view class="goodsInfo">
  24. <view class="goods-price">
  25. <text class="stuff">¥ </text>
  26. <numberDisplay number="{{ my.sumArray(item.studentPaymentOrderDetails, 'paymentCashAmount') }}" />
  27. </view>
  28. </view>
  29. <view class="goods-type">
  30. <view class="goods-num">共 {{ item.studentPaymentOrderDetails.length }} 件</view>
  31. </view>
  32. </view>
  33. </view>
  34. <view wx:if="{{ item.wechatStatus == 'WAIT_PAY' }}" class="item-footer">
  35. <view class="order-price">
  36. <!-- 订单金额:<text class="price-first">¥ </text><text class="price">{{item.amount}}</text> -->
  37. </view>
  38. <!-- <block wx:if="{{ item.wechatStatus == 'REFUNDING' || (item.wechatStatus == 'WAIT_USE' && tabIdx == 5) }}" wx:key="block">
  39. <button wx:if="{{ item.wechatStatus == 'REFUNDING' }}" type="primary" wx:if="{{ item.wechatStatus == 'REFUNDING' }}" catch:tap="onRefounded" data-id="{{item.id}}" disabled="{{ cancelRefoundStatus }}">取消退款</button>
  40. <button wx:else type="primary" catch:tap="onRefounded" data-id="{{item.id}}" disabled="{{ cancelRefoundStatus }}">申请退款</button>
  41. </block> -->
  42. <!-- <block wx:else wx:key="block"> -->
  43. <button class="sure" type="primary" catch:tap="onPay" data-id="{{item.id}}">继续支付</button>
  44. <!-- <button type="primary" wx:else catch:tap="onOne" data-id="{{item.id}}">再次购买</button> -->
  45. <!-- </block> -->
  46. </view>
  47. </view>
  48. </view>
  49. </block>
  50. <block wx:else>
  51. <view class="empty-box">
  52. <image src="https://oss.dayaedu.com/ktyq/1739278149891.png"></image>
  53. <view class="empty-text">暂无订单</view>
  54. </view>
  55. </block>
  56. </scroll-view>
  57. </view>
  58. <!-- 客服 -->
  59. <!-- <service wx:if="{{serviceShow}}"></service> -->
  60. <!-- 申请退款 -->
  61. <!-- <apply-refound refoundStatus="{{ refoundStatus }}" goodsInfo="{{goodsInfo}}" bind:changeRefoundStatus="changeRefoundStatus" bind:onConfirm="onRefoundComfirm"></apply-refound> -->
  62. </view>
  63. <wxs module="my">
  64. var sumArray = function (value, key) {
  65. return value.reduce(function(num, item){
  66. return item[key] + num
  67. }, 0)
  68. }
  69. module.exports = {
  70. sumArray: sumArray
  71. }
  72. </wxs>