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

187 lines
3.9 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 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 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="step1">
  3. <pickDateTimer :FormData="FormData"/>
  4. <view class="btn_row">
  5. <view class="border btn" @click="changeStep(2)">返回上一步</view>
  6. <view class="btn" @click="show=true">确认预约</view>
  7. </view>
  8. <u-popup :show="show" mode="center" :round="8">
  9. <view class="popupCon">
  10. <view class="h2">再次确认预约信息</view>
  11. <view class="content">
  12. <view class="row">
  13. <view class="lab">预约类型</view>
  14. <view class="val">考场模拟训练预约</view>
  15. </view>
  16. <view class="row">
  17. <view class="lab">预约科目</view>
  18. <view class="val">{{ FormData.subject==2?'科目二':'科目三'}}</view>
  19. </view>
  20. <view class="row">
  21. <view class="lab">预约考场</view>
  22. <view class="val">{{ FormData.classDate }}</view>
  23. </view>
  24. <view class="row">
  25. <view class="lab">预约车型</view>
  26. <view class="val">{{FormData.trainType }}</view>
  27. </view>
  28. <view class="row">
  29. <view class="lab">预约车辆</view>
  30. <view class="val">{{ FormData.licnum }}</view>
  31. </view>
  32. <view class="row">
  33. <view class="lab">预约时间</view>
  34. <view class="val">{{ FormData.classDate }} {{FormData.classTime}}</view>
  35. </view>
  36. </view>
  37. <view class="btn_row">
  38. <view class="border btn" @click="show = false">返回修改</view>
  39. <view class="btn" @click="examSimulationCreateFn">确认</view>
  40. </view>
  41. </view>
  42. </u-popup>
  43. </view>
  44. </template>
  45. <script>
  46. import pickDateTimer from './pickDate'
  47. import { examSimulationCreate } from '@/config/api.js'
  48. export default {
  49. components: {pickDateTimer},
  50. props: ['step','FormData'],
  51. data() {
  52. return {
  53. show: false
  54. }
  55. },
  56. methods: {
  57. changeStep(val) {
  58. this.$emit('changeStep', val)
  59. },
  60. async examSimulationCreateFn() {
  61. if(!this.FormData.courseIds) return this.$u.toast('请选择预约时间')
  62. let obj = {
  63. "studentId": this.studentId,
  64. "classDetailId": this.FormData.courseIds
  65. }
  66. const res = await examSimulationCreate(obj)
  67. if(res.code==0) {
  68. this.show = false
  69. this.$u.toast('预约成功')
  70. setTimeout(()=>{
  71. this.$goPage('/pages/mineEntry/myAppointment/myAppointment?currentTab=3')
  72. },1500)
  73. }
  74. console.log(res)
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .card {
  81. width: 100%;
  82. overflow: hidden;
  83. .dateBox {
  84. padding: 36rpx 0 40rpx 0;
  85. .month-row {
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. margin-bottom: 36rpx;
  90. .month {
  91. font-size: 32rpx;
  92. color: $themC;
  93. }
  94. .arrow {
  95. margin-left: 6rpx;
  96. }
  97. }
  98. .date_row {
  99. width: 100%;
  100. height: 100rpx;
  101. position: relative;
  102. .icon {
  103. width: 40rpx;
  104. height: 40rpx;
  105. background: rgba(51,51,51,0.18);
  106. backdrop-filter: blur(4rpx);
  107. position: absolute;
  108. top: 50%;
  109. transform: translateY(-50%);
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. border-radius: 50%;
  114. &.left {
  115. left: 16rpx;
  116. }
  117. &.right {
  118. right: 16rpx;
  119. }
  120. }
  121. }
  122. }
  123. }
  124. .popupCon {
  125. padding: 30rpx 50rpx;
  126. .h2 {
  127. font-weight: 600;
  128. color: #333333;
  129. line-height: 70rpx;
  130. font-size: 36rpx;
  131. text-align: center;
  132. }
  133. .content {
  134. padding-bottom: 20rpx;
  135. .row {
  136. padding: 22rpx 0;
  137. display: flex;
  138. font-size: 28rpx;
  139. align-items: center;
  140. .lab {
  141. width: 180rpx;
  142. color: #686B73;
  143. }
  144. .val {
  145. flex: 1;
  146. font-weight: 500;
  147. }
  148. }
  149. }
  150. }
  151. .btn_row {
  152. display: flex;
  153. justify-content: space-between;
  154. .btn {
  155. width: 47%;
  156. height: 72rpx;
  157. background: #1989FA;
  158. border-radius: 8rpx;
  159. font-size: 28rpx;
  160. color: #fff;
  161. text-align: center;
  162. line-height: 72rpx;
  163. &.border {
  164. background: rgba(25, 137, 250, 0.1);
  165. border: 2rpx solid $themC;
  166. color: $themC;
  167. }
  168. }
  169. }
  170. </style>