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

128 lines
2.3 KiB

3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
  1. <template>
  2. <view class="page">
  3. <!-- 导航栏 -->
  4. <navbar title="订单" leftClick @leftClick="$utils.navigateBack" color="#fff" />
  5. <!-- 订单筛选 -->
  6. <view class="tabs">
  7. <uv-tabs :list="tabs"
  8. :customStyle="{
  9. backgroundColor: '#FFFFFF',
  10. }"
  11. :activeStyle="{
  12. color: '#84A73F',
  13. fontSize: '28rpx',
  14. whiteSpace: 'nowrap',
  15. paddingTop: '29rpx',
  16. paddingBottom: '21rpx',
  17. }"
  18. :inactiveStyle="{
  19. color: '#000000',
  20. fontSize: '28rpx',
  21. whiteSpace: 'nowrap',
  22. paddingTop: '29rpx',
  23. paddingBottom: '21rpx',
  24. }"
  25. lineHeight="8rpx"
  26. lineWidth="92rpx"
  27. lineColor="linear-gradient(to right, #84A73F, #D8FF8F)"
  28. :scrollable="false"
  29. :current="current"
  30. @click="clickTabs"></uv-tabs>
  31. </view>
  32. <view class="list">
  33. <orderCard v-for="item in list" :data="item" :key="item.id"></orderCard>
  34. <!-- todo: delete -->
  35. <orderCard></orderCard>
  36. </view>
  37. <tabber select="order" />
  38. </view>
  39. </template>
  40. <script>
  41. import orderCard from '@/components/order/orderCard.vue'
  42. import {
  43. mapGetters
  44. } from 'vuex'
  45. import mixinsList from '@/mixins/list.js'
  46. import mixinsOrder from '@/mixins/order.js'
  47. import tabber from '@/components/base/tabbar.vue'
  48. export default {
  49. mixins: [mixinsList, mixinsOrder],
  50. components: {
  51. orderCard,
  52. tabber,
  53. },
  54. computed: {},
  55. data() {
  56. return {
  57. tabs: [{
  58. name: '全部订单'
  59. },
  60. {
  61. name: '待付款'
  62. },
  63. {
  64. name: '待核销'
  65. },
  66. {
  67. name: '已完成'
  68. },
  69. {
  70. name: '已取消'
  71. },
  72. ],
  73. current: 0,
  74. mixinsListApi: 'getOrderPageList',
  75. }
  76. },
  77. onLoad(args) {
  78. this.current = args.type || 0
  79. this.clickTabs({
  80. index: this.current
  81. })
  82. },
  83. methods: {
  84. //点击tab栏
  85. clickTabs({
  86. index
  87. }) {
  88. if (index == 0) {
  89. delete this.queryParams.state
  90. } else {
  91. this.queryParams.state = index - 1
  92. }
  93. this.getData()
  94. },
  95. //跳转订单详情页面
  96. toOrderDetail(id) {
  97. uni.navigateTo({
  98. url: '/pages_order/order/orderDetail?id=' + id
  99. })
  100. },
  101. }
  102. }
  103. </script>
  104. <style scoped lang="scss">
  105. .page {
  106. background-color: #F5F5F5;
  107. /deep/ .nav-bar__view {
  108. background-image: linear-gradient(#84A73F, #D8FF8F);
  109. }
  110. }
  111. .tabs {
  112. /deep/ .uv-tabs__wrapper__nav__line {
  113. bottom: 0;
  114. }
  115. }
  116. .list {
  117. padding: 16rpx 17rpx;
  118. }
  119. </style>