index.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <view class="threeExam">
  3. <view class="topad">
  4. <ad
  5. class="wxad"
  6. :ad-intervals="100"
  7. unit-id="adunit-f9ac1a546be5b3f0"
  8. ></ad>
  9. </view>
  10. <view class="problem">
  11. <text class="problem-type"> 判断题 </text>
  12. <text class="problem-issue"
  13. >{{ problemListIndex + 1 }}、{{
  14. problemList[problemListIndex].question
  15. }}</text
  16. >
  17. <view class="problem-radio">
  18. <van-radio-group :value="problemList[problemListIndex].answer">
  19. <van-radio
  20. label-class="pl0"
  21. custom-class="mt40"
  22. use-icon-slot
  23. name="1"
  24. >
  25. <view class="problem-radio-flex">
  26. <view class="problem-radio-icon">
  27. <view class="problem-radio-letter">{{
  28. numberToLetter(0)
  29. }}</view>
  30. </view>
  31. <text
  32. style="font-size: 42rpx; font-weight: bold; margin-left: 20rpx"
  33. >正确</text
  34. >
  35. </view>
  36. </van-radio>
  37. <van-radio
  38. label-class="pl0"
  39. custom-class="mt40"
  40. use-icon-slot
  41. name="1"
  42. >
  43. <view class="problem-radio-flex">
  44. <view class="problem-radio-icon">
  45. <view class="problem-radio-letter">{{
  46. numberToLetter(1)
  47. }}</view>
  48. </view>
  49. <text
  50. style="font-size: 42rpx; font-weight: bold; margin-left: 20rpx"
  51. >错误</text
  52. >
  53. </view>
  54. </van-radio>
  55. </van-radio-group>
  56. </view>
  57. </view>
  58. <view class="bottom">
  59. <view class="switch">
  60. <view class="pre"> 上一题</view>
  61. <view class="next"> 下一题</view>
  62. </view>
  63. <view class="submit">
  64. <view class="submit-button"> 交卷&nbsp;19:57 </view>
  65. <view class="count">
  66. <view class="col">
  67. <icon type="success" size="26rpx" color="#33CDA4"></icon>
  68. <text style="font-size: 24rpx; color: #8a9099; margin-left: 8rpx"
  69. >180</text
  70. >
  71. </view>
  72. <view class="col">
  73. <icon type="clear" size="26rpx" color="#FF4D53"></icon>
  74. <text style="font-size: 24rpx; color: #8a9099; margin-left: 8rpx"
  75. >20</text
  76. >
  77. </view>
  78. <view class="col">
  79. <van-icon name="description" />
  80. <text style="font-size: 24rpx; color: #8a9099; margin-left: 8rpx"
  81. >100/180</text
  82. >
  83. </view>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </template>
  89. <script>
  90. import api from "@/api";
  91. export default {
  92. data() {
  93. return {
  94. problemList: [
  95. {
  96. an1: "红色",
  97. an2: "黄色",
  98. an3: "紫色",
  99. an4: "绿色",
  100. an5: "",
  101. an6: "",
  102. an7: "",
  103. answertrue: "1",
  104. bestExplainNew: "图中信号灯亮的是红灯。",
  105. bestanswerid: "1351372021270892544",
  106. chapterid: 0,
  107. cityid: 0,
  108. diffDegree: 3,
  109. errorRate: 0,
  110. explain: "图中信号灯亮的是红灯。",
  111. gs: "test",
  112. id: 26852,
  113. intnumber: "",
  114. jieshiFrom: "",
  115. kemu: 1,
  116. keyword: "",
  117. licensetype: "",
  118. mediaUrl:
  119. "https://t1-1305573081.file.myqcloud.com/yd/app/media/26852-1606813820528.webp",
  120. moretypes: "",
  121. question: "下图中指示灯的颜色是什么?",
  122. questionSource: 3,
  123. showOptionType: 0,
  124. sinaimg: "26852-1606813820528.webp",
  125. strtppe: "87",
  126. strtypeL: "8701",
  127. type: 2,
  128. videoUrl: "",
  129. },
  130. ],
  131. problemListIndex: 0,
  132. };
  133. },
  134. onLoad() {
  135. api.exam
  136. .studentThreeForceList({
  137. pageNum: 1,
  138. pageSize: 20,
  139. })
  140. .then((res) => {
  141. console.log(res);
  142. });
  143. },
  144. methods: {
  145. numberToLetter(index) {
  146. index = Number(index);
  147. return String.fromCharCode(index + 65);
  148. },
  149. },
  150. };
  151. </script>
  152. <style lang="scss" scoped>
  153. .topad {
  154. padding: 0 30rpx;
  155. }
  156. .threeExam {
  157. background: #fff;
  158. width: 100%;
  159. height: 100vh;
  160. }
  161. .wxad {
  162. border: none;
  163. }
  164. .problem {
  165. padding: 0 30rpx;
  166. .problem-type {
  167. font-size: 22rpx;
  168. color: #fff;
  169. background: #2878ff;
  170. width: 94rpx;
  171. height: 40rpx;
  172. padding: 6rpx 20rpx;
  173. border-radius: 8rpx;
  174. margin-right: 10rpx;
  175. vertical-align: middle;
  176. }
  177. .problem-issue {
  178. font-size: 42rpx;
  179. vertical-align: middle;
  180. font-weight: bold;
  181. color: #0a1a33;
  182. }
  183. .problem-radio {
  184. .problem-radio-flex {
  185. display: flex;
  186. width: 100%;
  187. flex-wrap: wrap;
  188. align-items: center;
  189. }
  190. .problem-radio-icon {
  191. width: 70rpx;
  192. height: 70rpx;
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. .problem-radio-letter {
  197. width: 60rpx;
  198. height: 60rpx;
  199. line-height: 60rpx;
  200. font-size: 42rpx;
  201. color: #333;
  202. box-shadow: 0px 4rpx 12rpx 0rpx rgba(0, 0, 0, 0.26);
  203. text-align: center;
  204. border-radius: 50%;
  205. }
  206. }
  207. }
  208. }
  209. .bottom {
  210. position: absolute;
  211. bottom: 0;
  212. width: 100%;
  213. padding-bottom: constant(safe-area-inset-bottom);
  214. padding-bottom: env(safe-area-inset-bottom);
  215. .switch {
  216. bottom: 48rpx;
  217. padding: 0 30rpx;
  218. display: flex;
  219. justify-content: space-between;
  220. width: 100%;
  221. .pre {
  222. width: 156rpx;
  223. height: 76rpx;
  224. line-height: 76rpx;
  225. background: #ffffff;
  226. color: #8a9099;
  227. border-radius: 40rpx 40rpx 40rpx 40rpx;
  228. opacity: 1;
  229. border: 2rpx solid #707070;
  230. text-align: center;
  231. }
  232. .next {
  233. width: 156rpx;
  234. height: 76rpx;
  235. line-height: 76rpx;
  236. color: #8a9099;
  237. background: #ffffff;
  238. border-radius: 40rpx 40rpx 40rpx 40rpx;
  239. opacity: 1;
  240. border: 2rpx solid #707070;
  241. text-align: center;
  242. }
  243. }
  244. .submit {
  245. margin-top: 50rpx;
  246. width: 100%;
  247. height: 98rpx;
  248. box-shadow: 2rpx -2rpx 6rpx 2rpx rgba(0, 0, 0, 0.16);
  249. display: flex;
  250. justify-content: space-between;
  251. align-content: center;
  252. align-items: center;
  253. padding: 0 30rpx;
  254. .submit-button {
  255. width: 180rpx;
  256. line-height: 68rpx;
  257. background: #498ef5;
  258. border-radius: 34rpx 34rpx 34rpx 34rpx;
  259. opacity: 1;
  260. color: #fff;
  261. text-align: center;
  262. font-size: 24rpx;
  263. }
  264. }
  265. .count {
  266. width: 390rpx;
  267. display: flex;
  268. justify-content: space-between;
  269. .col {
  270. display: flex;
  271. }
  272. }
  273. }
  274. </style>