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.

132 lines
3.2 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <view class="content">
  3. <up-navbar leftText=" " :leftIconColor="'#fff'" :safeAreaInsetTop="true" :autoBack="true" title="我的学习"
  4. :bgColor="'transparent'" :titleStyle="{color: '#fff'}">
  5. <template #right>
  6. <view class="cjd" @click="$goPage('/pages/exercises/examSubjiect1/examResultsOne')">
  7. 成绩单
  8. </view>
  9. </template>
  10. </up-navbar>
  11. <view class="padding">
  12. <view class="useInfo flex">
  13. <view class="avatar">
  14. <image src="" mode=""></image>
  15. </view>
  16. <view class="rightBox">
  17. <view class="name">{{ phone }}</view>
  18. <view class="p" v-if="info.highScore">
  19. <text>最高分数{{ info.highScore }}</text>
  20. <text>用时{{ info.useTimes }} 分钟 </text>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="card">
  25. <view class="text">考试车型{{ usecarStore.carInfo.carTypeName}}</view>
  26. <view class="text">考试时间{{ info.totalExamTime}}分钟 {{ info.totalCount }}</view>
  27. <view class="text">合格标准{{ info.score }}分及格满分{{ info.funllScore }}</view>
  28. <view class="text">出题规则{{info.questionRule}}</view>
  29. <view class="text">计分规则{{info.deductPointsRule}}</view>
  30. </view>
  31. <view class="btnBox">
  32. <oneBtn text="开始模拟考试" @click="$goPage(`/pages/exercises/brushQuestions/examQuestions?totalExamTime=${info.totalExamTime}&score=${info.score}`)"></oneBtn>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script setup>
  38. import { ref } from 'vue'
  39. import { questionExam} from '@/config/api.js'
  40. import carStore from '@/store/modules/car.js'
  41. let usecarStore = carStore()
  42. import {
  43. onShow,
  44. } from "@dcloudio/uni-app"
  45. let phone = uni.getStorageSync('loginInfo')?.phone
  46. // 统计多少题目
  47. let info = ref({})
  48. async function questionExamFn() {
  49. const {data:res} = await questionExam({stepType: usecarStore.carInfo.stepType, carType: usecarStore.carInfo.carType})
  50. let arr = res.useTime.split(':')
  51. res.useTimes =arr[0] +':'+ arr[1].substring(0, 2)
  52. info.value = res
  53. }
  54. onShow(()=>{
  55. questionExamFn()
  56. })
  57. </script>
  58. <style lang="scss" scoped>
  59. .content {
  60. width: 100%;
  61. min-height: 100vh;
  62. padding: 100rpx 0rpx 30rpx 0rpx;
  63. background: url('../../../static/images/topbg.png') #F6F7FA no-repeat;
  64. background-size: 100% 410rpx;
  65. .cjd {
  66. color: #fff;
  67. }
  68. .useInfo {
  69. padding: 30rpx 0;
  70. .avatar {
  71. width: 140rpx;
  72. height: 140rpx;
  73. overflow: hidden;
  74. border-radius: 50%;
  75. background: url('../../../static/images/avatarbg.png') no-repeat;
  76. background-size: 100% 100%;
  77. image {
  78. display: block;
  79. width: 100%;
  80. height: 100%;
  81. }
  82. }
  83. .rightBox {
  84. flex: 1;
  85. width: 0;
  86. padding-left: 30rpx;
  87. .name {
  88. font-size: 36rpx;
  89. color: #FFFFFF;
  90. font-weight: 500;
  91. }
  92. .p {
  93. padding-top: 30rpx;
  94. text {
  95. font-weight: 500;
  96. font-size: 28rpx;
  97. color: #FFFFFF;
  98. margin-right: 40rpx;
  99. }
  100. }
  101. }
  102. }
  103. .card {
  104. background: #FFFFFF;
  105. border-radius: 20rpx;
  106. padding: 20rpx 30rpx;
  107. .text {
  108. padding: 10rpx 0;
  109. font-weight: 500;
  110. font-size: 28rpx;
  111. color: #333333;
  112. }
  113. }
  114. .btnBox {
  115. padding: 100rpx 50rpx;
  116. width: 100%;
  117. }
  118. }
  119. </style>