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

126 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. </view>
  35. <tabber select="order" />
  36. </view>
  37. </template>
  38. <script>
  39. import orderCard from '@/components/order/orderCard.vue'
  40. import {
  41. mapGetters
  42. } from 'vuex'
  43. import mixinsList from '@/mixins/list.js'
  44. import mixinsOrder from '@/mixins/order.js'
  45. import tabber from '@/components/base/tabbar.vue'
  46. export default {
  47. mixins: [mixinsList, mixinsOrder],
  48. components: {
  49. orderCard,
  50. tabber,
  51. },
  52. computed: {},
  53. data() {
  54. return {
  55. tabs: [{
  56. name: '全部订单'
  57. },
  58. {
  59. name: '待付款'
  60. },
  61. {
  62. name: '待核销'
  63. },
  64. {
  65. name: '已完成'
  66. },
  67. {
  68. name: '已取消'
  69. },
  70. ],
  71. current: 0,
  72. mixinsListApi: 'getOrderPageList',
  73. }
  74. },
  75. onLoad(args) {
  76. this.current = args.type || 0
  77. this.clickTabs({
  78. index: this.current
  79. })
  80. },
  81. methods: {
  82. //点击tab栏
  83. clickTabs({
  84. index
  85. }) {
  86. if (index == 0) {
  87. delete this.queryParams.state
  88. } else {
  89. this.queryParams.state = index - 1
  90. }
  91. this.getData()
  92. },
  93. //跳转订单详情页面
  94. toOrderDetail(id) {
  95. uni.navigateTo({
  96. url: '/pages_order/order/orderDetail?id=' + id
  97. })
  98. },
  99. }
  100. }
  101. </script>
  102. <style scoped lang="scss">
  103. .page {
  104. background-color: #F5F5F5;
  105. /deep/ .nav-bar__view {
  106. background-image: linear-gradient(#84A73F, #D8FF8F);
  107. }
  108. }
  109. .tabs {
  110. /deep/ .uv-tabs__wrapper__nav__line {
  111. bottom: 0;
  112. }
  113. }
  114. .list {
  115. padding: 16rpx 17rpx;
  116. }
  117. </style>