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

172 lines
3.9 KiB

1 year ago
8 months ago
8 months ago
1 year ago
1 year ago
1 year ago
1 year ago
8 months 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. <view class="haveToken" v-if="studentId">
  41. <subject0 v-show="currentNav==0"/>
  42. <subject1 v-show="currentNav==1"/>
  43. <subject2 v-show="currentNav==2"/>
  44. <subject3 v-show="currentNav==3"/>
  45. <subject4 v-show="currentNav==4"/>
  46. </view>
  47. <view class="noDate" v-else>
  48. <nodata><text>暂无数据您还未报名</text></nodata>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import subject0 from './comp/subject0'
  54. import subject1 from './comp/subject1'
  55. import subject2 from './comp/subject2'
  56. import subject3 from './comp/subject3'
  57. import subject4 from './comp/subject4'
  58. export default {
  59. components: { subject0, subject1, subject2, subject3, subject4 },
  60. data() {
  61. return {
  62. navData: [
  63. {text: '模拟器', id: 0},
  64. {text: '科目一', id: 1},
  65. {text: '科目二', id: 2},
  66. {text: '科目三', id: 3},
  67. {text: '科目四', id: 4},
  68. ],
  69. currentNav: 0
  70. }
  71. },
  72. onLoad() {
  73. },
  74. onShow() {
  75. // console.log('没发生?')
  76. // this.$store.dispatch('checkLogin')
  77. },
  78. methods: {
  79. changeNav(id) {
  80. this.currentNav = id
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .content {
  87. width: 100vw;
  88. min-height: 100vh;
  89. // background: url('../../../static/images/bigImg/topbg.png') #F6F6F6 no-repeat;
  90. background-size: 100% 362rpx;
  91. padding: 0 32rpx 32rpx 32rpx;
  92. .title {
  93. font-size: 36rpx;
  94. font-weight: 600;
  95. color: #fff;
  96. padding: 10rpx 0 48rpx 0rpx;
  97. }
  98. .navCard {
  99. .nav_row {
  100. display: flex;
  101. justify-content: space-between;
  102. .nav {
  103. width: 19.4%;
  104. height: 86rpx;
  105. background: rgba(255,255,255,0.4);
  106. border-radius: 8rpx 8rpx 0px 0px;
  107. font-size: 28rpx;
  108. color: #fff;
  109. line-height: 86rpx;
  110. text-align: center;
  111. &.active {
  112. background: #FFFFFF;
  113. color: $themC;
  114. }
  115. }
  116. }
  117. .subject3 {
  118. padding-top: 32rpx;
  119. position: relative;
  120. .chain {
  121. width: 28rpx;
  122. height: 100rpx;
  123. position: absolute;
  124. top: -34rpx;
  125. &.left {
  126. left: 60rpx;
  127. }
  128. &.right {
  129. right: 60rpx !important;
  130. }
  131. }
  132. }
  133. .time_row {
  134. display: flex;
  135. height: 240rpx;
  136. padding: 32rpx;
  137. align-items: center;
  138. justify-content: center;
  139. background: #fff;
  140. border-radius: 0 0 8rpx 8rpx;
  141. .time_item {
  142. flex: 1;
  143. text-align: center;
  144. position: relative;
  145. .lab {
  146. font-size: 28rpx;
  147. color: #333;
  148. }
  149. .num {
  150. font-size: 40rpx;
  151. font-weight: 600;
  152. color: $themC;
  153. margin-top: 20rpx;
  154. }
  155. .shareTime {
  156. font-size: 20rpx;
  157. color: $themC;
  158. position: absolute;
  159. bottom: -40rpx;
  160. left: 0;
  161. width: 100%;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. </style>