推拿小程序前端代码仓库
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
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 class="list-item" v-for="item in list" :data="item" :key="item.id" @done="getData"></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: 'queryOrderList',
  73. }
  74. },
  75. methods: {
  76. //点击tab栏
  77. clickTabs({ index }) {
  78. if (index == 0) {
  79. delete this.queryParams.status
  80. } else {
  81. this.queryParams.status = index - 1
  82. }
  83. this.getData()
  84. },
  85. //跳转订单详情页面
  86. toOrderDetail(id) {
  87. uni.navigateTo({
  88. url: '/pages_order/order/orderDetail?id=' + id
  89. })
  90. },
  91. }
  92. }
  93. </script>
  94. <style scoped lang="scss">
  95. .page {
  96. background-color: #F5F5F5;
  97. /deep/ .nav-bar__view {
  98. background-image: linear-gradient(#84A73F, #D8FF8F);
  99. }
  100. }
  101. .tabs {
  102. /deep/ .uv-tabs__wrapper__nav__line {
  103. bottom: 0;
  104. }
  105. }
  106. .list {
  107. padding: 16rpx 17rpx;
  108. &-item {
  109. display: block;
  110. & + & {
  111. margin-top: 20rpx;
  112. }
  113. }
  114. }
  115. </style>