order.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view>
  3. <!-- tab -->
  4. <view class="tab-box ddflex">
  5. <view class="fflex ddflex">
  6. <view :class="'tab-item fflex '+(queryType==1?'tab-item-active':'')" @click="queryTypeChange(1)">
  7. <view>待确认</view>
  8. <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
  9. </view>
  10. <view :class="'tab-item fflex '+(queryType==2?'tab-item-active':'')" @click="queryTypeChange(2)">
  11. <view>已完成</view>
  12. <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
  13. </view>
  14. <view :class="'tab-item fflex '+(queryType==3?'tab-item-active':'')" @click="queryTypeChange(3)">
  15. <view>全部</view>
  16. <image class="tab-active-icon" src="../../static/images/tab_cur.png"></image>
  17. </view>
  18. </view>
  19. <view class="ddflex">
  20. <image class="saoma" src="../../static/pages/images/saoma.png"></image>
  21. <image class="sousuo" src="../../static/pages/images/search.png"></image>
  22. </view>
  23. </view>
  24. <view style="height: 110rpx;"></view>
  25. <!-- 订单 -->
  26. <view>
  27. <view class="order-item" v-for="item,index in 10" @click="jumpUrl('/pages/orderDetail/orderDetail?id='+item)">
  28. <view class="ddflex order-item-header">
  29. <view class="order-time">2023-03-29 12:05:58</view>
  30. <block>
  31. <view v-if="index!=1" class="order-state">线下-待确认</view>
  32. <view v-else class="order-state" style="color: #0FCB27;">微信-支付成功</view>
  33. </block>
  34. </view>
  35. <view class="order-item-body">
  36. <view class="order-item-content ddflex">
  37. <view class="order-item-content-label">订单编号</view>
  38. <view class="order-item-content-data fflex tover">159582346324325171424</view>
  39. </view>
  40. <view class="order-item-content ddflex">
  41. <view class="order-item-content-label">门店名称</view>
  42. <view class="order-item-content-data fflex tover">白云科技</view>
  43. </view>
  44. <view class="order-item-content ddflex">
  45. <view class="order-item-content-label">租借机柜</view>
  46. <view class="order-item-content-data fflex tover">CHZD04TTCC200329109</view>
  47. </view>
  48. <view class="order-item-content ddflex">
  49. <view class="order-item-content-label">电池ID</view>
  50. <view class="order-item-content-data fflex tover">613880983244</view>
  51. </view>
  52. <view class="order-item-content ddflex">
  53. <view class="order-item-content-label">电池型号</view>
  54. <view class="order-item-content-data fflex tover">60V 30Ah</view>
  55. </view>
  56. <view class="order-item-content ddflex">
  57. <view class="order-item-content-label">租赁用户</view>
  58. <view class="order-item-content-data fflex tover">文涛 15200809658</view>
  59. </view>
  60. <view class="order-item-content ddflex">
  61. <view class="order-item-content-label">租借时长</view>
  62. <view class="order-item-content-data fflex tover">8小时</view>
  63. </view>
  64. <view class="order-item-content ddflex">
  65. <view class="order-item-content-label">应付金额</view>
  66. <view class="order-item-content-data fflex tover" style="color: #EB5C20;">3元</view>
  67. </view>
  68. </view>
  69. <view v-if="index!=1" class="order-btns ddflex">
  70. <view class="order-btn" @click.stop="">确认支付</view>
  71. </view>
  72. </view>
  73. </view>
  74. <foot channel="order" :isUpdate="isUpdate"></foot>
  75. </view>
  76. </template>
  77. <script>
  78. const app = getApp();
  79. const req = require("../../utils/request.js");
  80. import foot from "../../components/nav-bar/index";
  81. export default {
  82. components: {
  83. foot
  84. },
  85. props: {},
  86. data() {
  87. return {
  88. systems: {},
  89. isTop: 0,
  90. queryType: 1,
  91. }
  92. },
  93. onLoad(options) {
  94. },
  95. onShow() {
  96. },
  97. methods: {
  98. jumpUrl(url) {
  99. if (req.isLogins(true)) {
  100. uni.navigateTo({
  101. url: url
  102. })
  103. }
  104. },
  105. queryTypeChange(val) {
  106. if (this.queryType == val) return false
  107. this.queryType = val
  108. },
  109. },
  110. mounted() {
  111. const systemInfo = uni.getSystemInfoSync();
  112. // px转换到rpx的比例
  113. let pxToRpxScale = 750 / systemInfo.windowWidth;
  114. let systems = {
  115. ktxStatusHeight: systemInfo.statusBarHeight * pxToRpxScale, // 状态栏的高度
  116. navigationHeight: 44 * pxToRpxScale // 导航栏的高度
  117. };
  118. systems.barHeight = systems.ktxStatusHeight + systems.navigationHeight;
  119. this.systems = systems;
  120. },
  121. onPageScroll: function(e) {
  122. if (e.scrollTop > this.systems.barHeight) {
  123. this.isTop = 1;
  124. } else {
  125. this.isTop = 0;
  126. }
  127. }
  128. }
  129. </script>
  130. <style>
  131. @import "./order.css";
  132. </style>