wrongBank.vue 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477
  1. <template>
  2. <view id="questionBank">
  3. <swiper class="swiper" :current="current" @change="swiperChange" :interval="interval">
  4. <swiper-item v-for="(bank,bankIndex) in questionList" :key="bankIndex">
  5. <view class="pageContent">
  6. <view class="pad_8 titBox" >
  7. <view class="firstLetter">
  8. <view class="leftLetters">
  9. <view class="btnType">
  10. <text v-if="bank.type==1">单选</text>
  11. <text v-if="bank.type==2">多选</text>
  12. <text v-if="bank.type==3">判断</text>
  13. <text v-if="bank.type==4">案例题</text>
  14. <text v-if="bank.type==5">简答题</text>
  15. </view>
  16. <text>{{bankIndex+1}}/{{questionList.length}}</text>
  17. </view>
  18. <view style="color: #666;font-size: 28rpx;"></view>
  19. <view class="leftLetters"></view>
  20. </view>
  21. <view class="titles">
  22. <rich-text :nodes="bank.content"></rich-text>
  23. </view>
  24. </view>
  25. <template v-if="bank.type == 1">
  26. <view class="pad_8 titBox no-margin">
  27. <view v-if="!bank.ques">
  28. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="radioSelect(item.optionsId,bankIndex)">
  29. <view class="activeTI">{{ ast[index] }}</view>
  30. <view class="flex_auto">{{ item.content }}</view>
  31. </view>
  32. </view>
  33. <view v-if="bank.ques">
  34. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  35. <text :class="{right:(item.optionsId == bank.ques) || (item.optionsId == bank.ans),wrong:(item.optionsId == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  36. <view class="flex_auto">{{ item.content }}</view>
  37. </view>
  38. </view>
  39. </view>
  40. <view v-if="bank.ques">
  41. <view class="pad_8 answer">
  42. <view>正确答案:{{ast[bank.ans-1]}}</view>
  43. <view v-if="!explain">我的答案:{{ast[bank.ques-1]}}</view>
  44. </view>
  45. <view class="pad_8 answerInfos">
  46. <view class="answerTitle">答案解析</view>
  47. <view class="answerContent">
  48. <rich-text :nodes="bank.analysisContent"></rich-text>
  49. </view>
  50. </view>
  51. </view>
  52. </template>
  53. <template v-if="bank.type == 2">
  54. <view class="pad_8 titBox no-margin">
  55. <view v-if="!bank.ques">
  56. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty" @click="checkboxSelect(item.optionsId,bankIndex,index)">
  57. <view :class="{checked:item.checked}" class="activeTI">{{ ast[index] }}</view>
  58. <view class="flex_auto">{{ item.content }}</view>
  59. </view>
  60. </view>
  61. <view v-if="!bank.ques" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmit(bankIndex)">
  62. 确认答案
  63. </view>
  64. <view v-if="bank.ques">
  65. <view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
  66. <text :class="{right:(bank.ques.indexOf(item.optionsId) != -1 ) || (bank.ans.indexOf(item.optionsId) != -1),wrong:(bank.ques.indexOf(item.optionsId) != -1 ) && (bank.ans.indexOf(item.optionsId) == -1)}" class="activeTI">{{ ast[index] }}</text>
  67. <view class="flex_auto">{{ item.content }}</view>
  68. </view>
  69. </view>
  70. </view>
  71. <view v-if="bank.ques">
  72. <view class="pad_8 answer">
  73. <view>正确答案:
  74. <text :key="ansIndex" v-for="(ansItem,ansIndex) in bank.ans">{{ast[ansItem-1]}}</text>
  75. </view>
  76. <view v-if="!explain">我的答案:
  77. <text v-for="quesItem in bank.ques">{{ast[quesItem-1]}}</text>
  78. </view>
  79. </view>
  80. <view class="pad_8 answerInfos">
  81. <view class="answerTitle">答案解析</view>
  82. <view class="answerContent">
  83. <rich-text :nodes="bank.analysisContent"></rich-text>
  84. </view>
  85. </view>
  86. </view>
  87. </template>
  88. <template v-if="bank.type == 3">
  89. <view class="pad_8 titBox no-margin">
  90. <view v-if="!bank.ques">
  91. <view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
  92. <view class="activeTI">{{ ast[index] }}</view>
  93. <view class="flex_auto">
  94. {{ item }}
  95. </view>
  96. </view>
  97. </view>
  98. <view v-if="bank.ques">
  99. <view v-for="(item, index) in judge" :key="index" class="lisSty">
  100. <text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}" class="activeTI">{{ ast[index] }}</text>
  101. <view class="flex_auto">
  102. {{ item }}
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view v-if="bank.ques">
  108. <view class="pad_8 answer">
  109. <view>正确答案:{{ast[bank.ans]}}</view>
  110. <view v-if="!explain">我的答案:{{ast[bank.ques]}}</view>
  111. </view>
  112. <view class="pad_8 answerInfos">
  113. <view class="answerTitle">答案解析</view>
  114. <view class="answerContent">
  115. <rich-text :nodes="bank.analysisContent"></rich-text>
  116. </view>
  117. </view>
  118. </view>
  119. </template>
  120. <!-- 简答题 -->
  121. <template v-if="bank.type == 5">
  122. <view class="pad_8 titBox">
  123. <view class="ans">
  124. <view class="ans_input" v-if="!bank.ques">
  125. <view class="top flex">
  126. <image :data-index="bankIndex" class="icon" @click="chooseImg(bankIndex)" src="/static/08-10_032.jpg" mode=""></image>
  127. <view class="progress">{{bank.ansText.imageList.length || '0'}}/4</view>
  128. <view class="submit" @click="submitAns(bankIndex)" >确认答案</view>
  129. </view>
  130. <view class="textarea">
  131. <textarea v-model="bank.ansText.text" placeholder="在此输入答案"></textarea>
  132. </view>
  133. <view class="imgs">
  134. <view class="img" v-for="(img,imgIndex) in bank.ansText.imageList" >
  135. <text @click="deleteImg(imgIndex,bankIndex)">x</text>
  136. <image :src="$method.splitImgHost(img, true)"></image>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="ans_submit answerInfos" v-if="bank.ques && !explain">
  141. <view class="answerTitle">我的答案:</view>
  142. {{bank.ques.text}}
  143. <view class="imgs">
  144. <image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques.imageList" :src="$method.splitImgHost(ques,true)"></image>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <view v-if="bank.ques">
  150. <view class="pad_8 answerInfos">
  151. <view class="answerTitle">答案解析:</view>
  152. <view class="answerContent">
  153. <rich-text :nodes="bank.analysisContent"></rich-text>
  154. </view>
  155. </view>
  156. </view>
  157. </template>
  158. <!-- 案例题 -->
  159. <template v-if="bank.type == 4">
  160. <view class="tabs">
  161. <view class="tab" :class="{current:tabIndex == bank.current}" :key="tabIndex" v-for="(tab,tabIndex) in bank.jsonStr" @click="tabSelect(tabIndex,bankIndex)">问题{{tabIndex+1}}</view>
  162. </view>
  163. <view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
  164. <template v-if="ansItem.type == 1">
  165. <view class="pad_8 titBox">
  166. <view class="titles">
  167. <rich-text :nodes="ansItem.content"></rich-text>
  168. </view>
  169. <view v-if="!bank.ques[ansIndex]">
  170. <view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
  171. <view class="activeTI">{{ ast[childIndex] }}</view>
  172. <view class="flex_auto">
  173. <rich-text class="textChild" :nodes="option.content"></rich-text>
  174. </view>
  175. </view>
  176. </view>
  177. <view v-if="bank.ques[ansIndex]">
  178. <view v-for="(option, childIndex) in ansItem.optionsList" :key="index" class="lisSty">
  179. <text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}" class="activeTI">{{ ast[childIndex] }}</text>
  180. <view class="flex_auto">
  181. <rich-text :nodes="option.content"></rich-text>
  182. </view>
  183. </view>
  184. </view>
  185. </view>
  186. <view v-if="bank.ques[ansIndex]">
  187. <view class="pad_8 answer">
  188. <view>正确答案:{{ast[bank.ans[ansIndex]-1]}}</view>
  189. <view v-if="!explain">我的答案:{{ast[bank.ques[ansIndex]-1]}}</view>
  190. </view>
  191. <view class="pad_8 answerInfos">
  192. <view class="answerTitle">答案解析</view>
  193. <view class="answerContent">
  194. <rich-text :nodes="option.analysisContent"></rich-text>
  195. </view>
  196. </view>
  197. </view>
  198. </template>
  199. <template v-if="ansItem.type == 2">
  200. <view class="pad_8 titBox">
  201. <view class="titles">
  202. <rich-text :nodes="ansItem.content"></rich-text>
  203. </view>
  204. <view v-if="!bank.ques[ansIndex]">
  205. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
  206. <view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
  207. <view class="flex_auto">
  208. <rich-text :nodes="option.content"></rich-text>
  209. </view>
  210. </view>
  211. </view>
  212. <view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
  213. 确认答案
  214. </view>
  215. <view v-if="bank.ques && bank.ques[ansIndex]">
  216. <view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
  217. <text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}" class="activeTI">{{ ast[childindex] }}</text>
  218. <view class="flex_auto">
  219. <rich-text :nodes="option.content"></rich-text>
  220. </view>
  221. </view>
  222. </view>
  223. </view>
  224. <view v-if="bank.ques[ansIndex]">
  225. <view class="pad_8 answer">
  226. <view>正确答案:
  227. <text :key="ansItemIndex1" v-for="(ansItem1,ansItemIndex1) in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
  228. </view>
  229. <view v-if="!explain">我的答案:
  230. <text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
  231. </view>
  232. </view>
  233. <view class="pad_8 answerInfos">
  234. <view class="answerTitle">答案解析</view>
  235. <view class="answerContent">
  236. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  237. </view>
  238. </view>
  239. </view>
  240. </template>
  241. <template v-if="ansItem.type == 3">
  242. <view class="pad_8 titBox">
  243. <view class="titles">
  244. <rich-text :nodes="ansItem.content"></rich-text>
  245. </view>
  246. <view v-if="!bank.ques[ansIndex]">
  247. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
  248. <view class="activeTI">{{ ast[childindex] }}</view>
  249. <view class="flex_auto">
  250. {{ option }}
  251. </view>
  252. </view>
  253. </view>
  254. <view v-if="bank.ques[ansIndex]">
  255. <view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
  256. <text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}" class="activeTI">{{ ast[childindex] }}</text>
  257. <view class="flex_auto">
  258. {{ option }}
  259. </view>
  260. </view>
  261. </view>
  262. </view>
  263. <view v-if="bank.ques[ansIndex]">
  264. <view class="pad_8 answer">
  265. <view>正确答案:{{ast[bank.ans[ansIndex]]}}</view>
  266. <view v-if="!explain">我的答案:{{ast[bank.ques[ansIndex]]}}</view>
  267. </view>
  268. <view class="pad_8 answerInfos">
  269. <view class="answerTitle">答案解析</view>
  270. <view class="answerContent">
  271. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  272. </view>
  273. </view>
  274. </view>
  275. </template>
  276. <!-- 简答题 -->
  277. <template v-if="ansItem.type == 5">
  278. <view class="pad_8 titBox_title">
  279. <view class="titles">
  280. <rich-text :nodes="ansItem.content"></rich-text>
  281. </view>
  282. </view>
  283. <view class="pad_8 titBox_title">
  284. <view class="ans">
  285. <view class="ans_input" v-if="!bank.ques[ansIndex]">
  286. <view class="top flex">
  287. <image class="icon" @click="chooseImgChild(bankIndex,ansIndex)" src="/static/08-10_032.jpg" mode=""></image>
  288. <view class="progress">{{ansItem.ansText.imageList.length || '0'}}/4</view>
  289. <view class="submit" @click="submitAnsChild(bankIndex,ansIndex)">确认答案</view>
  290. </view>
  291. <view class="textarea">
  292. <textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
  293. </view>
  294. <view class="imgs">
  295. <view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" :key="imgIndex">
  296. <text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
  297. <image :src="$method.splitImgHost(img, true)"></image>
  298. </view>
  299. </view>
  300. </view>
  301. <view class="ans_submit answerInfos" v-if="bank.ques[ansIndex] && !explain">
  302. <view class="answerTitle">我的答案</view>
  303. {{bank.ques[ansIndex].text}}
  304. <view class="imgs">
  305. <image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
  306. </view>
  307. </view>
  308. </view>
  309. </view>
  310. <view v-if="bank.ques[ansIndex]">
  311. <view class="pad_8 answerInfos">
  312. <view class="answerTitle">答案解析</view>
  313. <view class="answerContent">
  314. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  315. </view>
  316. </view>
  317. </view>
  318. </template>
  319. </view>
  320. </template>
  321. <view class="footer_btn">
  322. <view class="flex_center" @click="openFooterTab">
  323. <view class="up-icon">
  324. <image src="/static/up.png"></image>
  325. </view>
  326. 答题卡
  327. </view>
  328. <view class="collect" :class="{show:!explain}" @click="pdsubmit">
  329. <view>
  330. <image src="/static/jj.png" mode=""></image>
  331. <view>交卷</view>
  332. </view>
  333. </view>
  334. </view>
  335. </view>
  336. </swiper-item>
  337. </swiper>
  338. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  339. <view class="popupView">
  340. <view class="popupTops">
  341. <view class="topIcon"></view>
  342. 点击编号即可跳转至对应题目
  343. </view>
  344. <view class="popupContent">
  345. <scroll-view scroll-y="true" style="height: 506rpx;">
  346. <view class="boxSty">
  347. <view v-for="(item, index) in questionList" :key="index" @click="changeIndex(index)" :class="{isRight:isRight(item,index),isWrong:isWrong(item,index)}" class="liListSty">{{ index + 1 }}</view>
  348. </view>
  349. </scroll-view>
  350. </view>
  351. </view>
  352. </u-popup>
  353. <view class="dialog" v-if="showDialog">
  354. <image src="/static/pointer.png" class="pointer" mode=""></image>
  355. <view class="text">左右滑动切换上下题</view>
  356. <view class="btn" @click="hideDialog">我知道了</view>
  357. </view>
  358. </view>
  359. </template>
  360. <script>
  361. export default {
  362. data() {
  363. return {
  364. id:'',
  365. current:0,
  366. questionList:[],
  367. ast: ['A', 'B', 'C', 'D','E','F','G'],
  368. judge:['错误','正确'],
  369. show: false,
  370. showDialog:false,
  371. isFromReport:'', //来自答题报告
  372. bankList: [],
  373. collectList:[],
  374. goodsId:'',
  375. examId:'',
  376. explain:'',
  377. };
  378. },
  379. onLoad(option){
  380. this.id = option.id || '';
  381. this.examId = option.examId || '';
  382. this.isFromReport = option.isFromReport;
  383. this.explain = option.explain || '';
  384. let showDialog = uni.getStorageSync('showDialog');
  385. if(showDialog) {
  386. this.showDialog = false;
  387. } else {
  388. this.showDialog = true;
  389. uni.setStorageSync('showDialog','1');
  390. }
  391. // if(this.isFromReport) { //通过答题报告查询错题列表
  392. // console.log(2)
  393. // this.wrongRecordList();
  394. // } else { //通过错题集查询错题列表
  395. // console.log(1)
  396. this.wrongRecordExamQuestionList();
  397. // }
  398. },
  399. onUnload() {
  400. },
  401. methods: {
  402. /**
  403. * 通过答题报告查询错题列表
  404. */
  405. wrongRecordList() {
  406. this.$api.wrongRecordList({
  407. recordId:this.id,
  408. }).then(res => {
  409. res.data.rows.forEach((item,index) => {
  410. if(typeof item.jsonStr == 'string') {
  411. item.jsonStr = JSON.parse(item.jsonStr)
  412. if(item.type == 2) { //多选
  413. item.jsonStr.forEach(str => {
  414. str.optionsId = ''+str.optionsId;
  415. })
  416. let arr = item.answerQuestion.split(',');
  417. arr.forEach((a,i) => {
  418. arr[i] = ''+a;
  419. })
  420. item.ans = arr;
  421. if(this.explain) {
  422. item.ques = item.ans;
  423. }
  424. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  425. return;
  426. } else if(item.type == 5) {
  427. item.ansText = {
  428. text: '',
  429. imageList: []
  430. }
  431. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  432. if(this.explain) {
  433. item.ques = {
  434. text:item.analysisContent
  435. }
  436. return;
  437. }
  438. } else if(item.type == 4) {
  439. console.log(item.jsonStr)
  440. item.ques = []
  441. item.current = 0;
  442. let ansArr = [];
  443. item.jsonStr.forEach((json,index) => {
  444. if(json.type == 1) {
  445. ansArr[index] = json.answerQuestion;
  446. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  447. } else if(json.type == 2) {
  448. json.optionsList.forEach(str => {
  449. str.optionsId = ''+str.optionsId;
  450. })
  451. let arr = json.answerQuestion.split(',');
  452. arr.forEach((a,i) => {
  453. arr[i] = ''+a;
  454. })
  455. ansArr[index] = arr
  456. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  457. } else if(json.type == 3) {
  458. ansArr[index] = json.answerQuestion;
  459. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  460. } else if(json.type == 5) {
  461. ansArr[index] = {
  462. text: '',
  463. imageList: []
  464. }
  465. json.ansText = {
  466. text: '',
  467. imageList: []
  468. }
  469. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  470. }
  471. })
  472. item.ans = ansArr
  473. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  474. if(this.explain) {
  475. item.ques = item.ans;
  476. }
  477. return;
  478. }
  479. item.ans = item.answerQuestion
  480. if(this.explain) {
  481. item.ques = item.ans;
  482. }
  483. } else {
  484. if(this.explain) {
  485. item.ques = item.ans;
  486. }
  487. }
  488. })
  489. this.questionList = res.data.rows;
  490. })
  491. },
  492. /**
  493. * 通过错题集查询错题列表
  494. */
  495. wrongRecordExamQuestionList() {
  496. this.$api.wrongRecordExamQuestionList({
  497. examId:this.examId,
  498. recordId:this.id,
  499. }).then(res => {
  500. res.data.rows.forEach((item,index) => {
  501. if(typeof item.jsonStr == 'string') {
  502. item.jsonStr = JSON.parse(item.jsonStr)
  503. if(item.type == 2) { //多选
  504. item.jsonStr.forEach(str => {
  505. str.optionsId = ''+str.optionsId;
  506. })
  507. let arr = item.answerQuestion.split(',');
  508. arr.forEach((a,i) => {
  509. arr[i] = ''+a;
  510. })
  511. item.ans = arr;
  512. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  513. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  514. if(this.explain) {
  515. item.ques = item.ans;
  516. }
  517. return;
  518. } else if(item.type == 5) {
  519. item.ansText = {
  520. text: '',
  521. imageList: []
  522. }
  523. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  524. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  525. if(this.explain) {
  526. item.ques = {
  527. text:item.analysisContent
  528. }
  529. return;
  530. }
  531. } else if(item.type == 4) {
  532. console.log(item.jsonStr)
  533. item.ques = []
  534. item.current = 0;
  535. let ansArr = [];
  536. item.jsonStr.forEach((json,index) => {
  537. if(json.type == 1) {
  538. ansArr[index] = json.answerQuestion;
  539. } else if(json.type == 2) {
  540. json.optionsList.forEach(str => {
  541. str.optionsId = ''+str.optionsId;
  542. })
  543. let arr = json.answerQuestion.split(',');
  544. arr.forEach((a,i) => {
  545. arr[i] = ''+a;
  546. })
  547. ansArr[index] = arr
  548. } else if(json.type == 3) {
  549. ansArr[index] = json.answerQuestion;
  550. } else if(json.type == 5) {
  551. ansArr[index] = {
  552. text: '',
  553. imageList: []
  554. }
  555. json.ansText = {
  556. text: '',
  557. imageList: []
  558. }
  559. }
  560. })
  561. item.ans = ansArr
  562. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  563. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  564. if(this.explain) {
  565. item.ques = item.ans;
  566. }
  567. return;
  568. }
  569. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  570. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  571. item.ans = item.answerQuestion
  572. if(this.explain) {
  573. item.ques = item.ans;
  574. }
  575. } else {
  576. if(this.explain) {
  577. item.ques = item.ans;
  578. }
  579. }
  580. })
  581. this.questionList = res.data.rows;
  582. })
  583. },
  584. /**
  585. * @param {Object} e单选点击
  586. */
  587. radioSelect(optionsId,bindex) {
  588. if(this.questionList[bindex].ques) return;
  589. this.$set(this.questionList[bindex],'ques',optionsId)
  590. // 回答错误
  591. if(this.questionList[bindex].ques != this.questionList[bindex].ans) {
  592. } else {
  593. this.$api.wrongRecordDelete({
  594. "examId": this.questionList[bindex].examId,
  595. "goodsId": this.questionList[bindex].goodsId,
  596. "questionId": this.questionList[bindex].questionId,
  597. }).then(res => {
  598. })
  599. }
  600. },
  601. /**
  602. * @param {Object} e单选点击
  603. */
  604. radioSelectChild(optionsId,ansIndex,bindex) {
  605. if(this.questionList[bindex].ques[ansIndex]) return;
  606. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  607. },
  608. /**
  609. * @param {Object} 多选点击
  610. */
  611. checkboxSelect(optionsId,bindex,index) {
  612. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  613. },
  614. /**
  615. * @param {Object} 多选点击
  616. */
  617. checkboxSelectChild(bindex,ansIndex,childIndex) {
  618. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  619. },
  620. isCheckboxChecked(arr) {
  621. return arr.some(item => {
  622. if (item.checked) {
  623. return true;
  624. }
  625. });
  626. },
  627. /**
  628. * @param {Object} 多选确认
  629. */
  630. checkboxSubmit(bindex) {
  631. if(this.questionList[bindex].ques) return;
  632. let arr = [];
  633. this.questionList[bindex].jsonStr.forEach(item => {
  634. if(item.checked) {
  635. arr.push(item.optionsId)
  636. }
  637. })
  638. if(!arr.length) {
  639. uni.showToast({
  640. title:'请选择答案',
  641. icon:'none'
  642. })
  643. return;
  644. }
  645. this.$set(this.questionList[bindex],'ques',arr)
  646. let isWrong = this.questionList[bindex].ques.some((quesItem,quesIndex) => {
  647. return this.questionList[bindex].ques[quesIndex] != this.questionList[bindex].ans[quesIndex]
  648. })
  649. // 回答错误
  650. if(isWrong) {
  651. } else {
  652. let question = this.questionList.find(item => item.questionId == this.questionList[bindex].questionId);
  653. if(question) {
  654. this.$api.wrongRecordDelete({
  655. "examId": question.examId,
  656. "goodsId": question.goodsId,
  657. "questionId": question.questionId,
  658. }).then(res => {
  659. })
  660. }
  661. }
  662. },
  663. /**
  664. * @param {Object} 多选确认
  665. */
  666. checkboxSubmitChild(bindex,ansIndex) {
  667. if(this.questionList[bindex].ques[ansIndex]) return;
  668. let arr = [];
  669. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  670. if(item.checked) {
  671. arr.push(item.optionsId)
  672. }
  673. })
  674. if(!arr.length) {
  675. uni.showToast({
  676. title:'请选择答案',
  677. icon:'none'
  678. })
  679. return;
  680. }
  681. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  682. },
  683. judgeSelect(index,bindex) {
  684. if(this.questionList[bindex].ques) return;
  685. this.$set(this.questionList[bindex],'ques',index+'')
  686. // 回答错误
  687. if(this.questionList[bindex].ques != this.questionList[bindex].ans) {
  688. } else {
  689. this.$api.wrongRecordDelete({
  690. "examId": this.questionList[bindex].examId,
  691. "goodsId": this.questionList[bindex].goodsId,
  692. "questionId": this.questionList[bindex].questionId,
  693. }).then(res => {
  694. })
  695. }
  696. },
  697. judgeSelectChild(ansindex,childindex,bindex) {
  698. if(this.questionList[bindex].ques[ansindex]) return;
  699. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  700. },
  701. openFooterTab() {
  702. this.show = true;
  703. },
  704. hideDialog() {
  705. this.showDialog = false
  706. },
  707. changeIndex(index) {
  708. this.current = index
  709. },
  710. swiperChange(e) {
  711. this.current = e.detail.current;
  712. },
  713. deleteImg(imgIndex,bankIndex) {
  714. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  715. },
  716. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  717. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  718. },
  719. chooseImg(bankindex) {
  720. uni.chooseImage({
  721. count: 1, //默认9
  722. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  723. sourceType: ['album','camera'], //从相册选择
  724. success: (res) => {
  725. let self = this;
  726. // console.log(JSON.stringify(res.tempFilePaths));
  727. let img = res.tempFilePaths[0];
  728. uni.getImageInfo({
  729. src: img,
  730. success: async res => {
  731. let canvasWidth = res.width; //图片原始长宽
  732. let canvasHeight = res.height;
  733. if (canvasWidth > 1000 || canvasHeight > 1000) {
  734. uni.compressImage({
  735. src: img,
  736. quality: 75,
  737. width: '50%',
  738. height: '50%',
  739. success: async rest => {
  740. const dir = await self.uploadFile(rest.tempFilePath, 0);
  741. this.questionList[bankindex].ansText.imageList.push(dir)
  742. }
  743. });
  744. } else {
  745. const dir = await self.uploadFile(img, 0);
  746. this.questionList[bankindex].ansText.imageList.push(dir)
  747. }
  748. }
  749. });
  750. }
  751. })
  752. },
  753. chooseImgChild(bankindex,ansindex) {
  754. uni.chooseImage({
  755. count: 1, //默认9
  756. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  757. sourceType: ['album','camera'], //从相册选择
  758. success: (res) => {
  759. let self = this;
  760. // console.log(JSON.stringify(res.tempFilePaths));
  761. let img = res.tempFilePaths[0];
  762. uni.getImageInfo({
  763. src: img,
  764. success: async res => {
  765. let canvasWidth = res.width; //图片原始长宽
  766. let canvasHeight = res.height;
  767. if (canvasWidth > 1000 || canvasHeight > 1000) {
  768. uni.compressImage({
  769. src: img,
  770. quality: 75,
  771. width: '50%',
  772. height: '50%',
  773. success: async rest => {
  774. const dir = await self.uploadFile(rest.tempFilePath, 0);
  775. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  776. }
  777. });
  778. } else {
  779. const dir = await self.uploadFile(img, 0);
  780. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  781. }
  782. }
  783. });
  784. }
  785. })
  786. },
  787. uploadFile(options, int) {
  788. var self = this;
  789. return new Promise((resolve, reject) => {
  790. var data = {
  791. imageStatus: int
  792. };
  793. self.$api.aliyunpolicy(data).then(res => {
  794. console.log(res.data,6)
  795. if(res.data.code!=200){
  796. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  797. return
  798. }
  799. var ossToken = res.data.data.resultContent;
  800. if(ossToken.host==null||ossToken.host==undefined){
  801. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  802. return
  803. }
  804. uni.uploadFile({
  805. url: ossToken.host,
  806. name: 'file',
  807. filePath: options,
  808. fileType: 'image',
  809. header: {
  810. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  811. },
  812. formData: {
  813. key: ossToken.dir,
  814. OSSAccessKeyId: ossToken.accessid,
  815. policy: ossToken.policy,
  816. Signature: ossToken.signature,
  817. callback: ossToken.callback,
  818. success_action_status: 200
  819. },
  820. success: result => {
  821. if (result.statusCode === 200) {
  822. resolve(ossToken.dir);
  823. } else {
  824. uni.showToast({
  825. title: '上传失败',
  826. icon: 'none'
  827. });
  828. return;
  829. }
  830. },
  831. fail: error => {
  832. uni.showToast({
  833. title: '上传接口报错'+error,
  834. icon: 'none'
  835. });
  836. return;
  837. }
  838. });
  839. });
  840. });
  841. },
  842. submitAns(bankindex) {
  843. console.log(this.questionList[bankindex])
  844. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  845. uni.showToast({
  846. title: '请输入内容或上传图片',
  847. duration: 2000,
  848. icon:'none'
  849. });
  850. return
  851. }
  852. this.$set(this.questionList[bankindex],'ques',{
  853. imageList:this.questionList[bankindex].ansText.imageList,
  854. text:this.questionList[bankindex].ansText.text,
  855. })
  856. },
  857. submitAnsChild(bankindex,ansindex) {
  858. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  859. uni.showToast({
  860. title: '请输入内容或上传图片',
  861. duration: 2000,
  862. icon:'none'
  863. });
  864. return
  865. }
  866. this.$set(this.questionList[bankindex].ques,ansindex,{
  867. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  868. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  869. })
  870. },
  871. isRight(item,index) {
  872. //单选
  873. if(this.questionList[index].ques) {
  874. if(item.type == 1) {
  875. return this.questionList[index].ques == this.questionList[index].ans;
  876. //多选
  877. } else if(item.type == 2) {
  878. //每一项都相等
  879. return this.questionList[index].ans.every((item,i) => {
  880. return item == this.questionList[index].ques[i];
  881. })
  882. //判断
  883. } else if(item.type == 3) {
  884. return this.questionList[index].ques == this.questionList[index].ans;
  885. } else {
  886. return false;
  887. }
  888. } else {
  889. return false;
  890. }
  891. },
  892. right(bankIndex,ansIndex,option) {
  893. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  894. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  895. return true
  896. } else {
  897. return false;
  898. }
  899. } else {
  900. return false;
  901. }
  902. },
  903. wrong(bankIndex,ansIndex,option) {
  904. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  905. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  906. return true;
  907. } else {
  908. return false;
  909. }
  910. } else {
  911. return false;
  912. }
  913. },
  914. isWrong(item,index) {
  915. if(this.questionList[index].ques) {
  916. //单选
  917. if(item.type == 1) {
  918. return this.questionList[index].ques != this.questionList[index].ans;
  919. //多选
  920. } else if(item.type == 2) {
  921. //每一项都相等
  922. return this.questionList[index].ans.some((item,i) => {
  923. return item != this.questionList[index].ques[i];
  924. })
  925. //判断
  926. } else if(item.type == 3) {
  927. return this.questionList[index].ques != this.questionList[index].ans;
  928. } else {
  929. return false;
  930. }
  931. } else {
  932. return false;
  933. }
  934. },
  935. tabSelect(index,bankindex) {
  936. this.$set(this.questionList[bankindex],'current',index)
  937. },
  938. pdsubmit() {
  939. uni.showToast({
  940. icon:'none',
  941. title:'交卷成功',
  942. duration:1000,
  943. })
  944. setTimeout(() => {
  945. uni.navigateBack({
  946. delta:1
  947. })
  948. },1000)
  949. }
  950. }
  951. };
  952. </script>
  953. <style lang="scss" scoped>
  954. .swiper {
  955. width:100%;
  956. height:100vh;
  957. }
  958. .lisSty {
  959. margin-bottom: 16rpx;
  960. display: flex;
  961. align-items: center;
  962. .flex_auto {
  963. flex:1;
  964. }
  965. }
  966. .activeTI {
  967. vertical-align: middle;
  968. display: inline-block;
  969. border: 1rpx solid #eee;
  970. border-radius: 50rpx;
  971. height: 48rpx;
  972. line-height: 46rpx;
  973. text-align: center;
  974. width: 48rpx;
  975. margin-right: 15rpx;
  976. color: #666;
  977. font-size: 30rpx;
  978. &.right {
  979. color:#fff;
  980. background:#36C75A;
  981. }
  982. &.wrong {
  983. color:#fff;
  984. background:#FF3B30;
  985. }
  986. &.checked {
  987. color:#fff;
  988. background:#007AFF;
  989. }
  990. }
  991. .submit_checkbox {
  992. position:fixed;
  993. left:0;
  994. right:0;
  995. bottom:120rpx;
  996. margin: 20rpx auto;
  997. width: 526rpx;
  998. height: 80rpx;
  999. background: rgba(0, 122, 255, 1);
  1000. color:#fff;
  1001. text-align: center;
  1002. line-height: 80rpx;
  1003. font-size: 30rpx;
  1004. border-radius: 40rpx;
  1005. &.disabled {
  1006. opacity: 0.6;
  1007. }
  1008. }
  1009. .titles {
  1010. overflow: hidden;
  1011. margin-bottom: 24rpx;
  1012. }
  1013. .titBox {
  1014. padding: 41rpx 25rpx 24rpx 25rpx;
  1015. }
  1016. .titBox_title {
  1017. padding: 21rpx;
  1018. }
  1019. .tabs {
  1020. margin:10rpx;
  1021. display: flex;
  1022. .tab {
  1023. margin: 0 4rpx;
  1024. padding:10rpx 13rpx;
  1025. text-align: center;
  1026. color: #007aff;
  1027. font-size: 28rpx;
  1028. border-radius: 16rpx;
  1029. background:#fff;
  1030. &.current {
  1031. color:#fff;
  1032. background: #007AFF;
  1033. }
  1034. }
  1035. }
  1036. .ans {
  1037. margin:8rpx 8rpx 8rpx;
  1038. .ans_input {
  1039. border-radius: 16rpx;
  1040. background:#fff;
  1041. .top {
  1042. border-bottom:1rpx solid #EEEEEE;
  1043. padding: 16rpx;
  1044. display: flex;
  1045. align-items: center;
  1046. .icon {
  1047. margin-right:20rpx;
  1048. width: 40rpx;
  1049. height: 38rpx;
  1050. }
  1051. .progress {
  1052. flex:1;
  1053. }
  1054. .submit {
  1055. width: 168rpx;
  1056. height: 48rpx;
  1057. line-height: 48rpx;
  1058. text-align: center;
  1059. color:#fff;
  1060. font-size: 30rpx;
  1061. background: #007AFF;
  1062. border-radius: 24rpx;
  1063. }
  1064. }
  1065. .textarea {
  1066. textarea {
  1067. width:100%;
  1068. height:287rpx;
  1069. padding:10rpx;
  1070. }
  1071. }
  1072. .imgs {
  1073. overflow: hidden;
  1074. display: flex;
  1075. width:100%;
  1076. .img {
  1077. width: 104rpx;
  1078. height: 104rpx;
  1079. border-radius: 8rpx;
  1080. position:relative;
  1081. margin:20rpx;
  1082. text {
  1083. position:absolute;
  1084. right:-15rpx;
  1085. top:-15rpx;
  1086. width:30rpx;
  1087. height:30rpx;
  1088. text-align: center;
  1089. line-height: 30rpx;
  1090. color:#fff;
  1091. background:#FF3B30;
  1092. border-radius:50%;
  1093. }
  1094. image {
  1095. width:100%;
  1096. height:100%;
  1097. }
  1098. }
  1099. }
  1100. }
  1101. .ans_submit {
  1102. padding:16rpx;
  1103. border-radius: 16rpx;
  1104. background:#fff;
  1105. .imgs {
  1106. overflow: hidden;
  1107. display: flex;
  1108. width:100%;
  1109. .img {
  1110. width: 104rpx;
  1111. height: 104rpx;
  1112. border-radius: 8rpx;
  1113. position:relative;
  1114. margin:20rpx;
  1115. image {
  1116. width:100%;
  1117. height:100%;
  1118. }
  1119. }
  1120. }
  1121. }
  1122. }
  1123. .firstLetter {
  1124. display: flex;
  1125. justify-content: space-between;
  1126. align-items: center;
  1127. margin-bottom: 30rpx;
  1128. .leftLetters {
  1129. display: flex;
  1130. align-items: center;
  1131. width: 220rpx;
  1132. .btnType {
  1133. padding: 5rpx 10rpx;
  1134. border: 1rpx solid #007aff;
  1135. border-radius: 10rpx;
  1136. background-color: rgba(0, 122, 255, 0.1);
  1137. font-size: 28rpx;
  1138. color: #007aff;
  1139. margin-right: 15rpx;
  1140. }
  1141. }
  1142. }
  1143. .popupView {
  1144. height: 100%;
  1145. padding-bottom: 100rpx;
  1146. .popupTops {
  1147. height: 77rpx;
  1148. border-bottom: 1rpx solid #eee;
  1149. text-align: center;
  1150. line-height: 77rpx;
  1151. font-size: 24rpx;
  1152. color: #999;
  1153. position: relative;
  1154. .topIcon {
  1155. position: absolute;
  1156. top: 10rpx;
  1157. left: 50%;
  1158. transform: translateX(-50%);
  1159. width: 80rpx;
  1160. height: 8rpx;
  1161. background-color: #999;
  1162. border-radius: 4rpx;
  1163. }
  1164. }
  1165. .popupContent {
  1166. }
  1167. }
  1168. .pageContent {
  1169. position:relative;
  1170. background-color: #eaeef1;
  1171. height: 100%;
  1172. overflow-y: scroll;
  1173. padding-top: 8rpx;
  1174. padding-bottom: 100rpx;
  1175. }
  1176. .pad_8 {
  1177. background-color: #fff;
  1178. margin: 0rpx 8rpx 8rpx;
  1179. border-radius: 16rpx;
  1180. &.no-margin {
  1181. margin-top:-16rpx;
  1182. border-radius: 0 0 16rpx 16rpx;
  1183. }
  1184. }
  1185. .answer {
  1186. height: 80rpx;
  1187. line-height: 80rpx;
  1188. padding: 0rpx 24rpx;
  1189. display: flex;
  1190. align-items: center;
  1191. justify-content: space-between;
  1192. color: #666;
  1193. font-size: 30rpx;
  1194. }
  1195. .footer_btn {
  1196. background-color: #fff;
  1197. z-index: 10078;
  1198. position: fixed;
  1199. bottom: 0rpx;
  1200. display: flex;
  1201. align-items: center;
  1202. justify-content: space-between;
  1203. width: 100%;
  1204. height: 98rpx;
  1205. padding: 0rpx 38rpx;
  1206. border-top: 1rpx solid #eee;
  1207. .flex_center {
  1208. flex:1;
  1209. display: flex;
  1210. justify-content: center;
  1211. align-items: center;
  1212. flex-direction: column;
  1213. margin:0 200rpx;
  1214. font-size: 24rpx;
  1215. color: #999999;
  1216. .up-icon {
  1217. margin-bottom:18rpx;
  1218. width:100%;
  1219. display: flex;
  1220. justify-content: center;
  1221. image {
  1222. width:58rpx;
  1223. height:21rpx;
  1224. }
  1225. }
  1226. }
  1227. .collect {
  1228. visibility: hidden;
  1229. &.show {
  1230. visibility: visible;
  1231. }
  1232. >view {
  1233. display: flex;
  1234. flex-direction: column;
  1235. align-items: center;
  1236. justify-content: center;
  1237. image {
  1238. width:32rpx;
  1239. height:32rpx;
  1240. margin-bottom:6rpx;
  1241. }
  1242. view {
  1243. font-size: 24rpx;
  1244. color: #999999;
  1245. }
  1246. }
  1247. }
  1248. }
  1249. .boxSty {
  1250. padding: 44rpx 41rpx 0rpx;
  1251. }
  1252. .liListSty {
  1253. border:1rpx solid #EEEEEE;
  1254. width: 88rpx;
  1255. height: 88rpx;
  1256. border-radius: 32rpx;
  1257. text-align: center;
  1258. line-height: 88rpx;
  1259. color: #333;
  1260. font-size: 32rpx;
  1261. float: left;
  1262. margin: 20rpx 23rpx;
  1263. &.isRight {
  1264. border:1rpx solid #EEEEEE;
  1265. color:#fff;
  1266. background: #36C75A;
  1267. }
  1268. &.isWrong {
  1269. border:1rpx solid #EEEEEE;
  1270. color:#fff;
  1271. background: #FF3B30;
  1272. }
  1273. }
  1274. .answerInfos {
  1275. padding: 25rpx 25rpx 25rpx 23rpx;
  1276. }
  1277. .answerTitle {
  1278. margin-bottom: 28rpx;
  1279. color: #666;
  1280. font-size: 30rpx;
  1281. }
  1282. .answerContent {
  1283. font-size: 30rpx;
  1284. color: #666;
  1285. }
  1286. .textChild {
  1287. display: inline-block;
  1288. vertical-align: middle;
  1289. }
  1290. .dialog {
  1291. position: fixed;
  1292. left:0;
  1293. top:0;
  1294. width:100%;
  1295. height:100%;
  1296. background-color: rgba(0,0,0,0.8);
  1297. display: flex;
  1298. flex-direction: column;
  1299. align-items: center;
  1300. justify-content: center;
  1301. z-index: 20000;
  1302. .pointer {
  1303. width:338rpx;
  1304. height:240rpx;
  1305. }
  1306. .text {
  1307. font-size: 32rpx;
  1308. color: #FFFFFF;
  1309. text-align: center;
  1310. }
  1311. .btn {
  1312. width: 242rpx;
  1313. height: 82rpx;
  1314. border: 2rpx solid #FFFFFF;
  1315. border-radius: 16rpx;
  1316. text-align: center;
  1317. line-height: 82rpx;
  1318. margin:41rpx auto;
  1319. color:#fff;
  1320. font-size: 32rpx;
  1321. }
  1322. }
  1323. </style>