您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!-- 订单列表2 -->
  2. <template>
  3. <filter>
  4. <empty-view v-if="!data.login" mode="permission" content="请先登录再查看订单" btnTxt="立即登录"
  5. @btnClick="$util.navTo('/login/login')">
  6. </empty-view>
  7. <view class="list-wrapper" v-else>
  8. <view class="top-content">
  9. <view class="top-menu">
  10. <view :class="item == state.tabActive ? 'tab active' : 'tab'" v-for="item in state.flowPathTabList"
  11. :key="item" @click="flowPathTabHandle(item)">
  12. <view class="border"></view>{{ item }}
  13. </view>
  14. </view>
  15. <order-tabbar ref="tabbarRef" :tabs="data.tabsList" v-model:curIndex="data.tabIndex"
  16. v-if="data.tabsList.length > 0"></order-tabbar>
  17. </view>
  18. <order-list-item ref="mescrollItem" :index="data.tabIndex" :refresh="data.refresh">
  19. </order-list-item>
  20. </view>
  21. </filter>
  22. </template>
  23. <script setup lang="ts">
  24. import orderTabbar from "./components/order-tabbar.vue";
  25. import orderListItem from "./components/order-list-item";
  26. import useOrderList from "@/composables/order/useOrderList";
  27. import filter from '@/components/filter/filter.vue';
  28. import { onLoad } from "@dcloudio/uni-app";
  29. import {
  30. reactive
  31. } from "vue";
  32. const {
  33. data,
  34. tabbarRef
  35. } = useOrderList();
  36. const state = reactive({
  37. tabActive: "小程序",
  38. flowPathTabList: ["小程序", "线下网点"],
  39. })
  40. onLoad((option) => {
  41. // console.log("option",option)
  42. // data.tabIndex=option.index
  43. })
  44. const flowPathTabHandle = (tab) => {
  45. state.tabActive = tab;
  46. };
  47. </script>
  48. <style lang="scss">
  49. page {
  50. background: #eef7f7;
  51. }
  52. :deep(.u-mode-center-box) {
  53. border-radius: 20rpx;
  54. }
  55. </style>
  56. <style lang="scss" scoped>
  57. .top-content {
  58. position: fixed;
  59. left: 0;
  60. z-index: 99999;
  61. background-color: white;
  62. }
  63. .top-menu {
  64. display: flex;
  65. justify-content: space-around;
  66. }
  67. .top-menu .tab {
  68. font-size: 28rpx;
  69. padding: 30rpx 30rpx;
  70. color: #666666;
  71. position: relative;
  72. }
  73. .top-menu .active .border {
  74. position: absolute;
  75. width: 70%;
  76. height: 16rpx;
  77. background: #00b38b;
  78. opacity: 0.3;
  79. bottom: 28rpx;
  80. z-index: -99;
  81. left: 15%;
  82. border-radius: 6rpx;
  83. }
  84. .top-menu .active {
  85. font-weight: bold;
  86. font-size: 32rpx;
  87. color: #0d0f26;
  88. }
  89. .top-menu .active::before {
  90. width: 100%;
  91. height: 16rpx;
  92. background: #00b38b;
  93. opacity: 0.3;
  94. }
  95. </style>