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

166 lines
3.7 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. <template>
  2. <view class="content pageBgImg">
  3. <view style="width: 100%;height: 40rpx;"></view>
  4. <view class="status_bar"></view>
  5. <view class="title">江西驾考公共服务平台</view>
  6. <view class="navCard">
  7. <view class="nav_row">
  8. <view class="nav " v-for="(item,index) in navData" :key="index" :class="{active: item.id==currentNav}" @click="changeNav(item.id)">{{ item.text }}</view>
  9. </view>
  10. <view class="time_row">
  11. <view class="time_item">
  12. <view class="lab">应完成学时</view>
  13. <view class="num">100分钟</view>
  14. </view>
  15. <view class="time_item">
  16. <view class="lab">已完成学时</view>
  17. <view class="num">30分钟</view>
  18. <view class="shareTime">*与科目一学时共享</view>
  19. </view>
  20. </view>
  21. <view class="subject3" v-if="currentNav==3">
  22. <view class="chain left">
  23. <image src="@/static/images/index/chain.png" mode=""></image>
  24. </view>
  25. <view class="chain right">
  26. <image src="@/static/images/index/chain.png" mode=""></image>
  27. </view>
  28. <view class="time_row ">
  29. <view class="time_item">
  30. <view class="lab">应完成里程</view>
  31. <view class="num">50km</view>
  32. </view>
  33. <view class="time_item">
  34. <view class="lab">已完成里程</view>
  35. <view class="num">0km</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. <subject0 v-show="currentNav==0"/>
  41. <subject1 v-show="currentNav==1"/>
  42. <subject2 v-show="currentNav==2"/>
  43. <subject3 v-show="currentNav==3"/>
  44. <subject4 v-show="currentNav==4"/>
  45. </view>
  46. </template>
  47. <script>
  48. import subject0 from './comp/subject0'
  49. import subject1 from './comp/subject1'
  50. import subject2 from './comp/subject2'
  51. import subject3 from './comp/subject3'
  52. import subject4 from './comp/subject4'
  53. export default {
  54. components: { subject0, subject1, subject2, subject3, subject4 },
  55. data() {
  56. return {
  57. navData: [
  58. {text: '模拟器', id: 0},
  59. {text: '科目一', id: 1},
  60. {text: '科目二', id: 2},
  61. {text: '科目三', id: 3},
  62. {text: '科目四', id: 4},
  63. ],
  64. currentNav: 0
  65. }
  66. },
  67. onLoad() {
  68. },
  69. onShow() {
  70. // console.log('没发生?')
  71. this.$store.dispatch('checkLogin')
  72. },
  73. methods: {
  74. changeNav(id) {
  75. this.currentNav = id
  76. }
  77. }
  78. }
  79. </script>
  80. <style lang="scss" scoped>
  81. .content {
  82. width: 100vw;
  83. min-height: 100vh;
  84. // background: url('../../../static/images/bigImg/topbg.png') #F6F6F6 no-repeat;
  85. background-size: 100% 362rpx;
  86. padding: 0 32rpx 32rpx 32rpx;
  87. .title {
  88. font-size: 36rpx;
  89. font-weight: 600;
  90. color: #fff;
  91. padding: 10rpx 0 48rpx 0rpx;
  92. }
  93. .navCard {
  94. .nav_row {
  95. display: flex;
  96. justify-content: space-between;
  97. .nav {
  98. width: 19.4%;
  99. height: 86rpx;
  100. background: rgba(255,255,255,0.4);
  101. border-radius: 8rpx 8rpx 0px 0px;
  102. font-size: 28rpx;
  103. color: #fff;
  104. line-height: 86rpx;
  105. text-align: center;
  106. &.active {
  107. background: #FFFFFF;
  108. color: $themC;
  109. }
  110. }
  111. }
  112. .subject3 {
  113. padding-top: 32rpx;
  114. position: relative;
  115. .chain {
  116. width: 28rpx;
  117. height: 100rpx;
  118. position: absolute;
  119. top: -34rpx;
  120. &.left {
  121. left: 60rpx;
  122. }
  123. &.right {
  124. right: 60rpx !important;
  125. }
  126. }
  127. }
  128. .time_row {
  129. display: flex;
  130. height: 240rpx;
  131. padding: 32rpx;
  132. align-items: center;
  133. justify-content: center;
  134. background: #fff;
  135. border-radius: 0 0 8rpx 8rpx;
  136. .time_item {
  137. flex: 1;
  138. text-align: center;
  139. position: relative;
  140. .lab {
  141. font-size: 28rpx;
  142. color: #333;
  143. }
  144. .num {
  145. font-size: 40rpx;
  146. font-weight: 600;
  147. color: $themC;
  148. margin-top: 20rpx;
  149. }
  150. .shareTime {
  151. font-size: 20rpx;
  152. color: $themC;
  153. position: absolute;
  154. bottom: -40rpx;
  155. left: 0;
  156. width: 100%;
  157. }
  158. }
  159. }
  160. }
  161. }
  162. </style>