学员端小程序
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.

132 lines
3.0 KiB

1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="我的预约"></topNavbar>
  4. <view class="pad">
  5. <view class="searcBox">
  6. <searchRow placeholder="搜索考场名称、车牌号"/>
  7. </view>
  8. <view class="tabs">
  9. <view class="tab" v-for="(item,index) in tabList" :key="index" :class="{active: currentTab==item.id}" @click="changeTab(item)">{{ item.text }}</view>
  10. </view>
  11. <view class="navs">
  12. <view class="nav" v-for="(item,index) in navList" :key="index" :class="{active: currentNav==item.id}" @click="changeNav(item)">{{ item.text }}</view>
  13. </view>
  14. <view class="recordTotal">100条记录</view>
  15. <view class="tabCon" v-show="currentTab==1">
  16. <view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail')">
  17. <imitate></imitate>
  18. </view>
  19. </view>
  20. <view class="tabCon" v-if="currentTab==2">
  21. <view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail')">
  22. <opera></opera>
  23. </view>
  24. </view>
  25. <view class="tabCon" v-if="currentTab==3">
  26. <view class="card" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/mineEntry/myAppointment/detail/detail')">
  27. <examin></examin>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. </template>
  33. <script>
  34. import imitate from './comp/imitate'
  35. import opera from './comp/opera'
  36. import examin from './comp/examin'
  37. export default {
  38. components: { imitate, opera, examin},
  39. data() {
  40. return {
  41. tabList: [
  42. {text: '模拟器',id: 1},
  43. {text: '实操训练',id: 2},
  44. {text: '考场模拟',id: 3},
  45. ],
  46. navList: [
  47. {text: '全部', id: 0},
  48. {text: '已完成', id: 1},
  49. {text: '待完成', id: 2},
  50. {text: '已取消', id: 3},
  51. {text: '已过期', id: 4},
  52. ],
  53. currentTab: 1,
  54. currentNav: 0,
  55. }
  56. },
  57. methods: {
  58. changeTab(item) {
  59. this.currentTab = item.id
  60. },
  61. changeNav(item) {
  62. this.currentNav = item.id
  63. },
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .searcBox {
  69. margin: 0 0 20rpx 0;
  70. }
  71. .card {
  72. padding: 0 24rpx;
  73. margin-bottom: 20rpx;
  74. }
  75. .tabs {
  76. display: flex;
  77. width: 100%;
  78. height: 72rpx;
  79. background: #FFFFFF;
  80. border-radius: 16rpx;
  81. margin-top: 20rpx;
  82. .tab {
  83. flex: 1;
  84. text-align: center;
  85. line-height: 72rpx;
  86. color: #ADADAD;
  87. &.active {
  88. background: rgba(25,137,250,0.1);
  89. border-radius: 16rpx;
  90. border: 2rpx solid #1989FA;
  91. color: $themC;
  92. font-weight: 600;
  93. }
  94. }
  95. }
  96. .navs {
  97. display: flex;
  98. justify-content: space-between;
  99. color: #fff;
  100. font-size: 28rpx;
  101. padding: 24rpx 0 40rpx 0;
  102. color: $themC;
  103. .nav {
  104. &.active {
  105. font-weight: 500;
  106. position: relative;
  107. &::before {
  108. position: absolute;
  109. left: 50%;
  110. transform: translateX(-50%);
  111. bottom: -20rpx;
  112. content: '';
  113. width: 56rpx;
  114. height: 6rpx;
  115. background: $themC;
  116. border-radius: 3rpx;
  117. }
  118. }
  119. }
  120. }
  121. .recordTotal {
  122. font-size: 24rpx;
  123. padding: 0rpx 0 28rpx 0;
  124. text-align: right;
  125. }
  126. </style>