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

128 lines
2.9 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>
  19. <view class="step_text">
  20. <view class="txt">选择模拟驾驶馆</view>
  21. <view class="txt">预约时间</view>
  22. <view class="txt">选择模拟器</view>
  23. </view>
  24. </view>
  25. <step1 v-if="currentStep==1" @changeStep="changeStep"></step1>
  26. <step2 v-if="currentStep==2" @changeStep="changeStep"></step2>
  27. <step3 v-if="currentStep==3" @changeStep="changeStep"></step3>
  28. </view>
  29. </view>
  30. </template>
  31. <script>
  32. import step1 from './comp/step1'
  33. import step2 from './comp/step2'
  34. import step3 from './comp/step3'
  35. import { simulationDevices, simulationPoint } from '@/config/api.js'
  36. export default {
  37. components: { step1, step2, step3 },
  38. data() {
  39. return {
  40. currentStep: 1
  41. }
  42. },
  43. created() {
  44. this.simulationPointFn()
  45. },
  46. methods: {
  47. changeStep(num) {
  48. this.currentStep = num
  49. },
  50. // 模拟点
  51. async simulationPointFn() {
  52. const {data: res} = await simulationPoint({schoolId: this.vuex_userInfo.schoolId,lat: this.vuex_cityInfo.lat,lng: this.vuex_cityInfo.lng})
  53. },
  54. async simulationDevicesFn() {
  55. const {data: res} = await simulationDevices()
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss" scoped>
  61. .top_row {
  62. width: 100%;
  63. padding-bottom: 36rpx;
  64. .step_row {
  65. display: flex;
  66. align-items: center;
  67. justify-content: space-between;
  68. width: 100%;
  69. padding: 0 32rpx;
  70. .dian {
  71. width: 180rpx;
  72. height: 100rpx;
  73. display: flex;
  74. align-items: center;
  75. justify-content: center;
  76. position: relative;
  77. // background: red;
  78. }
  79. .num {
  80. width: 46rpx;
  81. height: 46rpx;
  82. background: #D1E7FE;
  83. line-height: 46rpx;
  84. border-radius: 50%;
  85. text-align: center;
  86. color: $themC;
  87. font-size: 24rpx;
  88. position: absolute;
  89. z-index: 9;
  90. &.active {
  91. border:2rpx solid $themC;
  92. &::before {
  93. content: '';
  94. width: 66rpx;
  95. height: 66rpx;
  96. border-radius: 50%;
  97. position: absolute;
  98. z-index: -1;
  99. left: 50%;
  100. top: 50%;
  101. transform: translate(-50%,-50%);
  102. background: rgba(255,255,255,0.6);
  103. filter: blur(6rpx);
  104. }
  105. }
  106. }
  107. .line {
  108. width: 60rpx;
  109. height: 4rpx;
  110. background: rgba(255,255,255,0.4);
  111. }
  112. }
  113. .step_text {
  114. display: flex;
  115. .txt {
  116. flex: 1;
  117. text-align: center;
  118. font-size: 28rpx;
  119. color: #fff;
  120. text-align: center;
  121. }
  122. }
  123. }
  124. </style>