洛阳学员端
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.

128 lines
2.7 KiB

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