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

129 lines
3.0 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
8 months ago
1 year ago
8 months 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="pageBgImg">
  3. <topNavbar title="学车学时"></topNavbar>
  4. <view class="pad">
  5. <view class="box" v-for="(item,index) in list" :key="index" :style="{ backgroundImage: `url(${imgUrl})`, backgroundSize: backgroundSize }">
  6. <view class="h2">{{ item.text }}</view>
  7. <view class="con">
  8. <view class="item_row">
  9. <view class="item">
  10. <view class="lab">总学时</view>
  11. <view class="val">{{ item.total }}分钟</view>
  12. </view>
  13. <view class="item">
  14. <view class="lab">已完成</view>
  15. <view class="val">{{ item.time }}分钟</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="chain left" v-if="index!=0">
  20. <image src="@/static/images/index/chain.png" mode=""></image>
  21. </view>
  22. <view class="chain right" v-if="index!=0">
  23. <image src="@/static/images/index/chain.png" mode=""></image>
  24. </view>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import { imgUrl } from '@/config/site.config'
  31. import { getStudentProcess } from '@/config/api.js'
  32. export default {
  33. data() {
  34. return {
  35. imgUrl: imgUrl+'carlearTimeBg.png',
  36. backgroundSize: '100% 100%',
  37. list: []
  38. }
  39. },
  40. onLoad() {
  41. this.getStudentProcessFn()
  42. },
  43. onPullDownRefresh() {
  44. this.getStudentProcessFn().then((res)=>{
  45. uni.stopPullDownRefresh()
  46. })
  47. },
  48. methods: {
  49. async getStudentProcessFn() {
  50. const {data: res} = await getStudentProcess({studentId: this.studentId})
  51. console.log('基础不劳')
  52. this.list = [
  53. {total: res.simulateTotalTime, time: res.simulateValidTtime, text: '模拟器'},
  54. {total: res.subjectOneTotalTime, time: res.subjectOneValidTtime, text: '科目一'},
  55. {total: res.subjectTwoTotalTime, time: res.subjectTwoValidTtime, text: '科目二'},
  56. {total: res.subjectThreeTotalTime, time: res.subjectOneValidTtime, text: '科目三'},
  57. ]
  58. }
  59. }
  60. }
  61. </script>
  62. <style lang="scss" scoped>
  63. .pad {
  64. marginp: 20rpx 0;
  65. }
  66. .box {
  67. width: 100%;
  68. height: 400rpx;
  69. margin-bottom: 20rpx;
  70. padding: 0 16rpx 52rpx 16rpx;
  71. background: url('http://192.168.1.20:81/zhili/image/20230822/ca8f14281ac9412987b23ad43bfb50a1.png') no-repeat;
  72. background-size: 100% 400rpx;
  73. position: relative;
  74. .h2 {
  75. width: 489rpx;
  76. height: 75rpx;
  77. line-height: 70rpx;
  78. margin: 0 auto;
  79. text-align: center;
  80. // background-color: #A6E2FF;
  81. color: #fff;
  82. font-size: 32rpx;
  83. font-weight: 600;
  84. }
  85. .con {
  86. border-radius: 16rpx;
  87. width: 100%;
  88. .item_row {
  89. display: flex;
  90. width: 100%;
  91. height: 256rpx;
  92. align-items: center;
  93. .item {
  94. flex: 1;
  95. text-align: center;
  96. display: flex;
  97. flex-direction: column;
  98. align-items: center;
  99. .lab {
  100. font-size: 28rpx;
  101. color: #363A44;
  102. }
  103. .val {
  104. margin-top: 20rpx;
  105. font-size: 40rpx;
  106. color: $themC;
  107. font-weight: 500;
  108. }
  109. }
  110. }
  111. }
  112. .chain {
  113. width: 28rpx;
  114. height: 100rpx;
  115. position: absolute;
  116. top: -56rpx;
  117. &.left {
  118. left: 60rpx;
  119. }
  120. &.right {
  121. right: 60rpx !important;
  122. }
  123. }
  124. }
  125. </style>