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

155 lines
3.8 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 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. <!-- <button class="mini-btn" size="mini" @click="travelList">旅行列表</button> -->
  14. <!-- <button class="mini-btn" size="mini" @click="activeList">活动列表</button> -->
  15. <cardList :cardListData="cardListData" @btnClick="btnClick" @toOrderDetails="toOrderDetails" />
  16. </view>
  17. <tabber select="cart" />
  18. </view>
  19. </template>
  20. <script>
  21. import tabber from '@/components/base/tabbar.vue'
  22. import cardList from '@/components/cart/CardList.vue'
  23. import Navbar from '@/pages/components/Navbar.vue'
  24. import {
  25. globalMixin
  26. } from '../mixins/globalMixin';
  27. export default {
  28. mixins: [globalMixin],
  29. components: {
  30. tabber,
  31. cardList,
  32. Navbar
  33. },
  34. data() {
  35. return {
  36. tabList: [{
  37. id: 0,
  38. name: '全部'
  39. },
  40. {
  41. id: 1,
  42. name: '待参加'
  43. },
  44. {
  45. id: 2,
  46. name: '已完成'
  47. },
  48. {
  49. id: 3,
  50. name: '已取消'
  51. },
  52. ],
  53. lineBg: require('@/static/image/cart/tabIcon.png'),
  54. cardListData: [{
  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. travelList() {
  116. uni.navigateTo({
  117. url: '/pages_my/travelList'
  118. })
  119. },
  120. activeList() {
  121. uni.navigateTo({
  122. url: '/pages_my/activeList'
  123. })
  124. },
  125. tabs(val) {
  126. console.log(val);
  127. },
  128. toOrderDetails(val) {
  129. uni.navigateTo({
  130. url: '/pages_order/orderDetails'
  131. })
  132. },
  133. btnClick({
  134. id
  135. }) { // 0取消活动 1活动签到 2活动评价 3开具发票
  136. console.log(id);
  137. if (id === '2') {
  138. uni.navigateTo({
  139. url: '/pages_order/orderEvaluation'
  140. })
  141. return;
  142. }
  143. if (id === '3') {
  144. uni.navigateTo({
  145. url: '/pages_order/invoiceIssuance'
  146. })
  147. return;
  148. }
  149. }
  150. }
  151. }
  152. </script>
  153. <style scoped lang="scss"></style>