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

165 lines
3.7 KiB

12 months 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. // uni.hideTabBar();
  71. },
  72. methods: {
  73. changeNav(id) {
  74. this.currentNav = id
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .content {
  81. width: 100vw;
  82. min-height: 100vh;
  83. // background: url('../../../static/images/bigImg/topbg.png') #F6F6F6 no-repeat;
  84. background-size: 100% 362rpx;
  85. padding: 0 32rpx 32rpx 32rpx;
  86. .title {
  87. font-size: 36rpx;
  88. font-weight: 600;
  89. color: #fff;
  90. padding: 10rpx 0 48rpx 0rpx;
  91. }
  92. .navCard {
  93. .nav_row {
  94. display: flex;
  95. justify-content: space-between;
  96. .nav {
  97. width: 19.4%;
  98. height: 86rpx;
  99. background: rgba(255,255,255,0.4);
  100. border-radius: 8rpx 8rpx 0px 0px;
  101. font-size: 28rpx;
  102. color: #fff;
  103. line-height: 86rpx;
  104. text-align: center;
  105. &.active {
  106. background: #FFFFFF;
  107. color: $themC;
  108. }
  109. }
  110. }
  111. .subject3 {
  112. padding-top: 32rpx;
  113. position: relative;
  114. .chain {
  115. width: 28rpx;
  116. height: 100rpx;
  117. position: absolute;
  118. top: -34rpx;
  119. &.left {
  120. left: 60rpx;
  121. }
  122. &.right {
  123. right: 60rpx !important;
  124. }
  125. }
  126. }
  127. .time_row {
  128. display: flex;
  129. height: 240rpx;
  130. padding: 32rpx;
  131. align-items: center;
  132. justify-content: center;
  133. background: #fff;
  134. border-radius: 0 0 8rpx 8rpx;
  135. .time_item {
  136. flex: 1;
  137. text-align: center;
  138. position: relative;
  139. .lab {
  140. font-size: 28rpx;
  141. color: #333;
  142. }
  143. .num {
  144. font-size: 40rpx;
  145. font-weight: 600;
  146. color: $themC;
  147. margin-top: 20rpx;
  148. }
  149. .shareTime {
  150. font-size: 20rpx;
  151. color: $themC;
  152. position: absolute;
  153. bottom: -40rpx;
  154. left: 0;
  155. width: 100%;
  156. }
  157. }
  158. }
  159. }
  160. }
  161. </style>