wrongBank.vue 39 KB

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