推广小程序前端代码
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.

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