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

  1. <template>
  2. <view class="pageBgImg">
  3. <topNavbar :title="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}">1</view>
  13. </view>
  14. <view class="line"></view>
  15. <view class="dian" @click="changeStep(3)">
  16. <view class="num" :class="{active: currentStep==3}">2</view>
  17. </view>
  18. <view class="line"></view>
  19. <view class="dian" @click="changeStep(4)">
  20. <view class="num" :class="{active: currentStep==4}">3</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: 2,
  47. subject: 2,
  48. title: '实操训练预约'
  49. }
  50. },
  51. onLoad(options) {
  52. this.subject = options.subject
  53. if(this.subject==2) {
  54. this.title = '实操训练科目二预约'
  55. this.currentStep = 2
  56. }else if(this.subject==3) {
  57. this.title = '实操训练科目三预约'
  58. this.currentStep = 2
  59. }
  60. },
  61. methods: {
  62. changeStep(num) {
  63. this.currentStep = num
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .top_row {
  70. width: 100%;
  71. padding-bottom: 36rpx;
  72. .step_row {
  73. display: flex;
  74. align-items: center;
  75. justify-content: space-between;
  76. width: 100%;
  77. padding: 0 32rpx;
  78. .dian {
  79. width: 180rpx;
  80. height: 100rpx;
  81. display: flex;
  82. align-items: center;
  83. justify-content: center;
  84. position: relative;
  85. // background: red;
  86. }
  87. .num {
  88. width: 46rpx;
  89. height: 46rpx;
  90. background: #D1E7FE;
  91. line-height: 46rpx;
  92. border-radius: 50%;
  93. text-align: center;
  94. color: $themC;
  95. font-size: 24rpx;
  96. position: absolute;
  97. z-index: 9;
  98. &.active {
  99. border:2rpx solid $themC;
  100. &::before {
  101. content: '';
  102. width: 66rpx;
  103. height: 66rpx;
  104. border-radius: 50%;
  105. position: absolute;
  106. z-index: -1;
  107. left: 50%;
  108. top: 50%;
  109. transform: translate(-50%,-50%);
  110. background: rgba(255,255,255,0.6);
  111. filter: blur(6rpx);
  112. }
  113. }
  114. }
  115. .line {
  116. width: 60rpx;
  117. height: 4rpx;
  118. background: rgba(255,255,255,0.4);
  119. }
  120. }
  121. .step_text {
  122. display: flex;
  123. .txt {
  124. flex: 1;
  125. text-align: center;
  126. font-size: 28rpx;
  127. color: #fff;
  128. text-align: center;
  129. }
  130. }
  131. }
  132. </style>