推广小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
3.6 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="cart">
  3. <view class="head-box"></view>
  4. <Navbar title="我的订单" :bgColor="bgColor" leftIconSize="0px" height="100rpx" :titleStyle="{color:fontColor}" />
  5. <view class="content contentPosition_">
  6. <!-- <uv-sticky offsetTop="200rpx"> -->
  7. <uv-tabs :scrollable="false" @click="tabs" :list="tabList" lineWidth="40"
  8. :lineColor="`url(${lineBg}) 100% 100%`"
  9. :activeStyle="{color: '#FD5C5C', fontWeight: 'bold',transform: 'scale(1.05)'}"
  10. :inactiveStyle="{color: '#999', transform: 'scale(1)'}"
  11. itemStyle="padding-left: 15px; padding-right: 15px; height: 44px;"></uv-tabs>
  12. <!-- </uv-sticky> -->
  13. <cardList :cardListData="cardListData" @btnClick="btnClick" @toOrderDetails="toOrderDetails" />
  14. </view>
  15. <tabber select="cart" />
  16. </view>
  17. </template>
  18. <script>
  19. import tabber from '@/components/base/tabbar.vue'
  20. import cardList from '@/components/cart/CardList.vue'
  21. import Navbar from '@/pages/components/Navbar.vue'
  22. import {
  23. globalMixin
  24. } from '../mixins/globalMixin';
  25. export default {
  26. mixins: [globalMixin],
  27. components: {
  28. tabber,
  29. cardList,
  30. Navbar
  31. },
  32. data() {
  33. return {
  34. tabList: [{
  35. id: 0,
  36. name: '全部'
  37. },
  38. {
  39. id: 1,
  40. name: '待参加'
  41. },
  42. {
  43. id: 2,
  44. name: '已完成'
  45. },
  46. {
  47. id: 3,
  48. name: '已取消'
  49. },
  50. ],
  51. lineBg: require('@/static/image/cart/tabIcon.png'),
  52. cardListData: [{
  53. imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
  54. orderTime: '2024.08.23 12:00',
  55. state: 'U',
  56. stateText: '待参加',
  57. title: '夏日去撒野旅游计划~',
  58. time: '2024.10.28 10:00',
  59. address: '成都市东丽湖露营地32号',
  60. totalPrice: '298.00',
  61. btnObj: [{
  62. id: '0',
  63. btnTitle: '取消活动',
  64. color: '#AFAFAF',
  65. bgColor: '#34312E'
  66. },
  67. {
  68. id: '1',
  69. btnTitle: '活动签到',
  70. color: '#FF4546',
  71. bgColor: '#492623'
  72. }
  73. ]
  74. },
  75. {
  76. imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
  77. orderTime: '2024.08.23 12:00',
  78. state: 'S',
  79. stateText: '已完成',
  80. title: '夏日去撒野旅游计划~',
  81. time: '2024.10.28 10:00',
  82. address: '成都市东丽湖露营地32号',
  83. totalPrice: '298.00',
  84. btnObj: [{
  85. id: '2',
  86. btnTitle: '活动评价',
  87. color: '#FF4546',
  88. bgColor: '#492623'
  89. },
  90. {
  91. id: '3',
  92. btnTitle: '开具发票',
  93. color: '#FFB245',
  94. bgColor: '#49361D'
  95. }
  96. ]
  97. },
  98. {
  99. imgUrl: 'https://up.zhuoku.org/22/a4/60/50/fc3bd0b4e656911fccdde4383637c1cd.jpg',
  100. orderTime: '2024.08.23 12:00',
  101. state: 'F',
  102. stateText: '已完成',
  103. title: '夏日去撒野旅游计划~',
  104. time: '2024.10.28 10:00',
  105. address: '成都市东丽湖露营地32号',
  106. totalPrice: '298.00',
  107. btnObj: []
  108. }
  109. ]
  110. }
  111. },
  112. methods: {
  113. activeList() {
  114. uni.navigateTo({
  115. url: '/pages_my/activeList'
  116. })
  117. },
  118. tabs(val) {
  119. console.log(val);
  120. },
  121. toOrderDetails(val) {
  122. uni.navigateTo({
  123. url: '/pages_order/orderDetails'
  124. })
  125. },
  126. btnClick({
  127. id
  128. }) { // 0取消活动 1活动签到 2活动评价 3开具发票
  129. console.log(id);
  130. if (id === '2') {
  131. uni.navigateTo({
  132. url: '/pages_order/orderEvaluation'
  133. })
  134. return;
  135. }
  136. if (id === '3') {
  137. uni.navigateTo({
  138. url: '/pages_order/invoiceIssuance'
  139. })
  140. return;
  141. }
  142. }
  143. }
  144. }
  145. </script>
  146. <style scoped lang="scss"></style>