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

136 lines
2.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
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="searchCon">
  6. <searchRow placeholder="搜索驾校、教练…"></searchRow>
  7. </view>
  8. <view class="navBox">
  9. <view class="tab" v-for="(item,index) in tabData" :key="index" :class="{active: currentTab==item.id}" @click="tabClick(item)">
  10. {{ item.text }}</view>
  11. <view class="screen" @click="$goPage('/pages/indexEntry/findShcool/screen/screen')">
  12. <view class="txt">筛选</view>
  13. <view class="screenIcon">
  14. <image src="../../../static/images/index/ic_shaixuan.png" mode=""></image>
  15. </view>
  16. </view>
  17. </view>
  18. <view class="ul">
  19. <view class="li" v-for="(item,index) in 10" :key="index" @click="goPage">
  20. <schoolItme/>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import schoolItme from './comp/schoolItem.vue'
  28. export default {
  29. components: { schoolItme },
  30. data() {
  31. return {
  32. currentTab: 0,
  33. tabData: [{
  34. text: '全部',
  35. id: 0
  36. },
  37. {
  38. text: '场地优先',
  39. id: 1
  40. },
  41. {
  42. text: '距离优先',
  43. id: 2
  44. },
  45. {
  46. text: '好评优先',
  47. id: 3
  48. },
  49. ]
  50. }
  51. },
  52. methods: {
  53. goPage() {
  54. console.log(this.$goPage)
  55. this.$goPage('/pages/indexEntry/findShcool/shcoolDetail/shcoolDetail')
  56. },
  57. tabClick(item) {
  58. this.currentTab = item.id
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss" scoped>
  64. .pageBgImg {
  65. width: 100%;
  66. min-height: 100vh;
  67. .searchCon {
  68. padding: 0 0 24rpx 0;
  69. }
  70. .navBox {
  71. display: flex;
  72. justify-content: space-between;
  73. padding-bottom: 48rpx;
  74. .tab {
  75. display: flex;
  76. font-size: 28rpx;
  77. color: #fff;
  78. &.active {
  79. position: relative;
  80. &::before {
  81. content: '';
  82. position: absolute;
  83. bottom: -14rpx;
  84. left: 50%;
  85. transform: translateX(-50%);
  86. width: 50rpx;
  87. height: 4rpx;
  88. background-color: #fff;
  89. border-radius: 0 0 2rpx 2rpx;
  90. }
  91. }
  92. }
  93. .screen {
  94. width: 150rpx;
  95. display: flex;
  96. justify-content: center;
  97. align-items: center;
  98. position: relative;
  99. &::before {
  100. content: '';
  101. position: absolute;
  102. left: 0;
  103. top: 10rpx;
  104. width: 1px;
  105. background: #fff;
  106. height: 26rpx;
  107. }
  108. .txt {
  109. font-size: 28rpx;
  110. color: #fff;
  111. margin-right: 10rpx;
  112. }
  113. .screenIcon {
  114. width: 32rpx;
  115. height: 32rpx;
  116. }
  117. }
  118. }
  119. .ul {
  120. width: 100%;
  121. .li {
  122. }
  123. }
  124. }
  125. </style>