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

124 lines
2.8 KiB

  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="实操训练预约"></topNavbar>
  4. <view class="pad">
  5. <view class="top_row">
  6. <view class="step_row">
  7. <view class="dian" @click="changeStep(1)">
  8. <view class="num" :class="{active: currentStep==1}">1</view>
  9. </view>
  10. <view class="line"></view>
  11. <view class="dian" @click="changeStep(2)">
  12. <view class="num" :class="{active: currentStep==2}">2</view>
  13. </view>
  14. <view class="line"></view>
  15. <view class="dian" @click="changeStep(3)">
  16. <view class="num" :class="{active: currentStep==3}">3</view>
  17. </view>
  18. <view class="line"></view>
  19. <view class="dian" @click="changeStep(4)">
  20. <view class="num" :class="{active: currentStep==4}">4</view>
  21. </view>
  22. </view>
  23. <view class="step_text">
  24. <view class="txt">选择科目</view>
  25. <view class="txt">选择场地</view>
  26. <view class="txt">选择车辆</view>
  27. <view class="txt">预约时间</view>
  28. </view>
  29. </view>
  30. <step1 v-if="currentStep==1" @changeStep="changeStep"></step1>
  31. <step2 v-if="currentStep==2" @changeStep="changeStep"></step2>
  32. <step3 v-if="currentStep==3" @changeStep="changeStep"></step3>
  33. <step4 v-if="currentStep==4" @changeStep="changeStep"></step4>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. import step1 from './comp/step1'
  39. import step2 from './comp/step2'
  40. import step3 from './comp/step3'
  41. import step4 from './comp/step4'
  42. export default {
  43. components: { step1, step2, step3, step4 },
  44. data() {
  45. return {
  46. currentStep: 1
  47. }
  48. },
  49. methods: {
  50. changeStep(num) {
  51. this.currentStep = num
  52. }
  53. }
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .top_row {
  58. width: 100%;
  59. padding-bottom: 36rpx;
  60. .step_row {
  61. display: flex;
  62. align-items: center;
  63. justify-content: space-between;
  64. width: 100%;
  65. padding: 0 32rpx;
  66. .dian {
  67. width: 180rpx;
  68. height: 100rpx;
  69. display: flex;
  70. align-items: center;
  71. justify-content: center;
  72. position: relative;
  73. // background: red;
  74. }
  75. .num {
  76. width: 46rpx;
  77. height: 46rpx;
  78. background: #D1E7FE;
  79. line-height: 46rpx;
  80. border-radius: 50%;
  81. text-align: center;
  82. color: $themC;
  83. font-size: 24rpx;
  84. position: absolute;
  85. z-index: 9;
  86. &.active {
  87. border:2rpx solid $themC;
  88. &::before {
  89. content: '';
  90. width: 66rpx;
  91. height: 66rpx;
  92. border-radius: 50%;
  93. position: absolute;
  94. z-index: -1;
  95. left: 50%;
  96. top: 50%;
  97. transform: translate(-50%,-50%);
  98. background: rgba(255,255,255,0.6);
  99. filter: blur(6rpx);
  100. }
  101. }
  102. }
  103. .line {
  104. width: 60rpx;
  105. height: 4rpx;
  106. background: rgba(255,255,255,0.4);
  107. }
  108. }
  109. .step_text {
  110. display: flex;
  111. .txt {
  112. flex: 1;
  113. text-align: center;
  114. font-size: 28rpx;
  115. color: #fff;
  116. text-align: center;
  117. }
  118. }
  119. }
  120. </style>