m-do-topic.vue 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329
  1. <template>
  2. <view class="m-do-topic">
  3. <countDown
  4. :time="examTime"
  5. @end="submitExam"
  6. @change="getUseTime"
  7. v-if="type == 'singleTest' || type == 'exam'"
  8. ></countDown>
  9. <view v-if="!hiddenMode" class="mode">
  10. <view
  11. @click="
  12. () => {
  13. createOrderProblemList();
  14. mode = 0;
  15. }
  16. "
  17. :class="{
  18. 'mode-item_select': mode == 0,
  19. }"
  20. class="mode-item"
  21. >顺序练习</view
  22. >
  23. <view
  24. @click="
  25. () => {
  26. createRandomProblemList();
  27. mode = 1;
  28. }
  29. "
  30. :class="{
  31. 'mode-item_select': mode == 1,
  32. }"
  33. class="mode-item"
  34. >随机练习</view
  35. >
  36. <view
  37. @click="
  38. () => {
  39. createCompleteProblemList();
  40. mode = 2;
  41. }
  42. "
  43. :class="{
  44. 'mode-item_select': mode == 2,
  45. }"
  46. class="mode-item"
  47. >背题模式</view
  48. >
  49. <view
  50. :class="{
  51. 'mode-item_select': isAutoReadTopics,
  52. }"
  53. @click="
  54. () => {
  55. isAutoReadTopics = !isAutoReadTopics;
  56. isAutoReadTopics ? playCurrentIssue() : stopAudio();
  57. }
  58. "
  59. class="mode-item"
  60. >自动读题</view
  61. >
  62. </view>
  63. <view class="divider"></view>
  64. <view
  65. class="problem-box"
  66. :class="{
  67. pb80px: type == 'exam',
  68. pb50px: type != 'exam',
  69. }"
  70. >
  71. <span class="problem-type">{{
  72. problemList[problemListIndex].questionType | questionType
  73. }}</span>
  74. <text
  75. style="background: #9c5fed"
  76. v-if="problemList[problemListIndex].isNew"
  77. class="problem-type"
  78. >新规题</text
  79. >
  80. <!-- <text>{{ problemListIndex + 1 }}、</text> -->
  81. <text class="problem-issue"
  82. >{{ problemListIndex + 1 }}、{{
  83. problemList[problemListIndex].issue
  84. }}</text
  85. >
  86. <view v-if="problemList[problemListIndex].image" class="problem-img">
  87. <image
  88. mode="widthFix"
  89. :src="problemList[problemListIndex].image"
  90. ></image>
  91. </view>
  92. <view v-if="!hiddenFunction" class="funcicon-list">
  93. <view
  94. v-if="midFunc.includes('collect')"
  95. @click="collectTopics"
  96. :class="
  97. !problemList[problemListIndex].isCollect
  98. ? 'funcicon-item'
  99. : 'funcicon-item funcicon-item_select'
  100. "
  101. >
  102. <van-icon
  103. style="margin-right: 8rpx"
  104. v-if="!problemList[problemListIndex].isCollect"
  105. name="star-o"
  106. size="10px"
  107. />
  108. <van-icon
  109. style="margin-right: 8rpx"
  110. color="#ffde00ff"
  111. v-if="problemList[problemListIndex].isCollect"
  112. name="star"
  113. size="10px"
  114. />
  115. <span>收藏</span>
  116. </view>
  117. <view
  118. v-if="midFunc.includes('readQuestionAndAnswer')"
  119. @click="
  120. readQuestionAndAnswer();
  121. completeQuestion();
  122. "
  123. class="funcicon-item funcicon-item_select"
  124. >
  125. <m-jp-icon style="margin-right: 8rpx" type="a-dtda" size="10px" />
  126. <span>读题+答案</span>
  127. </view>
  128. <view
  129. v-if="midFunc.includes('readQuestion')"
  130. @click="readQuestion()"
  131. class="funcicon-item funcicon-item_select"
  132. >
  133. <m-jp-icon style="margin-right: 8rpx" type="duti" size="10px" />
  134. <span>读题</span>
  135. </view>
  136. <!-- <div
  137. @click="
  138. () => {
  139. explainJqVisible = true;
  140. }
  141. "
  142. class="function-item"
  143. >
  144. <m-jp-icon type="jqjj" size="25px" />
  145. <span>技巧讲解</span>
  146. </div> -->
  147. </view>
  148. <!-- #ifdef MP-WEIXIN -->
  149. <!-- 单项选择 -->
  150. <view
  151. v-if="
  152. problemList[problemListIndex].questionType < 3 &&
  153. !problemList[problemListIndex].isCompleted
  154. "
  155. style="margin-top: 0"
  156. class="problem-ops"
  157. >
  158. <van-radio-group
  159. :value="problemList[problemListIndex].userAnswer"
  160. :max="1"
  161. @change="changeRadioGroup"
  162. >
  163. <van-radio
  164. label-class="problem-fontsize"
  165. :value="problemList[problemListIndex].userAnswer === item.value"
  166. use-icon-slot
  167. v-for="(item, index) in problemList[problemListIndex].optsArr"
  168. :key="index"
  169. :name="item.value"
  170. >
  171. <text class="problem-fontsize">{{ item.value }}</text>
  172. <view
  173. class="problem-op problem-fontsize mt15 mb15"
  174. :class="{
  175. 'problem-op_selected':
  176. problemList[problemListIndex].userAnswer === item.value,
  177. }"
  178. slot="icon"
  179. >{{ numberToLetter(index) }}</view
  180. >
  181. </van-radio>
  182. </van-radio-group>
  183. </view>
  184. <view
  185. v-if="
  186. problemList[problemListIndex].questionType < 3 &&
  187. problemList[problemListIndex].isCompleted
  188. "
  189. >
  190. <view
  191. v-for="(item, index) in problemList[problemListIndex].optsArr"
  192. :key="index"
  193. class="problem-select pl30"
  194. >
  195. <icon
  196. v-if="item.isAnswer && item.selected"
  197. class="icon-box-img"
  198. type="success"
  199. color="#06c05f"
  200. size="36"
  201. >
  202. </icon>
  203. <icon
  204. v-if="!item.isAnswer && item.selected"
  205. class="icon-box-img"
  206. type="clear"
  207. color="red"
  208. size="36"
  209. ></icon>
  210. <text
  211. v-if="!item.isAnswer && !item.selected"
  212. class="problem-op problem-fontsize"
  213. >{{ numberToLetter(index) }}</text
  214. >
  215. <text
  216. v-if="item.isAnswer && !item.selected"
  217. class="problem-op problem-op_green problem-fontsize"
  218. >{{ numberToLetter(index) }}</text
  219. >
  220. <view style="width: 8px"></view>
  221. <text
  222. style="font-weight: 500"
  223. class="problem-opAnswer problem-fontsize"
  224. >{{ item.value }}</text
  225. >
  226. </view>
  227. </view>
  228. <!-- 多项选择 -->
  229. <view
  230. v-if="
  231. problemList[problemListIndex].questionType == 3 &&
  232. !problemList[problemListIndex].isCompleted
  233. "
  234. class="problem-ops"
  235. style="margin-top: 0"
  236. >
  237. <van-checkbox-group
  238. :value="problemList[problemListIndex].userAnswer"
  239. :max="4"
  240. @change="changeCheckboxGroup"
  241. >
  242. <van-checkbox
  243. :value="
  244. problemList[problemListIndex].userAnswer.includes(item.value)
  245. "
  246. class="problem-checkbox"
  247. use-icon-slot
  248. v-for="(item, index) in problemList[problemListIndex].optsArr"
  249. :key="index"
  250. :name="item.value"
  251. label-class="problem-fontsize "
  252. >
  253. <text class="problem-fontsize">{{ item.value }}</text>
  254. <view
  255. class="problem-op mt15 mb15 problem-fontsize"
  256. :class="{
  257. 'problem-op_selected': item.selected,
  258. }"
  259. slot="icon"
  260. >{{ numberToLetter(index) }}</view
  261. >
  262. </van-checkbox>
  263. </van-checkbox-group>
  264. <view class="flex-center mt30 pb16">
  265. <van-button
  266. @click="confirmMult"
  267. color="#498ef5"
  268. round
  269. custom-style="width:600rpx"
  270. type="primary"
  271. >确定</van-button
  272. >
  273. </view>
  274. </view>
  275. <view
  276. class="problem-ops"
  277. v-if="
  278. problemList[problemListIndex].questionType == 3 &&
  279. problemList[problemListIndex].isCompleted
  280. "
  281. style="margin-top: 0"
  282. >
  283. <view
  284. v-for="(item, index) in problemList[problemListIndex].optsArr"
  285. :key="index"
  286. class="problem-select"
  287. >
  288. <icon
  289. v-if="item.isAnswer && item.selected"
  290. class="icon-box-img"
  291. type="success"
  292. color="#06c05f"
  293. size="36"
  294. >
  295. </icon>
  296. <icon
  297. v-if="!item.isAnswer && item.selected"
  298. class="icon-box-img"
  299. type="clear"
  300. size="36"
  301. color="red"
  302. ></icon>
  303. <text
  304. v-if="!item.isAnswer && !item.selected"
  305. class="problem-op problem-fontsize"
  306. >{{ numberToLetter(index) }}</text
  307. >
  308. <text
  309. v-if="item.isAnswer && !item.selected"
  310. class="problem-op problem-op_green problem-fontsize"
  311. >{{ numberToLetter(index) }}</text
  312. >
  313. <view style="width: 8px"></view>
  314. <text class="problem-opAnswer problem-fontsize">{{
  315. item.value
  316. }}</text>
  317. </view>
  318. </view>
  319. <!-- #endif -->
  320. <!-- #ifdef MP-TOUTIAO -->
  321. <!-- 判断 -->
  322. <view
  323. v-if="
  324. problemList[problemListIndex].questionType == 1 &&
  325. !problemList[problemListIndex].isCompleted
  326. "
  327. class="problem-ops"
  328. >
  329. <m-radio-group
  330. @change="changeRadioGroup"
  331. :value.sync="problemList[problemListIndex].userAnswer"
  332. >
  333. <m-radio
  334. :value="judgMap[item.value]"
  335. :item="item"
  336. :useIconSlot="true"
  337. :key="index"
  338. :name="numberToLetter(index)"
  339. v-for="(item, index) in problemList[problemListIndex].optsArr"
  340. >
  341. </m-radio>
  342. </m-radio-group>
  343. </view>
  344. <view
  345. class="problem-ops"
  346. v-if="
  347. problemList[problemListIndex].questionType == 1 &&
  348. problemList[problemListIndex].isCompleted
  349. "
  350. >
  351. <view
  352. v-for="(item, index) in problemList[problemListIndex].optsArr"
  353. :key="index"
  354. class="problem-select"
  355. >
  356. <icon
  357. v-if="item.isAnswer && item.selected"
  358. class="icon-box-img"
  359. type="success"
  360. color="#06c05f"
  361. size="37"
  362. >
  363. </icon>
  364. <icon
  365. v-if="!item.isAnswer && item.selected"
  366. class="icon-box-img"
  367. type="clear"
  368. size="37"
  369. ></icon>
  370. <text v-if="!item.isAnswer && !item.selected" class="problem-op">{{
  371. numberToLetter(index)
  372. }}</text>
  373. <text
  374. v-if="item.isAnswer && !item.selected"
  375. class="problem-op problem-op_green"
  376. >{{ numberToLetter(index) }}</text
  377. >
  378. <view style="width: 8px"></view>
  379. <text class="problem-opAnswer">{{ judgMap[item.value] }}</text>
  380. </view>
  381. </view>
  382. <!-- 单选 -->
  383. <view
  384. v-if="
  385. problemList[problemListIndex].questionType == 2 &&
  386. !problemList[problemListIndex].isCompleted
  387. "
  388. class="problem-ops"
  389. >
  390. <m-radio-group
  391. @change="changeRadioGroup"
  392. :value.sync="problemList[problemListIndex].userAnswer"
  393. >
  394. <m-radio
  395. :value="item.value"
  396. :item="item"
  397. :useIconSlot="true"
  398. :key="index"
  399. :name="numberToLetter(index)"
  400. v-for="(item, index) in problemList[problemListIndex].optsArr"
  401. >
  402. </m-radio>
  403. </m-radio-group>
  404. </view>
  405. <view
  406. class="problem-ops"
  407. v-if="
  408. problemList[problemListIndex].questionType == 2 &&
  409. problemList[problemListIndex].isCompleted
  410. "
  411. >
  412. <view
  413. v-for="(item, index) in problemList[problemListIndex].optsArr"
  414. :key="index"
  415. class="problem-select"
  416. >
  417. <icon
  418. v-if="item.isAnswer && item.selected"
  419. class="icon-box-img"
  420. type="success"
  421. color="#06c05f"
  422. size="37"
  423. >
  424. </icon>
  425. <icon
  426. v-if="!item.isAnswer && item.selected"
  427. class="icon-box-img"
  428. type="clear"
  429. size="37"
  430. ></icon>
  431. <text v-if="!item.isAnswer && !item.selected" class="problem-op">{{
  432. numberToLetter(index)
  433. }}</text>
  434. <text
  435. v-if="item.isAnswer && !item.selected"
  436. class="problem-op problem-op_green"
  437. >{{ numberToLetter(index) }}</text
  438. >
  439. <view style="width: 8px"></view>
  440. <text class="problem-opAnswer">{{ item.value }}</text>
  441. </view>
  442. </view>
  443. <!-- 多选 -->
  444. <view
  445. v-if="
  446. problemList[problemListIndex].questionType == 3 &&
  447. !problemList[problemListIndex].isCompleted
  448. "
  449. class="problem-ops"
  450. >
  451. <m-checkbox-group
  452. @change="changeCheckboxGroup"
  453. :value="problemList[problemListIndex].userAnswer"
  454. :max="4"
  455. >
  456. <m-checkbox
  457. @change="changeCheckbox"
  458. :item="item"
  459. :value="item.value"
  460. class="problem-checkbox"
  461. use-icon-slot
  462. v-for="(item, index) in problemList[problemListIndex].optsArr"
  463. :key="index"
  464. :name="numberToLetter(index)"
  465. >
  466. </m-checkbox>
  467. </m-checkbox-group>
  468. <view class="flex-center pb16">
  469. <van-button
  470. @click="confirmMult"
  471. color="#498ef5"
  472. round
  473. custom-style="width:600rpx"
  474. type="primary"
  475. >确定</van-button
  476. >
  477. </view>
  478. </view>
  479. <view
  480. class="problem-ops"
  481. v-if="
  482. problemList[problemListIndex].questionType == 3 &&
  483. problemList[problemListIndex].isCompleted
  484. "
  485. >
  486. <view
  487. v-for="(item, index) in problemList[problemListIndex].optsArr"
  488. :key="index"
  489. class="problem-select"
  490. >
  491. <icon
  492. v-if="item.isAnswer && item.selected"
  493. class="icon-box-img"
  494. type="success"
  495. color="#06c05f"
  496. size="37"
  497. >
  498. </icon>
  499. <icon
  500. v-if="!item.isAnswer && item.selected"
  501. class="icon-box-img"
  502. type="clear"
  503. size="37"
  504. ></icon>
  505. <text v-if="!item.isAnswer && !item.selected" class="problem-op">{{
  506. numberToLetter(index)
  507. }}</text>
  508. <text
  509. v-if="item.isAnswer && !item.selected"
  510. class="problem-op problem-op_green"
  511. >{{ numberToLetter(index) }}</text
  512. >
  513. <view style="width: 8px"></view>
  514. <text class="problem-opAnswer">{{ item.value }}</text>
  515. </view>
  516. </view>
  517. <view
  518. v-if="problemList[problemListIndex].isCompleted && !hiddenAnswer"
  519. class="answer"
  520. >
  521. <view
  522. v-if="
  523. problemList[problemListIndex].questionType == 1 &&
  524. problemList[problemListIndex].isCompleted
  525. "
  526. >
  527. 答案:{{ judgMap[problemList[problemListIndex].answer] }}
  528. </view>
  529. <view
  530. v-if="
  531. problemList[problemListIndex].questionType > 1 &&
  532. problemList[problemListIndex].isCompleted
  533. "
  534. >
  535. 答案: {{ problemList[problemListIndex].answer }}
  536. </view>
  537. </view>
  538. <funList
  539. :midFunc="midFunc"
  540. v-if="!hiddenFunction"
  541. @collect="collectTopics"
  542. @readQuestionAndAnswer="
  543. readQuestionAndAnswer();
  544. completeQuestion();
  545. "
  546. :problemListItem="problemList[problemListIndex]"
  547. >
  548. </funList>
  549. <!-- #endif -->
  550. <view v-if="!hiddenFunction" class="function-list">
  551. <div
  552. v-if="midFunc.includes('collect')"
  553. @click="collectTopics"
  554. class="function-item"
  555. >
  556. <van-icon
  557. v-if="!problemList[problemListIndex].isCollect"
  558. name="star-o"
  559. size="25px"
  560. />
  561. <van-icon
  562. color="#ffde00ff"
  563. v-if="problemList[problemListIndex].isCollect"
  564. name="star"
  565. size="25px"
  566. />
  567. <span>收藏</span>
  568. </div>
  569. <div
  570. v-if="midFunc.includes('readQuestionAndAnswer')"
  571. @click="
  572. readQuestionAndAnswer();
  573. completeQuestion();
  574. "
  575. class="function-item"
  576. >
  577. <m-jp-icon type="a-dtda" size="25px" />
  578. <span>读题+答案</span>
  579. </div>
  580. <div
  581. v-if="midFunc.includes('readQuestion')"
  582. @click="readQuestion()"
  583. class="function-item"
  584. >
  585. <m-jp-icon type="duti" size="25px" />
  586. <span>读题</span>
  587. </div>
  588. <!-- <div
  589. @click="
  590. () => {
  591. explainJqVisible = true;
  592. }
  593. "
  594. class="function-item"
  595. >
  596. <m-jp-icon type="jqjj" size="25px" />
  597. <span>技巧讲解</span>
  598. </div> -->
  599. </view>
  600. <!-- 底部的栏目 -->
  601. <!-- #ifdef MP-WEIXIN -->
  602. <view :fixed="false" height="20px;bottom:30px" class="custom-tabbar">
  603. <view class="ipone-bottom">
  604. <view
  605. class="custom-tabbar-item"
  606. v-if="bottomFunc.includes('previous')"
  607. @click="goBeforeTopics"
  608. ><van-icon
  609. slot="icon"
  610. custom-style="transform: rotate(90deg);"
  611. custom-class="last-subject"
  612. name="down"
  613. size="18px"
  614. />
  615. <text style="font-size: 24rpx">上一题</text>
  616. </view>
  617. <view
  618. class="custom-tabbar-item"
  619. v-if="bottomFunc.includes('score')"
  620. style="text-align: center"
  621. >
  622. <view
  623. @click="
  624. () => {
  625. selectProblemListVisible = true;
  626. }
  627. "
  628. >
  629. <view>
  630. <icon
  631. slot="icon"
  632. class="icon-box-img"
  633. type="success"
  634. size="9px"
  635. ></icon
  636. ><text style="margin-left: 8rpx">{{ trueNum }}</text>
  637. </view>
  638. <view>
  639. <icon
  640. slot="icon"
  641. class="icon-box-img"
  642. type="clear"
  643. color="red"
  644. size="9px"
  645. ></icon
  646. ><text style="margin-left: 8rpx">{{ falseNum }}</text>
  647. </view>
  648. <view>
  649. <text style="font-size: 24rpx">
  650. {{ trueNum + falseNum }}/{{ problemList.length }}</text
  651. >
  652. </view>
  653. </view>
  654. </view>
  655. <view
  656. class="custom-tabbar-item"
  657. v-if="bottomFunc.includes('skill')"
  658. style="position: relative"
  659. >
  660. <image
  661. @tap="
  662. () => {
  663. explainJqVisible = true;
  664. }
  665. "
  666. class="jqIcon"
  667. src="https://ndata.zzxcx.net/ctjk/mp-wx/exercise/jsIcon.png"
  668. >
  669. </image>
  670. <van-icon
  671. style="opacity: 0; display: block"
  672. name="info-o"
  673. slot="icon"
  674. size="18px"
  675. />
  676. <span>
  677. <text style="font-size: 24rpx">技巧讲解</text>
  678. </span>
  679. </view>
  680. <!-- <van-tabbar-item><van-icon slot="icon" size="18px" name="description" />{{
  681. problemListIndex + 1
  682. }}/{{ problemListTotal }}
  683. </van-tabbar-item> -->
  684. <view
  685. class="custom-tabbar-item"
  686. v-if="bottomFunc.includes('explain')"
  687. @click="
  688. () => {
  689. explainJsVisible = true;
  690. }
  691. "
  692. ><van-icon name="info-o" slot="icon" size="18px" />
  693. <text style="font-size: 24rpx">官方解释</text>
  694. </view>
  695. <view
  696. class="custom-tabbar-item"
  697. v-if="bottomFunc.includes('next')"
  698. @click="goNextTopics"
  699. ><van-icon
  700. slot="icon"
  701. custom-style="transform: rotate(-90deg);"
  702. custom-class="last-subject"
  703. name="down"
  704. size="18px"
  705. /><text style="font-size: 24rpx">下一题</text>
  706. </view>
  707. </view>
  708. <view v-if="type == 'exam'" class="submit">
  709. <view @click="submitExam" class="submit-button">交卷</view>
  710. </view>
  711. </view>
  712. <!-- #endif -->
  713. <!-- #ifdef MP-TOUTIAO -->
  714. <tabbar height="50px">
  715. <view v-if="bottomFunc.includes('previous')" class="h-full tabbar-item">
  716. <view @click="goBeforeTopics">
  717. <van-icon
  718. slot="icon"
  719. custom-style="transform: rotate(90deg);"
  720. custom-class="last-subject"
  721. name="down"
  722. size="18px"
  723. />
  724. <view style="width: 100%"> 上一题 </view>
  725. </view>
  726. </view>
  727. <view v-if="bottomFunc.includes('score')" class="h-full tabbar-item">
  728. <view class="tabbar-item">
  729. <icon
  730. class="icon-box-img"
  731. color="#06c05f"
  732. type="success"
  733. size="18px"
  734. ></icon>
  735. <view style="width: 100%; color: #06c05f">{{ trueNum }}</view>
  736. </view>
  737. <view style="margin-left: 15rpx" class="tabbar-item">
  738. <icon class="icon-box-img" type="clear" size="18px"></icon>
  739. <view style="width: 100%; color: red">{{ falseNum }}</view>
  740. </view>
  741. </view>
  742. <view
  743. v-if="bottomFunc.includes('catalogue')"
  744. class="h-full tabbar-item"
  745. >
  746. <van-icon size="18px" name="description" />
  747. <view style="width: 100%"
  748. >{{ problemListIndex + 1 }}/{{ problemList.length }}</view
  749. >
  750. </view>
  751. <view
  752. v-if="bottomFunc.includes('selectCatalogue')"
  753. @click="
  754. () => {
  755. selectProblemListVisible = true;
  756. }
  757. "
  758. class="h-full tabbar-item"
  759. >
  760. <van-icon size="18px" name="description" />
  761. <view style="width: 100%"
  762. >{{ problemListIndex + 1 }}/{{ problemList.length }}</view
  763. >
  764. </view>
  765. <view
  766. v-if="bottomFunc.includes('explain')"
  767. @click="
  768. () => {
  769. explainJsVisible = true;
  770. }
  771. "
  772. class="h-full tabbar-item"
  773. >
  774. <icon type="warn" size="18" />
  775. <view style="width: 100%; text-align: center">解释</view>
  776. </view>
  777. <view
  778. @click="submitExam"
  779. v-if="bottomFunc.includes('submitExam')"
  780. class="h-full tabbar-item"
  781. >
  782. <van-icon slot="icon" size="18px" name="records" />
  783. <view style="width: 100%">交卷</view>
  784. </view>
  785. <view
  786. v-if="bottomFunc.includes('next')"
  787. @click="goNextTopics"
  788. class="h-full tabbar-item"
  789. >
  790. <van-icon
  791. slot="icon"
  792. custom-style="transform: rotate(-90deg);"
  793. custom-class="last-subject"
  794. name="down"
  795. size="18px"
  796. />
  797. <view style="width: 100%"> 下一题 </view>
  798. </view>
  799. </tabbar>
  800. <!-- #endif -->
  801. <!-- 题目序号选择 -->
  802. <van-overlay
  803. :lock-scroll="false"
  804. :zIndex="100"
  805. :duration="500"
  806. :show="selectProblemListVisible"
  807. >
  808. <view class="select-problem">
  809. <view class="problem-index">
  810. <view class="problem-header">
  811. <view class="problem-header-left">
  812. <view class="problem-dui">
  813. <icon
  814. class="icon-box-img"
  815. color="#06c05f"
  816. type="success"
  817. size="18"
  818. ></icon>
  819. <text
  820. style="color: #06c05f; font-size: 14px; margin-left: 8rpx"
  821. >{{ trueNum }}</text
  822. >
  823. </view>
  824. <view class="problem-cuo" style="margin-left: 16rpx">
  825. <icon class="icon-box-img" type="cancel" size="18"></icon>
  826. <text
  827. style="color: red; font-size: 14px; margin-left: 8rpx"
  828. >{{ falseNum }}</text
  829. >
  830. </view>
  831. </view>
  832. <view class="problem-header-right">
  833. <van-icon size="18px" name="description" />
  834. <view
  835. style="font-size: 14px; display: flex; align-items: center"
  836. >{{ problemListIndex + 1 }}/{{ problemListTotal }}</view
  837. >
  838. </view>
  839. </view>
  840. <view class="problem-body">
  841. <view class="problem-listBody">
  842. <view
  843. class="problem-listItem"
  844. :key="index"
  845. @click="
  846. () => {
  847. $emit('update:problemListIndex', index);
  848. }
  849. "
  850. v-for="(item, index) in problemList"
  851. :class="{
  852. 'problem-listItem_current': problemListIndex == index,
  853. 'problem-listItem_dui':
  854. item.userAnswer.length && item.userAnswer == item.answer,
  855. 'problem-listItem_cuo':
  856. item.userAnswer.length && item.userAnswer !== item.answer,
  857. }"
  858. >
  859. {{ index + 1 }}
  860. </view>
  861. </view>
  862. </view>
  863. <view class="problem-bottom">
  864. <!-- <view @click="
  865. () => {
  866. selectProblemListVisible = false;
  867. }
  868. " class="problem-bottom-sure">确定
  869. </view> -->
  870. <view
  871. @click="
  872. () => {
  873. selectProblemListVisible = false;
  874. }
  875. "
  876. class="problem-bottom-close"
  877. >
  878. 关闭</view
  879. >
  880. </view>
  881. </view>
  882. </view>
  883. </van-overlay>
  884. <explainJq
  885. @close="
  886. () => {
  887. explainJqVisible = false;
  888. }
  889. "
  890. :explainJq="problemList[problemListIndex].explainJq"
  891. :explainMp3="problemList[problemListIndex].explainMp3"
  892. :explainJqGif="problemList[problemListIndex].explainJqGif"
  893. :show="explainJqVisible"
  894. >
  895. </explainJq>
  896. <explainJs
  897. @close="
  898. () => {
  899. explainJsVisible = false;
  900. }
  901. "
  902. :explainJs="problemList[problemListIndex].explainJs"
  903. :explainjsmp3="problemList[problemListIndex].explainjsmp3"
  904. :show="explainJsVisible"
  905. ></explainJs>
  906. </view>
  907. </view>
  908. </template>
  909. <script>
  910. import countDown from "@/components/countDown/index";
  911. import mRadio from "@/components/m-radio/m-radio.vue";
  912. import mRadioGroup from "@/components/m-radio-group/m-radio-group.vue";
  913. import mCheckbox from "@/components/m-checkbox/m-checkbox.vue";
  914. import mCheckboxGroup from "@/components/m-checkbox-group/m-checkbox-group.vue";
  915. import api from "@/api/index";
  916. import utils from "@/utils/index";
  917. import explainJq from "./components/explainJq.vue";
  918. import tabbar from "./components/tabbar.vue";
  919. import explainJs from "./components/explainJs.vue";
  920. import funList from "./components/funList.vue";
  921. let origProblemList = [];
  922. export default {
  923. data() {
  924. return {
  925. //topic
  926. //isCollect
  927. isAutoReadTopics: false,
  928. mode: 0,
  929. problemList: [
  930. {
  931. questionType: 2,
  932. answer: "×",
  933. answerkeyword: "",
  934. isCollect: false,
  935. answermp3: "https://ndata.zzxcx.net/kt/answer_mp3/answer1389.mp3",
  936. classIssue: "54",
  937. classIssueName: "车内开关/装置",
  938. classSort: 16,
  939. createTime: "2022-04-21 13:33:46",
  940. excellIssue: "23",
  941. excellIssueName: "必学题三",
  942. excellSort: 4,
  943. explainGif: "https://ndata.zzxcx.net/kt/explain_gif/explain1389.gif",
  944. explainJq:
  945. "看图答题:红色圆圈套在杆子中间.答对;不在中间或没有圆圈的.答错。",
  946. explainJs:
  947. "图中所示为左右转向灯开关转向灯操作:上提是右转向灯亮起,下压是左转向灯。",
  948. explainMp3: "https://ndata.zzxcx.net/kt/explain_mp3/explain1389.mp3",
  949. explainjsmp3:
  950. "https://ndata.zzxcx.net/kt/explain_js_mp3/explainJS1389.mp3",
  951. id: 831,
  952. idKt: 1389,
  953. idYdt: 950,
  954. image: "https://ndata.zzxcx.net/kt/image/image1389.png",
  955. imageYdt:
  956. "https://ndata.zzxcx.net/kt/image_ydt/5eb4d75agw1e291vmniovj.jpg",
  957. issue: "将转向灯开关向上提,左转向灯亮。",
  958. issuemp3: "https://ndata.zzxcx.net/kt/issue_mp3/issue1389.mp3",
  959. isNew: 0,
  960. liceBus: "1",
  961. liceCar: "1",
  962. liceMoto: null,
  963. liceTruck: "1",
  964. number: 831,
  965. opts: "√-×",
  966. optsArr: ["√", "×"],
  967. placeIssue: null,
  968. placeIssueName: null,
  969. placeSort: null,
  970. questionType: 1,
  971. sequeIssue: "7",
  972. sequeIssueName: "机械仪表",
  973. sequeSort: 25,
  974. skillkeyword: "没有圆圈-答错",
  975. subject: 1,
  976. titlekeyword: "",
  977. updateTime: "2022-04-22 13:43:07",
  978. userAnswer: [],
  979. },
  980. ],
  981. judgMap: {
  982. "√": "正确",
  983. "×": "错误",
  984. },
  985. gsMap: {
  986. xc: "小车",
  987. hc: "货车",
  988. mtc: "摩托车",
  989. kc: "客车",
  990. },
  991. examTime: 1000 * 60 * 45,
  992. useTime: "",
  993. problemListTotal: 1,
  994. explainJqVisible: false,
  995. selectProblemListVisible: false,
  996. explainJsVisible: false,
  997. trueNum: 0,
  998. falseNum: 0,
  999. errQuestionIds: [],
  1000. };
  1001. },
  1002. watch: {
  1003. //specify
  1004. problemListIndex(newValue, oldValue) {
  1005. if (this.isAutoReadTopics) {
  1006. let audio = utils.wxUtils.getGlobAudio();
  1007. audio.stop();
  1008. audio.src = this.problemList[this.problemListIndex].issuemp3;
  1009. audio.play();
  1010. }
  1011. if (this.allowMemory) {
  1012. let key = `${uni.getStorageSync("userInfo").xcxOpenid}_${
  1013. this.query.cert
  1014. }_${this.query.subject == 1 ? "科目一" : "科目四"}_${
  1015. this.query.title
  1016. }_${
  1017. this.query.classIssueName ||
  1018. this.query.placeIssueName ||
  1019. this.query.excellIssueName ||
  1020. this.query.sequeIssueName
  1021. }`;
  1022. uni.setStorageSync(key, this.problemListIndex);
  1023. }
  1024. },
  1025. },
  1026. methods: {
  1027. getUseTime(leftTime, useTime) {
  1028. this.useTime = useTime;
  1029. },
  1030. stopAudio() {
  1031. let audio = utils.wxUtils.getGlobAudio();
  1032. audio.stop();
  1033. },
  1034. playCurrentIssue() {
  1035. let audio = utils.wxUtils.getGlobAudio();
  1036. audio.stop();
  1037. audio.src = this.problemList[this.problemListIndex].issuemp3;
  1038. audio.play();
  1039. },
  1040. createCompleteProblemList() {
  1041. if (this.mode == 2) {
  1042. return;
  1043. }
  1044. let problemList = JSON.parse(JSON.stringify(origProblemList));
  1045. problemList.forEach((item) => {
  1046. item.optsArr.forEach((_item) => {
  1047. if (_item.isAnswer) {
  1048. _item.selected = true;
  1049. }
  1050. });
  1051. item.isCompleted = true;
  1052. });
  1053. this.trueNum = 0;
  1054. this.falseNum = 0;
  1055. this.problemList = problemList;
  1056. this.$emit("update:problemListIndex", 0);
  1057. },
  1058. createOrderProblemList() {
  1059. if (this.mode == 0) {
  1060. return;
  1061. }
  1062. let problemList = JSON.parse(JSON.stringify(origProblemList));
  1063. console.log(problemList);
  1064. console.log(origProblemList);
  1065. this.problemList = problemList;
  1066. this.trueNum = 0;
  1067. this.falseNum = 0;
  1068. //初始化序号
  1069. this.$emit("update:problemListIndex", 0);
  1070. },
  1071. createRandomProblemList() {
  1072. if (this.mode == 1) {
  1073. return;
  1074. }
  1075. let problemList = JSON.parse(JSON.stringify(origProblemList));
  1076. problemList.sort(function () {
  1077. return Math.random() - 0.5;
  1078. });
  1079. this.problemList = problemList;
  1080. this.trueNum = 0;
  1081. this.falseNum = 0;
  1082. //初始化序号
  1083. this.$emit("update:problemListIndex", 0);
  1084. },
  1085. goBeforeTopics() {
  1086. if (this.problemListIndex <= 0) {
  1087. uni.showToast({
  1088. title: "到底了",
  1089. icon: "none",
  1090. });
  1091. return;
  1092. }
  1093. // this.problemListIndex = this.problemListIndex - 1;
  1094. this.$emit("update:problemListIndex", this.problemListIndex - 1);
  1095. },
  1096. goNextTopics() {
  1097. if (this.problemListIndex >= this.problemList.length - 1) {
  1098. uni.showToast({
  1099. title: "到底了",
  1100. icon: "none",
  1101. });
  1102. return;
  1103. }
  1104. // this.problemListIndex = this.problemListIndex + 1;
  1105. console.log(this.problemListIndex + 1);
  1106. this.$emit("update:problemListIndex", this.problemListIndex + 1);
  1107. },
  1108. completeQuestion() {
  1109. this.problemList[this.problemListIndex].optsArr.forEach((item, index) => {
  1110. if (item.isAnswer) {
  1111. this.$set(
  1112. this.problemList[this.problemListIndex].optsArr[index],
  1113. "selected",
  1114. true
  1115. );
  1116. }
  1117. });
  1118. this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
  1119. this.$set(
  1120. this.problemList[this.problemListIndex],
  1121. "userAnswer",
  1122. this.problemList[this.problemListIndex].answer
  1123. );
  1124. },
  1125. submitExam(e) {
  1126. let score = 0;
  1127. let query = this.query;
  1128. let that = this;
  1129. let scorePerQuestion = 0;
  1130. console.log(query);
  1131. query.subject === "4" ? (scorePerQuestion = 2) : (scorePerQuestion = 1);
  1132. score = this.trueNum * scorePerQuestion;
  1133. uni.showModal({
  1134. title: "是否交卷",
  1135. content: "交卷后不可再修改了",
  1136. async success(res) {
  1137. if (res.confirm) {
  1138. uni.showLoading({
  1139. title: "提交成绩中",
  1140. });
  1141. await api.exam.studentScoreInfo({
  1142. score: score,
  1143. kskm: query.subject,
  1144. type: that.gsMap[query.gs],
  1145. });
  1146. uni.hideLoading();
  1147. let useTime = that.useTime;
  1148. uni.navigateTo({
  1149. url:
  1150. "/otherPages/mockExamEnd/index?" +
  1151. utils.mapToUrlQuery({
  1152. score,
  1153. useTime,
  1154. questionIds: that.errQuestionIds.join(","),
  1155. type: that.type,
  1156. ...that.query,
  1157. }),
  1158. });
  1159. }
  1160. },
  1161. fail() {},
  1162. });
  1163. },
  1164. collectTopics(e) {
  1165. let storageName =
  1166. uni.getStorageSync("userInfo").xcxOpenid +
  1167. "_userCollectionIds_" +
  1168. this.query.subject;
  1169. let userCollectionIds = uni.getStorageSync(storageName) || [];
  1170. if (!this.problemList[this.problemListIndex].isCollect) {
  1171. if (
  1172. !userCollectionIds.some((item) => {
  1173. return item.id === this.problemList[this.problemListIndex].id;
  1174. })
  1175. ) {
  1176. userCollectionIds.push({
  1177. id: this.problemList[this.problemListIndex].id,
  1178. timestamp: +new Date(),
  1179. });
  1180. uni.setStorageSync(storageName, userCollectionIds);
  1181. }
  1182. this.$set(this.problemList[this.problemListIndex], "isCollect", true);
  1183. uni.showToast({
  1184. title: "收藏成功",
  1185. });
  1186. } else {
  1187. if (
  1188. userCollectionIds.indexOf(
  1189. this.problemList[this.problemListIndex].id
  1190. ) > 0
  1191. ) {
  1192. userCollectionIds.splice(
  1193. userCollectionIds.indexOf(
  1194. this.problemList[this.problemListIndex].id
  1195. ),
  1196. 1
  1197. );
  1198. uni.setStorageSync(storageName, userCollectionIds);
  1199. }
  1200. this.$set(this.problemList[this.problemListIndex], "isCollect", false);
  1201. uni.showToast({
  1202. title: "取消收藏",
  1203. icon: "fail",
  1204. });
  1205. }
  1206. // api.exam
  1207. // .studentQuestionCollection({
  1208. // questionId: this.problemList[this.problemListIndex].id,
  1209. // carType: this.gsMap[this.query.gs],
  1210. // km: this.query.subject === "4" ? "科目四" : "科目一",
  1211. // })
  1212. // .then((res) => {
  1213. // if (!this.problemList[this.problemListIndex].isCollect) {
  1214. // this.$set(
  1215. // this.problemList[this.problemListIndex],
  1216. // "isCollect",
  1217. // true
  1218. // );
  1219. // uni.showToast({
  1220. // title: "收藏成功",
  1221. // });
  1222. // } else {
  1223. // this.$set(
  1224. // this.problemList[this.problemListIndex],
  1225. // "isCollect",
  1226. // false
  1227. // );
  1228. // uni.showToast({
  1229. // title: "取消收藏",
  1230. // icon: "fail",
  1231. // });
  1232. // }
  1233. // });
  1234. },
  1235. readQuestionAndAnswer() {
  1236. let globalAudio = utils.wxUtils.getGlobAudio();
  1237. if (globalAudio) {
  1238. globalAudio.src = this.problemList[this.problemListIndex].issuemp3;
  1239. globalAudio.stop();
  1240. globalAudio.play();
  1241. globalAudio.onEnded(() => {
  1242. globalAudio.src = this.problemList[this.problemListIndex].answermp3;
  1243. globalAudio.stop();
  1244. globalAudio.play();
  1245. globalAudio.offEnded();
  1246. });
  1247. }
  1248. },
  1249. readQuestion() {
  1250. let globalAudio = utils.wxUtils.getGlobAudio();
  1251. if (globalAudio) {
  1252. globalAudio.src = this.problemList[this.problemListIndex].issuemp3;
  1253. globalAudio.stop();
  1254. globalAudio.play();
  1255. }
  1256. },
  1257. numberToLetter(index) {
  1258. index = Number(index);
  1259. return String.fromCharCode(index + 65);
  1260. },
  1261. confirmMult(e) {
  1262. let storageName =
  1263. uni.getStorageSync("userInfo").xcxOpenid +
  1264. "_userWrongIds_" +
  1265. this.query.subject;
  1266. this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
  1267. if (
  1268. JSON.stringify(
  1269. this.problemList[this.problemListIndex].answer.split("-").sort()
  1270. ) ===
  1271. JSON.stringify(
  1272. this.problemList[this.problemListIndex].userAnswer.sort()
  1273. )
  1274. ) {
  1275. this.trueNum++;
  1276. this.$emit("update:trueNum", this.trueNum);
  1277. } else {
  1278. this.falseNum++;
  1279. this.$emit("update:falseNum", this.falseNum);
  1280. this.errQuestionIds.includes(this.problemList[this.problemListIndex].id)
  1281. ? ""
  1282. : this.errQuestionIds.push(
  1283. this.problemList[this.problemListIndex].id
  1284. );
  1285. let userWrongIds = uni.getStorageSync(storageName) || [];
  1286. if (
  1287. !userWrongIds.some((item) => {
  1288. return item.id === this.problemList[this.problemListIndex].id;
  1289. })
  1290. ) {
  1291. userWrongIds.push({
  1292. id: this.problemList[this.problemListIndex].id,
  1293. timestamp: +new Date(),
  1294. });
  1295. uni.setStorageSync(storageName, userWrongIds);
  1296. }
  1297. // 目前改为保存本地
  1298. // api.exam.studentQuestionWrong({
  1299. // questionId: this.problemList[this.problemListIndex].id,
  1300. // carType: this.gsMap[this.query.gs],
  1301. // km: this.query.subject === "4" ? "科目四" : "科目一",
  1302. // });
  1303. }
  1304. // this.problemList[this.problemListIndex]
  1305. },
  1306. changeCheckboxGroup(e) {
  1307. //console.log(e);
  1308. // this.$set()
  1309. // #ifdef MP-WEIXIN
  1310. this.$set(
  1311. this.problemList[this.problemListIndex],
  1312. "userAnswer",
  1313. e.detail
  1314. );
  1315. this.problemList[this.problemListIndex].optsArr.forEach((item) => {
  1316. if (e.detail.includes(item.value)) {
  1317. item.selected = true;
  1318. } else {
  1319. item.selected = false;
  1320. }
  1321. });
  1322. //#endif
  1323. // #ifdef MP-TOUTIAO
  1324. this.$set(
  1325. this.problemList[this.problemListIndex],
  1326. "userAnswer",
  1327. e.detail
  1328. );
  1329. this.problemList[this.problemListIndex].optsArr.forEach((item, index) => {
  1330. if (e.detail.includes(item.value)) {
  1331. item.selected = true;
  1332. this.$set(
  1333. this.problemList[this.problemListIndex].optsArr[index],
  1334. "selected",
  1335. true
  1336. );
  1337. } else {
  1338. item.selected = false;
  1339. this.$set(
  1340. this.problemList[this.problemListIndex].optsArr[index],
  1341. "selected",
  1342. false
  1343. );
  1344. }
  1345. });
  1346. //#endif
  1347. // if (
  1348. // this.problemList[this.problemListIndex].answer
  1349. // .split("-")
  1350. // .sort()
  1351. // .toString() ===
  1352. // this.problemList[this.problemListIndex].userAnswer.sort().toString()
  1353. // ) {
  1354. // this.trueNum = this.trueNum + 1;
  1355. // this.$emit("update:trueNum", this.trueNum);
  1356. // } else {
  1357. // this.falseNum = this.falseNum + 1;
  1358. // this.$emit("update:falseNum", this.falseNum);
  1359. // }
  1360. //score=1&useTime=NaN%3ANaN&questionIds=&type=&cert=C1%2FC2%2FC3&vehicle=%E8%BD%BF%E8%BD%A6&subject=1&title=%E9%A1%BA%E5%BA%8F%E7%BB%83%E4%B9%A0&liceCar=1&liceTruck=&liceBus=&liceMoto=&name=%E7%A7%91%E7%9B%AE%E4%B8%80&gs=xc&sort=3&sequeIssueName=%E7%BB%83%E4%B9%A0%E4%B8%80&__id__=3
  1361. },
  1362. changeRadioGroup(e) {
  1363. console.log(e, "changeRadioGroup");
  1364. // #ifdef MP-WEIXIN
  1365. let storageName =
  1366. uni.getStorageSync("userInfo").xcxOpenid +
  1367. "_userWrongIds_" +
  1368. this.query.subject;
  1369. this.$set(this.problemList[this.problemListIndex], "isCompleted", true);
  1370. if (e.detail == this.problemList[this.problemListIndex].answer) {
  1371. this.trueNum = this.trueNum + 1;
  1372. this.$emit("update:trueNum", this.trueNum);
  1373. } else {
  1374. this.falseNum = this.falseNum + 1;
  1375. let userWrongIds = uni.getStorageSync(storageName) || [];
  1376. if (
  1377. !userWrongIds.some((item) => {
  1378. return item.id === this.problemList[this.problemListIndex].id;
  1379. })
  1380. ) {
  1381. userWrongIds.push({
  1382. id: this.problemList[this.problemListIndex].id,
  1383. timestamp: +new Date(),
  1384. });
  1385. uni.setStorageSync(storageName, userWrongIds);
  1386. }
  1387. //目前改为保存在本地,降低服务器压力
  1388. // api.exam.studentQuestionWrong({
  1389. // questionId: this.problemList[this.problemListIndex].id,
  1390. // carType: this.gsMap[this.query.gs],
  1391. // km: this.query.subject === "4" ? "科目四" : "科目一",
  1392. // });
  1393. this.$emit("update:falseNum", this.falseNum);
  1394. this.errQuestionIds.includes(this.problemList[this.problemListIndex].id)
  1395. ? ""
  1396. : this.errQuestionIds.push(
  1397. this.problemList[this.problemListIndex].id
  1398. );
  1399. console.log(this.errQuestionIds);
  1400. }
  1401. this.$set(
  1402. this.problemList[this.problemListIndex],
  1403. "userAnswer",
  1404. e.detail
  1405. );
  1406. this.optsArr = this.problemList[this.problemListIndex].optsArr.map(
  1407. (item) => {
  1408. item.selected = item.value == e.detail;
  1409. }
  1410. );
  1411. // e.detail.value === this.problemList[this.problemListIndex].answer
  1412. // ? (this.trueNum = this.trueNum + 1)
  1413. // : (this.falseNum = this.falseNum + 1);
  1414. //#endif
  1415. },
  1416. },
  1417. filters: {
  1418. questionType: function (value) {
  1419. let question = "";
  1420. switch (value) {
  1421. case 1:
  1422. case "1":
  1423. question = "判断题";
  1424. break;
  1425. case 2:
  1426. case "2":
  1427. question = "单选题";
  1428. break;
  1429. case 3:
  1430. case "3":
  1431. question = "多选题";
  1432. break;
  1433. }
  1434. return question;
  1435. },
  1436. },
  1437. components: {
  1438. mRadio,
  1439. mRadioGroup,
  1440. mCheckbox,
  1441. mCheckboxGroup,
  1442. explainJq,
  1443. tabbar,
  1444. explainJs,
  1445. funList,
  1446. countDown,
  1447. },
  1448. props: {
  1449. midFunc: {
  1450. type: Array,
  1451. default: () => {
  1452. return [];
  1453. },
  1454. },
  1455. bottomFunc: {
  1456. type: Array,
  1457. default: () => {
  1458. return [];
  1459. },
  1460. },
  1461. hiddenAnswer: {
  1462. type: Boolean,
  1463. default: false,
  1464. },
  1465. allowMemory: {
  1466. type: Boolean,
  1467. default: false,
  1468. },
  1469. hiddenFunction: {
  1470. type: Boolean,
  1471. default: false,
  1472. },
  1473. hiddenMode: {
  1474. type: Boolean,
  1475. default: false,
  1476. },
  1477. problemListTotal: {
  1478. type: Number,
  1479. default: 0,
  1480. },
  1481. query: {
  1482. type: Object,
  1483. default: () => {
  1484. return {};
  1485. },
  1486. },
  1487. type: {
  1488. type: String,
  1489. default: "",
  1490. },
  1491. problemListIndex: {
  1492. type: Number,
  1493. default: 0,
  1494. },
  1495. },
  1496. mounted() {
  1497. let that = this;
  1498. let storageName = "";
  1499. uni.showLoading({
  1500. title: "加载题目中",
  1501. });
  1502. //记忆题目
  1503. let key = `${uni.getStorageSync("userInfo").xcxOpenid}_${this.query.cert}_${
  1504. this.query.subject == 1 ? "科目一" : "科目四"
  1505. }_${this.query.title}_${
  1506. this.query.classIssueName ||
  1507. this.query.placeIssueName ||
  1508. this.query.excellIssueName ||
  1509. this.query.sequeIssueName
  1510. }`;
  1511. // if (this.allowMemory && uni.getStorageSync(key)) {
  1512. // uni.showModal({
  1513. // title:"回到上次的题目",
  1514. // content:`你上次做到第${uni.getStorageSync(key)}题,是否前往`,
  1515. // success(res){
  1516. // if(res.confirm){
  1517. // this.problemListIndex = Number(uni.getStorageSync(key))
  1518. // }
  1519. // }
  1520. // })
  1521. // }
  1522. switch (that.type) {
  1523. case "specify":
  1524. api.exam
  1525. .studentQuestionInfoGetQuestionInfoByIds({
  1526. ids: this.query.questionIds,
  1527. })
  1528. .then((res) => {
  1529. res.rows.forEach((element) => {
  1530. element.optsArr = [];
  1531. element.isCollect = false;
  1532. element.opts.split("-").forEach((item, index) => {
  1533. if (element.questionType == 3) {
  1534. element.optsArr.push({
  1535. selected: false,
  1536. value: item,
  1537. index: index,
  1538. isAnswer: element.answer.split("-").includes(item),
  1539. });
  1540. } else {
  1541. element.optsArr.push({
  1542. selected: false,
  1543. value: item,
  1544. index: index,
  1545. isAnswer: item === element.answer,
  1546. });
  1547. }
  1548. });
  1549. element.isCompleted = false;
  1550. element.userAnswer = [];
  1551. });
  1552. that.problemListTotal = res.total;
  1553. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1554. that.problemList = res.rows;
  1555. that.$emit("update:problemListTotal", res.total);
  1556. uni.hideLoading();
  1557. if (this.allowMemory && uni.getStorageSync(key)) {
  1558. uni.showModal({
  1559. title: "回到上次的题目",
  1560. content: `你上次做到第${
  1561. uni.getStorageSync(key) + 1
  1562. }题,是否前往`,
  1563. success: (res) => {
  1564. if (res.confirm) {
  1565. this.$emit(
  1566. "update:problemListIndex",
  1567. uni.getStorageSync(key)
  1568. );
  1569. } else {
  1570. uni.setStorageSync(key, 0);
  1571. }
  1572. },
  1573. });
  1574. }
  1575. });
  1576. break;
  1577. case "exam":
  1578. api.exam
  1579. .studentQuestionInfoSelectTestQuestionInfo({
  1580. gs: this.query.gs,
  1581. subject: this.query.subject,
  1582. })
  1583. .then((res) => {
  1584. res.rows.forEach((element) => {
  1585. element.optsArr = [];
  1586. element.isCollect = false;
  1587. element.opts.split("-").forEach((item, index) => {
  1588. if (element.questionType == 3) {
  1589. element.optsArr.push({
  1590. selected: false,
  1591. value: item,
  1592. index: index,
  1593. isAnswer: element.answer.split("-").includes(item),
  1594. });
  1595. } else {
  1596. element.optsArr.push({
  1597. selected: false,
  1598. value: item,
  1599. index: index,
  1600. isAnswer: item === element.answer,
  1601. });
  1602. }
  1603. });
  1604. element.isCompleted = false;
  1605. element.userAnswer = [];
  1606. });
  1607. that.problemListTotal = res.total;
  1608. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1609. that.problemList = res.rows;
  1610. that.$emit("update:problemListTotal", res.total);
  1611. uni.hideLoading();
  1612. if (this.allowMemory && uni.getStorageSync(key)) {
  1613. uni.showModal({
  1614. title: "回到上次的题目",
  1615. content: `你上次做到第${
  1616. uni.getStorageSync(key) + 1
  1617. }题,是否前往`,
  1618. success: (res) => {
  1619. if (res.confirm) {
  1620. this.$emit(
  1621. "update:problemListIndex",
  1622. uni.getStorageSync(key)
  1623. );
  1624. } else {
  1625. uni.setStorageSync(key, 0);
  1626. }
  1627. },
  1628. });
  1629. }
  1630. });
  1631. break;
  1632. case "free":
  1633. api.open
  1634. .questionInfoSelectFreeQuestionInfo({
  1635. ...this.query,
  1636. })
  1637. .then((res) => {
  1638. res.rows.forEach((element) => {
  1639. element.optsArr = [];
  1640. element.opts.split("-").forEach((item, index) => {
  1641. if (element.questionType == 3) {
  1642. element.optsArr.push({
  1643. selected: false,
  1644. value: item,
  1645. index: index,
  1646. isAnswer: element.answer.split("-").includes(item),
  1647. });
  1648. } else {
  1649. element.optsArr.push({
  1650. selected: false,
  1651. value: item,
  1652. index: index,
  1653. isAnswer: item === element.answer,
  1654. });
  1655. }
  1656. });
  1657. element.isCompleted = false;
  1658. element.userAnswer = [];
  1659. });
  1660. that.problemList = res.rows;
  1661. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1662. that.problemListTotal = res.total;
  1663. uni.hideLoading();
  1664. });
  1665. break;
  1666. case "wrong":
  1667. //studentQuestionWrongWrongByUser(废弃)
  1668. storageName =
  1669. uni.getStorageSync("userInfo").xcxOpenid +
  1670. "_userWrongIds_" +
  1671. this.query.subject;
  1672. api.exam
  1673. .studentQuestionInfoGetQuestionInfoByIds({
  1674. ids: uni.getStorageSync(storageName)
  1675. ? uni
  1676. .getStorageSync(storageName)
  1677. .map((item) => {
  1678. return item.id;
  1679. })
  1680. : null,
  1681. })
  1682. .then((res) => {
  1683. console.log(res);
  1684. res.rows.forEach((element) => {
  1685. element.optsArr = [];
  1686. element.opts.split("-").forEach((item, index) => {
  1687. if (element.questionType == 3) {
  1688. element.optsArr.push({
  1689. selected: false,
  1690. value: item,
  1691. index: index,
  1692. isAnswer: element.answer.split("-").includes(item),
  1693. });
  1694. } else {
  1695. element.optsArr.push({
  1696. selected: false,
  1697. value: item,
  1698. index: index,
  1699. isAnswer: item === element.answer,
  1700. });
  1701. }
  1702. });
  1703. element.isCompleted = false;
  1704. element.userAnswer = [];
  1705. });
  1706. that.problemListTotal = res.total;
  1707. that.problemList = res.rows;
  1708. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1709. that.$emit("update:problemListTotal", res.rows.length);
  1710. uni.hideLoading();
  1711. });
  1712. break;
  1713. case "collect":
  1714. storageName =
  1715. uni.getStorageSync("userInfo").xcxOpenid +
  1716. "_userCollectionIds_" +
  1717. this.query.subject;
  1718. api.exam
  1719. .studentQuestionInfoGetQuestionInfoByIds({
  1720. ids: uni.getStorageSync(storageName)
  1721. ? uni
  1722. .getStorageSync(storageName)
  1723. .map((item) => {
  1724. return item.id;
  1725. })
  1726. : null,
  1727. })
  1728. .then((res) => {
  1729. console.log(res);
  1730. res.rows.forEach((element) => {
  1731. element.optsArr = [];
  1732. element.opts.split("-").forEach((item, index) => {
  1733. if (element.questionType == 3) {
  1734. element.optsArr.push({
  1735. selected: false,
  1736. value: item,
  1737. index: index,
  1738. isAnswer: element.answer.split("-").includes(item),
  1739. });
  1740. } else {
  1741. element.optsArr.push({
  1742. selected: false,
  1743. value: item,
  1744. index: index,
  1745. isAnswer: item === element.answer,
  1746. });
  1747. }
  1748. });
  1749. element.isCompleted = false;
  1750. element.isCollect = true;
  1751. element.userAnswer = [];
  1752. });
  1753. that.problemListTotal = res.total;
  1754. that.problemList = res.rows;
  1755. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1756. that.$emit("update:problemListTotal", res.rows.length);
  1757. uni.hideLoading();
  1758. });
  1759. break;
  1760. case "mi":
  1761. api.exam
  1762. .studentQuestionInfoSelectMiQuestionInfoList({
  1763. category: this.query.category,
  1764. gs: this.query.gs,
  1765. kemu: this.query.subject,
  1766. })
  1767. .then((res) => {
  1768. console.log(res);
  1769. res.rows.forEach((element) => {
  1770. element.optsArr = [];
  1771. element.opts.split("-").forEach((item, index) => {
  1772. if (element.questionType == 3) {
  1773. element.optsArr.push({
  1774. selected: false,
  1775. value: item,
  1776. index: index,
  1777. isAnswer: element.answer.split("-").includes(item),
  1778. });
  1779. } else {
  1780. element.optsArr.push({
  1781. selected: false,
  1782. value: item,
  1783. index: index,
  1784. isAnswer: item === element.answer,
  1785. });
  1786. }
  1787. });
  1788. element.isCompleted = false;
  1789. element.userAnswer = [];
  1790. });
  1791. that.problemListTotal = res.total;
  1792. that.problemList = res.rows;
  1793. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1794. that.$emit("update:problemListTotal", res.rows.length);
  1795. uni.hideLoading();
  1796. });
  1797. break;
  1798. default:
  1799. api.exam
  1800. .studentQuestionInfoList({
  1801. ...this.query,
  1802. })
  1803. .then((res) => {
  1804. res.rows.forEach((element) => {
  1805. element.optsArr = [];
  1806. element.opts.split("-").forEach((item, index) => {
  1807. if (element.questionType == 3) {
  1808. element.optsArr.push({
  1809. selected: false,
  1810. value: item,
  1811. index: index,
  1812. isAnswer: element.answer.split("-").includes(item),
  1813. });
  1814. } else {
  1815. element.optsArr.push({
  1816. selected: false,
  1817. value: item,
  1818. index: index,
  1819. isAnswer: item === element.answer,
  1820. });
  1821. }
  1822. });
  1823. element.isCompleted = false;
  1824. element.userAnswer = [];
  1825. });
  1826. that.problemListTotal = res.total;
  1827. that.problemList = res.rows;
  1828. origProblemList = JSON.parse(JSON.stringify(res.rows));
  1829. that.$emit("update:problemListTotal", res.total);
  1830. uni.hideLoading();
  1831. if (this.allowMemory && uni.getStorageSync(key)) {
  1832. uni.showModal({
  1833. title: "回到上次的题目",
  1834. content: `你上次做到第${
  1835. uni.getStorageSync(key) + 1
  1836. }题,是否前往`,
  1837. success: (res) => {
  1838. if (res.confirm) {
  1839. this.$emit(
  1840. "update:problemListIndex",
  1841. uni.getStorageSync(key)
  1842. );
  1843. } else {
  1844. uni.setStorageSync(key, 0);
  1845. }
  1846. },
  1847. });
  1848. }
  1849. });
  1850. break;
  1851. }
  1852. },
  1853. };
  1854. </script>
  1855. <style>
  1856. .pt15 {
  1857. padding-left: 15rpx;
  1858. }
  1859. .pb15 {
  1860. padding-bottom: 15rpx;
  1861. }
  1862. .mt15 {
  1863. margin-top: 15rpx;
  1864. }
  1865. .mb15 {
  1866. margin-bottom: 15rpx;
  1867. }
  1868. #watermark {
  1869. width: 100%;
  1870. height: 100%;
  1871. position: absolute;
  1872. left: 0;
  1873. top: 0;
  1874. }
  1875. </style>
  1876. <style lang="scss" scoped>
  1877. .m-do-topic {
  1878. padding-bottom: constant(safe-area-inset-bottom);
  1879. padding-bottom: env(safe-area-inset-bottom);
  1880. }
  1881. .problem-fontsize {
  1882. font-size: $uni-app-fontsize-topic;
  1883. }
  1884. .pb80px {
  1885. padding-bottom: 80px;
  1886. }
  1887. .pb50px {
  1888. padding-bottom: 50px;
  1889. }
  1890. .pl30 {
  1891. padding-left: 30rpx;
  1892. }
  1893. .custom-tabbar {
  1894. position: fixed;
  1895. bottom: 0;
  1896. left: 0;
  1897. width: 100%;
  1898. background: #fff;
  1899. padding-bottom: constant(safe-area-inset-bottom);
  1900. /*兼容 IOS<11.2*/
  1901. box-sizing: content-box;
  1902. padding-bottom: env(safe-area-inset-bottom);
  1903. .ipone-bottom {
  1904. /*兼容 IOS>11.2*/
  1905. display: flex;
  1906. flex-direction: wrap;
  1907. height: 50px;
  1908. width: 100%;
  1909. }
  1910. .custom-tabbar-item {
  1911. flex: 1;
  1912. height: 50px;
  1913. display: flex;
  1914. flex-direction: column;
  1915. align-items: center;
  1916. justify-content: space-around;
  1917. font-size: 26rpx;
  1918. }
  1919. }
  1920. .submit {
  1921. width: 100%;
  1922. display: flex;
  1923. justify-content: center;
  1924. align-items: center;
  1925. padding-top: 8rpx;
  1926. .submit-button {
  1927. width: 60%;
  1928. background: #498ef5;
  1929. color: #fff;
  1930. text-align: center;
  1931. line-height: 30px;
  1932. height: 30px;
  1933. border-radius: 20rpx;
  1934. }
  1935. }
  1936. .jqIcon {
  1937. position: absolute;
  1938. top: -15rpx;
  1939. left: 50%;
  1940. transform: translate(-50%, -40%);
  1941. width: 166rpx;
  1942. height: 166rpx;
  1943. z-index: 10;
  1944. }
  1945. .answer {
  1946. padding-left: 16rpx;
  1947. padding-bottom: 16rpx;
  1948. padding-top: 16rpx;
  1949. > view {
  1950. padding-left: 16rpx;
  1951. background: #d8d8d8;
  1952. padding-bottom: 8rpx;
  1953. padding-top: 8rpx;
  1954. }
  1955. }
  1956. .pb16 {
  1957. padding-bottom: 16rpx;
  1958. }
  1959. .mode {
  1960. display: flex;
  1961. padding: 20rpx 30rpx;
  1962. justify-content: space-between;
  1963. border-top: 2rpx solid #d8d8d8;
  1964. .mode-item {
  1965. width: auto;
  1966. font-size: $uni-app-fontsize-paragraph;
  1967. background: #fff;
  1968. color: #498ef5;
  1969. text-align: center;
  1970. border-radius: 32rpx;
  1971. border: 1px solid #498ef5;
  1972. padding-left: 8rpx;
  1973. padding-right: 8rpx;
  1974. }
  1975. .mode-item_select {
  1976. color: #fff;
  1977. background: #498ef5;
  1978. }
  1979. }
  1980. .divider {
  1981. width: 100%;
  1982. height: 24rpx;
  1983. background-color: #f2f3f5;
  1984. }
  1985. .select-problem {
  1986. display: flex;
  1987. width: 100vw;
  1988. height: 100vh;
  1989. align-content: flex-end;
  1990. align-items: flex-end;
  1991. .problem-index {
  1992. width: 100vw;
  1993. height: 650rpx;
  1994. background: #fff;
  1995. border-top-right-radius: 16rpx;
  1996. border-top-left-radius: 16rpx;
  1997. padding-top: 50rpx;
  1998. -webkit-overflow-scrolling: touch;
  1999. }
  2000. .problem-bottom {
  2001. width: 100%;
  2002. display: flex;
  2003. height: 80rpx;
  2004. .problem-bottom-sure {
  2005. width: 50%;
  2006. height: 100%;
  2007. border-right: 2rpx solid #d8d8d8;
  2008. border-top: 2rpx solid #d8d8d8;
  2009. text-align: center;
  2010. color: #498ef5;
  2011. line-height: 80rpx;
  2012. }
  2013. .problem-bottom-close {
  2014. width: 100%;
  2015. height: 100%;
  2016. color: red;
  2017. text-align: center;
  2018. border-top: 2rpx solid #d8d8d8;
  2019. line-height: 80rpx;
  2020. }
  2021. }
  2022. .problem-header {
  2023. display: flex;
  2024. justify-content: space-between;
  2025. align-content: center;
  2026. align-items: center;
  2027. padding: 0rpx 30rpx;
  2028. .problem-header-left {
  2029. display: flex;
  2030. .problem-dui {
  2031. display: flex;
  2032. align-content: center;
  2033. align-items: center;
  2034. }
  2035. .problem-cuo {
  2036. display: flex;
  2037. align-content: center;
  2038. align-items: center;
  2039. }
  2040. }
  2041. .problem-header-right {
  2042. display: flex;
  2043. align-content: center;
  2044. }
  2045. }
  2046. .problem-body {
  2047. height: 480rpx;
  2048. padding-top: 30rpx;
  2049. overflow-y: scroll;
  2050. -webkit-overflow-scrolling: touch;
  2051. .problem-listBody {
  2052. display: inline-block;
  2053. overflow-y: scroll;
  2054. -webkit-overflow-scrolling: touch;
  2055. .problem-listItem {
  2056. display: inline-block;
  2057. width: 99rpx;
  2058. height: 99rpx;
  2059. line-height: 100rpx;
  2060. text-align: center;
  2061. border-radius: 50%;
  2062. border: 2rpx #d8d8d8 solid;
  2063. margin-bottom: 15rpx;
  2064. margin-left: 13rpx;
  2065. margin-right: 13rpx;
  2066. font-size: 40rpx;
  2067. }
  2068. .problem-listItem_current {
  2069. background: rgba(138, 144, 153, 0.15);
  2070. border-color: #bfbfbf;
  2071. color: #5c6066;
  2072. }
  2073. .problem-listItem_dui {
  2074. background: #c1e6db;
  2075. color: #4eb79a;
  2076. border-color: #4eb79a;
  2077. }
  2078. .problem-listItem_cuo {
  2079. background: #ffbcbe;
  2080. color: #e65055;
  2081. border-color: #e65055;
  2082. }
  2083. }
  2084. }
  2085. }
  2086. .tabbar-item {
  2087. display: flex;
  2088. flex-wrap: wrap;
  2089. justify-content: center;
  2090. text-align: center;
  2091. align-content: space-around;
  2092. align-items: space-around;
  2093. }
  2094. .mt30 {
  2095. margin-top: 30rpx;
  2096. }
  2097. .flex-center {
  2098. display: flex;
  2099. justify-content: center;
  2100. }
  2101. .problem-box {
  2102. padding-top: 15rpx;
  2103. padding-left: 15rpx;
  2104. padding-right: 15rpx;
  2105. background: #fff;
  2106. position: relative;
  2107. .new-rule {
  2108. color: red;
  2109. font-size: 16rpx;
  2110. }
  2111. /deep/ .van-checkbox {
  2112. padding-bottom: 15rpx;
  2113. }
  2114. /deep/ .van-radio {
  2115. padding-bottom: 15rpx;
  2116. }
  2117. .problem-issue {
  2118. font-size: $uni-app-fontsize-topic;
  2119. font-weight: 500;
  2120. }
  2121. .problem-select {
  2122. display: flex;
  2123. align-content: center;
  2124. align-items: center;
  2125. padding-top: 16rpx;
  2126. padding-bottom: 16rpx;
  2127. }
  2128. .problem-type {
  2129. padding-left: 10rpx;
  2130. padding-right: 10rpx;
  2131. padding-top: 4rpx;
  2132. padding-bottom: 4rpx;
  2133. font-size: 24rpx;
  2134. border-radius: 16rpx 16rpx 0 16rpx;
  2135. background: #498ef5;
  2136. margin-right: 10rpx;
  2137. color: #fff;
  2138. font-size: 32rpx;
  2139. }
  2140. .problem-ops {
  2141. margin-top: 30rpx;
  2142. padding-left: 30rpx;
  2143. font-size: $uni-app-fontsize-paragraph;
  2144. .problem-checkbox {
  2145. height: 100rpx;
  2146. margin-bottom: 30rpx;
  2147. }
  2148. }
  2149. .problem-op {
  2150. width: 75rpx;
  2151. height: 75rpx;
  2152. line-height: 75rpx;
  2153. border-radius: 50%;
  2154. text-align: center;
  2155. overflow: hidden;
  2156. background: #fff;
  2157. box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.16);
  2158. }
  2159. .problem-op_green {
  2160. width: 75rpx;
  2161. height: 75rpx;
  2162. line-height: 75rpx;
  2163. border-radius: 50%;
  2164. text-align: center;
  2165. overflow: hidden;
  2166. background: #01c18d;
  2167. color: #fff;
  2168. box-shadow: 0px 4rpx 12rpx rgba(0, 0, 0, 0.16);
  2169. }
  2170. .problem-op_selected {
  2171. background: #498ef5;
  2172. }
  2173. .problem-img {
  2174. width: 100%;
  2175. margin-top: 20rpx;
  2176. display: flex;
  2177. justify-content: center;
  2178. position: relative;
  2179. image {
  2180. margin: 0 auto;
  2181. }
  2182. }
  2183. }
  2184. .funcicon-list {
  2185. width: 100%;
  2186. display: flex;
  2187. font-size: $uni-app-fontsize-paragraph;
  2188. margin-top: 16rpx;
  2189. .funcicon-item {
  2190. display: flex;
  2191. flex-direction: row;
  2192. align-items: center;
  2193. padding: 0 20rpx;
  2194. height: 48rpx;
  2195. line-height: 48rpx;
  2196. border: 2rpx solid #8a9099;
  2197. border-radius: 20rpx;
  2198. margin-left: 10rpx;
  2199. color: #8a9099;
  2200. }
  2201. .funcicon-item_select {
  2202. border-color: #498ef5;
  2203. color: #498ef5;
  2204. }
  2205. }
  2206. .function-list {
  2207. width: 100%;
  2208. font-size: $uni-app-fontsize-paragraph;
  2209. display: flex;
  2210. justify-content: space-around;
  2211. flex-wrap: wrap;
  2212. padding: 8px;
  2213. box-sizing: border-box;
  2214. border-top: 2rpx solid #d8d8d8;
  2215. .function-item {
  2216. margin-bottom: 20px;
  2217. width: 20%;
  2218. display: flex;
  2219. flex-direction: column;
  2220. align-items: center;
  2221. font-size: $uni-app-fontsize-paragraph;
  2222. font-weight: 400;
  2223. color: #8a9099;
  2224. white-space: nowrap;
  2225. span {
  2226. margin-top: 5px;
  2227. }
  2228. }
  2229. }
  2230. </style>