wrongBank.vue 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484
  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. };
  379. },
  380. onLoad(option){
  381. this.id = option.id || '';
  382. this.examId = option.examId || '';
  383. this.isFromReport = option.isFromReport;
  384. this.explain = option.explain || '';
  385. let showDialog = uni.getStorageSync('showDialog');
  386. if(showDialog) {
  387. this.showDialog = false;
  388. } else {
  389. this.showDialog = true;
  390. uni.setStorageSync('showDialog','1');
  391. }
  392. // if(this.isFromReport) { //通过答题报告查询错题列表
  393. // console.log(2)
  394. // this.wrongRecordList();
  395. // } else { //通过错题集查询错题列表
  396. // console.log(1)
  397. this.wrongRecordExamQuestionList();
  398. // }
  399. },
  400. onUnload() {
  401. },
  402. methods: {
  403. /**
  404. * 通过答题报告查询错题列表
  405. */
  406. wrongRecordList() {
  407. this.$api.wrongRecordList({
  408. recordId:this.id,
  409. }).then(res => {
  410. res.data.rows.forEach((item,index) => {
  411. if(typeof item.jsonStr == 'string') {
  412. item.jsonStr = JSON.parse(item.jsonStr)
  413. if(item.type == 2) { //多选
  414. item.jsonStr.forEach(str => {
  415. str.optionsId = ''+str.optionsId;
  416. })
  417. let arr = item.answerQuestion.split(',');
  418. arr.forEach((a,i) => {
  419. arr[i] = ''+a;
  420. })
  421. item.ans = arr;
  422. if(this.explain) {
  423. item.ques = item.ans;
  424. }
  425. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  426. return;
  427. } else if(item.type == 5) {
  428. item.ansText = {
  429. text: '',
  430. imageList: []
  431. }
  432. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  433. if(this.explain) {
  434. item.ques = {
  435. text:item.analysisContent
  436. }
  437. return;
  438. }
  439. } else if(item.type == 4) {
  440. console.log(item.jsonStr)
  441. item.ques = []
  442. item.current = 0;
  443. let ansArr = [];
  444. item.jsonStr.forEach((json,index) => {
  445. if(json.type == 1) {
  446. ansArr[index] = json.answerQuestion;
  447. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  448. } else if(json.type == 2) {
  449. json.optionsList.forEach(str => {
  450. str.optionsId = ''+str.optionsId;
  451. })
  452. let arr = json.answerQuestion.split(',');
  453. arr.forEach((a,i) => {
  454. arr[i] = ''+a;
  455. })
  456. ansArr[index] = arr
  457. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  458. } else if(json.type == 3) {
  459. ansArr[index] = json.answerQuestion;
  460. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  461. } else if(json.type == 5) {
  462. ansArr[index] = {
  463. text: '',
  464. imageList: []
  465. }
  466. json.ansText = {
  467. text: '',
  468. imageList: []
  469. }
  470. json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  471. }
  472. })
  473. item.ans = ansArr
  474. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  475. if(this.explain) {
  476. item.ques = item.ans;
  477. }
  478. return;
  479. }
  480. item.ans = item.answerQuestion
  481. if(this.explain) {
  482. item.ques = item.ans;
  483. }
  484. } else {
  485. if(this.explain) {
  486. item.ques = item.ans;
  487. }
  488. }
  489. })
  490. this.questionList = res.data.rows;
  491. })
  492. },
  493. /**
  494. * 通过错题集查询错题列表
  495. */
  496. wrongRecordExamQuestionList() {
  497. this.$api.wrongRecordExamQuestionList({
  498. examId:this.examId,
  499. recordId:this.id,
  500. }).then(res => {
  501. res.data.rows.forEach((item,index) => {
  502. if(typeof item.jsonStr == 'string') {
  503. item.jsonStr = JSON.parse(item.jsonStr)
  504. if(item.type == 2) { //多选
  505. item.jsonStr.forEach(str => {
  506. str.optionsId = ''+str.optionsId;
  507. })
  508. let arr = item.answerQuestion.split(',');
  509. arr.forEach((a,i) => {
  510. arr[i] = ''+a;
  511. })
  512. item.ans = arr;
  513. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  514. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  515. if(this.explain) {
  516. item.ques = item.ans;
  517. }
  518. return;
  519. } else if(item.type == 5) {
  520. item.ansText = {
  521. text: '',
  522. imageList: []
  523. }
  524. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  525. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  526. if(this.explain) {
  527. item.ques = {
  528. text:item.analysisContent
  529. }
  530. return;
  531. }
  532. } else if(item.type == 4) {
  533. console.log(item.jsonStr)
  534. item.ques = []
  535. item.current = 0;
  536. let ansArr = [];
  537. item.jsonStr.forEach((json,index) => {
  538. if(json.type == 1) {
  539. ansArr[index] = json.answerQuestion;
  540. } else if(json.type == 2) {
  541. json.optionsList.forEach(str => {
  542. str.optionsId = ''+str.optionsId;
  543. })
  544. let arr = json.answerQuestion.split(',');
  545. arr.forEach((a,i) => {
  546. arr[i] = ''+a;
  547. })
  548. ansArr[index] = arr
  549. } else if(json.type == 3) {
  550. ansArr[index] = json.answerQuestion;
  551. } else if(json.type == 5) {
  552. ansArr[index] = {
  553. text: '',
  554. imageList: []
  555. }
  556. json.ansText = {
  557. text: '',
  558. imageList: []
  559. }
  560. }
  561. })
  562. item.ans = ansArr
  563. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  564. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  565. if(this.explain) {
  566. item.ques = item.ans;
  567. }
  568. return;
  569. }
  570. item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
  571. item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
  572. item.ans = item.answerQuestion
  573. if(this.explain) {
  574. item.ques = item.ans;
  575. }
  576. } else {
  577. if(this.explain) {
  578. item.ques = item.ans;
  579. }
  580. }
  581. })
  582. this.questionList = res.data.rows;
  583. })
  584. },
  585. /**
  586. * @param {Object} e单选点击
  587. */
  588. radioSelect(optionsId,bindex) {
  589. if(this.questionList[bindex].ques) return;
  590. this.$set(this.questionList[bindex],'ques',optionsId)
  591. // 回答错误
  592. if(this.questionList[bindex].ques != this.questionList[bindex].ans) {
  593. } else {
  594. this.$api.wrongRecordDelete({
  595. "examId": this.questionList[bindex].examId,
  596. "goodsId": this.questionList[bindex].goodsId,
  597. "questionId": this.questionList[bindex].questionId,
  598. }).then(res => {
  599. })
  600. }
  601. },
  602. /**
  603. * @param {Object} e单选点击
  604. */
  605. radioSelectChild(optionsId,ansIndex,bindex) {
  606. if(this.questionList[bindex].ques[ansIndex]) return;
  607. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  608. },
  609. /**
  610. * @param {Object} 多选点击
  611. */
  612. checkboxSelect(optionsId,bindex,index) {
  613. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  614. },
  615. /**
  616. * @param {Object} 多选点击
  617. */
  618. checkboxSelectChild(bindex,ansIndex,childIndex) {
  619. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  620. },
  621. isCheckboxChecked(arr) {
  622. return arr.some(item => {
  623. if (item.checked) {
  624. return true;
  625. }
  626. });
  627. },
  628. /**
  629. * @param {Object} 多选确认
  630. */
  631. checkboxSubmit(bindex) {
  632. if(this.questionList[bindex].ques) return;
  633. let arr = [];
  634. this.questionList[bindex].jsonStr.forEach(item => {
  635. if(item.checked) {
  636. arr.push(item.optionsId)
  637. }
  638. })
  639. if(!arr.length) {
  640. uni.showToast({
  641. title:'请选择答案',
  642. icon:'none'
  643. })
  644. return;
  645. }
  646. this.$set(this.questionList[bindex],'ques',arr)
  647. let isWrong = this.questionList[bindex].ques.some((quesItem,quesIndex) => {
  648. return this.questionList[bindex].ques[quesIndex] != this.questionList[bindex].ans[quesIndex]
  649. })
  650. // 回答错误
  651. if(isWrong) {
  652. } else {
  653. let question = this.questionList.find(item => item.questionId == this.questionList[bindex].questionId);
  654. if(question) {
  655. this.$api.wrongRecordDelete({
  656. "examId": question.examId,
  657. "goodsId": question.goodsId,
  658. "questionId": question.questionId,
  659. }).then(res => {
  660. })
  661. }
  662. }
  663. },
  664. /**
  665. * @param {Object} 多选确认
  666. */
  667. checkboxSubmitChild(bindex,ansIndex) {
  668. if(this.questionList[bindex].ques[ansIndex]) return;
  669. let arr = [];
  670. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  671. if(item.checked) {
  672. arr.push(item.optionsId)
  673. }
  674. })
  675. if(!arr.length) {
  676. uni.showToast({
  677. title:'请选择答案',
  678. icon:'none'
  679. })
  680. return;
  681. }
  682. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  683. },
  684. judgeSelect(index,bindex) {
  685. if(this.questionList[bindex].ques) return;
  686. this.$set(this.questionList[bindex],'ques',index+'')
  687. // 回答错误
  688. if(this.questionList[bindex].ques != this.questionList[bindex].ans) {
  689. } else {
  690. this.$api.wrongRecordDelete({
  691. "examId": this.questionList[bindex].examId,
  692. "goodsId": this.questionList[bindex].goodsId,
  693. "questionId": this.questionList[bindex].questionId,
  694. }).then(res => {
  695. })
  696. }
  697. },
  698. judgeSelectChild(ansindex,childindex,bindex) {
  699. if(this.questionList[bindex].ques[ansindex]) return;
  700. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  701. },
  702. openFooterTab() {
  703. this.show = true;
  704. },
  705. hideDialog() {
  706. this.showDialog = false
  707. },
  708. changeIndex(index) {
  709. this.current = index
  710. },
  711. swiperChange(e) {
  712. this.current = e.detail.current;
  713. },
  714. deleteImg(imgIndex,bankIndex) {
  715. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  716. },
  717. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  718. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  719. },
  720. chooseImg(bankindex) {
  721. uni.chooseImage({
  722. count: 1, //默认9
  723. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  724. sourceType: ['album','camera'], //从相册选择
  725. success: (res) => {
  726. let self = this;
  727. // console.log(JSON.stringify(res.tempFilePaths));
  728. let img = res.tempFilePaths[0];
  729. uni.getImageInfo({
  730. src: img,
  731. success: async res => {
  732. let canvasWidth = res.width; //图片原始长宽
  733. let canvasHeight = res.height;
  734. if (canvasWidth > 1000 || canvasHeight > 1000) {
  735. uni.compressImage({
  736. src: img,
  737. quality: 75,
  738. width: '50%',
  739. height: '50%',
  740. success: async rest => {
  741. const dir = await self.uploadFile(rest.tempFilePath, 0);
  742. this.questionList[bankindex].ansText.imageList.push(dir)
  743. }
  744. });
  745. } else {
  746. const dir = await self.uploadFile(img, 0);
  747. this.questionList[bankindex].ansText.imageList.push(dir)
  748. }
  749. }
  750. });
  751. }
  752. })
  753. },
  754. chooseImgChild(bankindex,ansindex) {
  755. uni.chooseImage({
  756. count: 1, //默认9
  757. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  758. sourceType: ['album','camera'], //从相册选择
  759. success: (res) => {
  760. let self = this;
  761. // console.log(JSON.stringify(res.tempFilePaths));
  762. let img = res.tempFilePaths[0];
  763. uni.getImageInfo({
  764. src: img,
  765. success: async res => {
  766. let canvasWidth = res.width; //图片原始长宽
  767. let canvasHeight = res.height;
  768. if (canvasWidth > 1000 || canvasHeight > 1000) {
  769. uni.compressImage({
  770. src: img,
  771. quality: 75,
  772. width: '50%',
  773. height: '50%',
  774. success: async rest => {
  775. const dir = await self.uploadFile(rest.tempFilePath, 0);
  776. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  777. }
  778. });
  779. } else {
  780. const dir = await self.uploadFile(img, 0);
  781. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  782. }
  783. }
  784. });
  785. }
  786. })
  787. },
  788. uploadFile(options, int) {
  789. var self = this;
  790. return new Promise((resolve, reject) => {
  791. var data = {
  792. imageStatus: int
  793. };
  794. self.$api.aliyunpolicy(data).then(res => {
  795. console.log(res.data,6)
  796. if(res.data.code!=200){
  797. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  798. return
  799. }
  800. var ossToken = res.data.data.resultContent;
  801. if(ossToken.host==null||ossToken.host==undefined){
  802. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  803. return
  804. }
  805. uni.uploadFile({
  806. url: ossToken.host,
  807. name: 'file',
  808. filePath: options,
  809. fileType: 'image',
  810. header: {
  811. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  812. },
  813. formData: {
  814. key: ossToken.dir,
  815. OSSAccessKeyId: ossToken.accessid,
  816. policy: ossToken.policy,
  817. Signature: ossToken.signature,
  818. callback: ossToken.callback,
  819. success_action_status: 200
  820. },
  821. success: result => {
  822. if (result.statusCode === 200) {
  823. resolve(ossToken.dir);
  824. } else {
  825. uni.showToast({
  826. title: '上传失败',
  827. icon: 'none'
  828. });
  829. return;
  830. }
  831. },
  832. fail: error => {
  833. uni.showToast({
  834. title: '上传接口报错'+error,
  835. icon: 'none'
  836. });
  837. return;
  838. }
  839. });
  840. });
  841. });
  842. },
  843. submitAns(bankindex) {
  844. console.log(this.questionList[bankindex])
  845. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  846. uni.showToast({
  847. title: '请输入内容或上传图片',
  848. duration: 2000,
  849. icon:'none'
  850. });
  851. return
  852. }
  853. this.$set(this.questionList[bankindex],'ques',{
  854. imageList:this.questionList[bankindex].ansText.imageList,
  855. text:this.questionList[bankindex].ansText.text,
  856. })
  857. },
  858. submitAnsChild(bankindex,ansindex) {
  859. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  860. uni.showToast({
  861. title: '请输入内容或上传图片',
  862. duration: 2000,
  863. icon:'none'
  864. });
  865. return
  866. }
  867. this.$set(this.questionList[bankindex].ques,ansindex,{
  868. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  869. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  870. })
  871. },
  872. isRight(item,index) {
  873. //单选
  874. if(this.questionList[index].ques) {
  875. if(item.type == 1) {
  876. return this.questionList[index].ques == this.questionList[index].ans;
  877. //多选
  878. } else if(item.type == 2) {
  879. //每一项都相等
  880. return this.questionList[index].ans.every((item,i) => {
  881. return item == this.questionList[index].ques[i];
  882. })
  883. //判断
  884. } else if(item.type == 3) {
  885. return this.questionList[index].ques == this.questionList[index].ans;
  886. } else {
  887. return false;
  888. }
  889. } else {
  890. return false;
  891. }
  892. },
  893. right(bankIndex,ansIndex,option) {
  894. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  895. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  896. return true
  897. } else {
  898. return false;
  899. }
  900. } else {
  901. return false;
  902. }
  903. },
  904. wrong(bankIndex,ansIndex,option) {
  905. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  906. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  907. return true;
  908. } else {
  909. return false;
  910. }
  911. } else {
  912. return false;
  913. }
  914. },
  915. isWrong(item,index) {
  916. if(this.questionList[index].ques) {
  917. //单选
  918. if(item.type == 1) {
  919. return this.questionList[index].ques != this.questionList[index].ans;
  920. //多选
  921. } else if(item.type == 2) {
  922. //每一项都相等
  923. return this.questionList[index].ans.some((item,i) => {
  924. return item != this.questionList[index].ques[i];
  925. })
  926. //判断
  927. } else if(item.type == 3) {
  928. return this.questionList[index].ques != this.questionList[index].ans;
  929. } else {
  930. return false;
  931. }
  932. } else {
  933. return false;
  934. }
  935. },
  936. tabSelect(index,bankindex) {
  937. this.$set(this.questionList[bankindex],'current',index)
  938. },
  939. pdsubmit() {
  940. uni.showToast({
  941. icon:'none',
  942. title:'交卷成功',
  943. duration:1000,
  944. })
  945. setTimeout(() => {
  946. uni.navigateBack({
  947. delta:1
  948. })
  949. },1000)
  950. }
  951. }
  952. };
  953. </script>
  954. <style lang="scss" scoped>
  955. #questionBank {
  956. width:100%;
  957. height:100vh;
  958. display: flex;
  959. flex-direction: column;
  960. }
  961. .swiper {
  962. width: 100%;
  963. flex:1;
  964. }
  965. .lisSty {
  966. margin-bottom: 16rpx;
  967. display: flex;
  968. align-items: center;
  969. .flex_auto {
  970. flex:1;
  971. }
  972. }
  973. .activeTI {
  974. vertical-align: middle;
  975. display: inline-block;
  976. border: 1rpx solid #eee;
  977. border-radius: 50rpx;
  978. height: 48rpx;
  979. line-height: 46rpx;
  980. text-align: center;
  981. width: 48rpx;
  982. margin-right: 15rpx;
  983. color: #666;
  984. font-size: 30rpx;
  985. &.right {
  986. color:#fff;
  987. background:#36C75A;
  988. }
  989. &.wrong {
  990. color:#fff;
  991. background:#FF3B30;
  992. }
  993. &.checked {
  994. color:#fff;
  995. background:#007AFF;
  996. }
  997. }
  998. .submit_checkbox {
  999. position:fixed;
  1000. left:0;
  1001. right:0;
  1002. bottom:120rpx;
  1003. margin: 20rpx auto;
  1004. width: 526rpx;
  1005. height: 80rpx;
  1006. background: rgba(0, 122, 255, 1);
  1007. color:#fff;
  1008. text-align: center;
  1009. line-height: 80rpx;
  1010. font-size: 30rpx;
  1011. border-radius: 40rpx;
  1012. &.disabled {
  1013. opacity: 0.6;
  1014. }
  1015. }
  1016. .titles {
  1017. overflow: hidden;
  1018. margin-bottom: 24rpx;
  1019. }
  1020. .titBox {
  1021. padding: 41rpx 25rpx 24rpx 25rpx;
  1022. }
  1023. .titBox_title {
  1024. padding: 21rpx;
  1025. }
  1026. .tabs {
  1027. margin:10rpx;
  1028. display: flex;
  1029. .tab {
  1030. margin: 0 4rpx;
  1031. padding:10rpx 13rpx;
  1032. text-align: center;
  1033. color: #007aff;
  1034. font-size: 28rpx;
  1035. border-radius: 16rpx;
  1036. background:#fff;
  1037. &.current {
  1038. color:#fff;
  1039. background: #007AFF;
  1040. }
  1041. }
  1042. }
  1043. .ans {
  1044. margin:8rpx 8rpx 8rpx;
  1045. .ans_input {
  1046. border-radius: 16rpx;
  1047. background:#fff;
  1048. .top {
  1049. border-bottom:1rpx solid #EEEEEE;
  1050. padding: 16rpx;
  1051. display: flex;
  1052. align-items: center;
  1053. .icon {
  1054. margin-right:20rpx;
  1055. width: 40rpx;
  1056. height: 38rpx;
  1057. }
  1058. .progress {
  1059. flex:1;
  1060. }
  1061. .submit {
  1062. width: 168rpx;
  1063. height: 48rpx;
  1064. line-height: 48rpx;
  1065. text-align: center;
  1066. color:#fff;
  1067. font-size: 30rpx;
  1068. background: #007AFF;
  1069. border-radius: 24rpx;
  1070. }
  1071. }
  1072. .textarea {
  1073. textarea {
  1074. width:100%;
  1075. height:287rpx;
  1076. padding:10rpx;
  1077. }
  1078. }
  1079. .imgs {
  1080. overflow: hidden;
  1081. display: flex;
  1082. width:100%;
  1083. .img {
  1084. width: 104rpx;
  1085. height: 104rpx;
  1086. border-radius: 8rpx;
  1087. position:relative;
  1088. margin:20rpx;
  1089. text {
  1090. position:absolute;
  1091. right:-15rpx;
  1092. top:-15rpx;
  1093. width:30rpx;
  1094. height:30rpx;
  1095. text-align: center;
  1096. line-height: 30rpx;
  1097. color:#fff;
  1098. background:#FF3B30;
  1099. border-radius:50%;
  1100. }
  1101. image {
  1102. width:100%;
  1103. height:100%;
  1104. }
  1105. }
  1106. }
  1107. }
  1108. .ans_submit {
  1109. padding:16rpx;
  1110. border-radius: 16rpx;
  1111. background:#fff;
  1112. .imgs {
  1113. overflow: hidden;
  1114. display: flex;
  1115. width:100%;
  1116. .img {
  1117. width: 104rpx;
  1118. height: 104rpx;
  1119. border-radius: 8rpx;
  1120. position:relative;
  1121. margin:20rpx;
  1122. image {
  1123. width:100%;
  1124. height:100%;
  1125. }
  1126. }
  1127. }
  1128. }
  1129. }
  1130. .firstLetter {
  1131. display: flex;
  1132. justify-content: space-between;
  1133. align-items: center;
  1134. margin-bottom: 30rpx;
  1135. .leftLetters {
  1136. display: flex;
  1137. align-items: center;
  1138. width: 220rpx;
  1139. .btnType {
  1140. padding: 5rpx 10rpx;
  1141. border: 1rpx solid #007aff;
  1142. border-radius: 10rpx;
  1143. background-color: rgba(0, 122, 255, 0.1);
  1144. font-size: 28rpx;
  1145. color: #007aff;
  1146. margin-right: 15rpx;
  1147. }
  1148. }
  1149. }
  1150. .popupView {
  1151. height: 100%;
  1152. padding-bottom: 100rpx;
  1153. .popupTops {
  1154. height: 77rpx;
  1155. border-bottom: 1rpx solid #eee;
  1156. text-align: center;
  1157. line-height: 77rpx;
  1158. font-size: 24rpx;
  1159. color: #999;
  1160. position: relative;
  1161. .topIcon {
  1162. position: absolute;
  1163. top: 10rpx;
  1164. left: 50%;
  1165. transform: translateX(-50%);
  1166. width: 80rpx;
  1167. height: 8rpx;
  1168. background-color: #999;
  1169. border-radius: 4rpx;
  1170. }
  1171. }
  1172. .popupContent {
  1173. }
  1174. }
  1175. .pageContent {
  1176. position:relative;
  1177. background-color: #eaeef1;
  1178. height: 100%;
  1179. overflow-y: scroll;
  1180. padding-top: 8rpx;
  1181. padding-bottom: 100rpx;
  1182. }
  1183. .pad_8 {
  1184. background-color: #fff;
  1185. margin: 0rpx 8rpx 8rpx;
  1186. border-radius: 16rpx;
  1187. &.no-margin {
  1188. margin-top:-16rpx;
  1189. border-radius: 0 0 16rpx 16rpx;
  1190. }
  1191. }
  1192. .answer {
  1193. height: 80rpx;
  1194. line-height: 80rpx;
  1195. padding: 0rpx 24rpx;
  1196. display: flex;
  1197. align-items: center;
  1198. justify-content: space-between;
  1199. color: #666;
  1200. font-size: 30rpx;
  1201. }
  1202. .footer_btn {
  1203. background-color: #fff;
  1204. z-index: 10078;
  1205. position: fixed;
  1206. bottom: 0rpx;
  1207. display: flex;
  1208. align-items: center;
  1209. justify-content: space-between;
  1210. width: 100%;
  1211. height: 98rpx;
  1212. padding: 0rpx 38rpx;
  1213. border-top: 1rpx solid #eee;
  1214. .flex_center {
  1215. flex:1;
  1216. display: flex;
  1217. justify-content: center;
  1218. align-items: center;
  1219. flex-direction: column;
  1220. margin:0 200rpx;
  1221. font-size: 24rpx;
  1222. color: #999999;
  1223. .up-icon {
  1224. margin-bottom:18rpx;
  1225. width:100%;
  1226. display: flex;
  1227. justify-content: center;
  1228. image {
  1229. width:58rpx;
  1230. height:21rpx;
  1231. }
  1232. }
  1233. }
  1234. .collect {
  1235. visibility: hidden;
  1236. &.show {
  1237. visibility: visible;
  1238. }
  1239. >view {
  1240. display: flex;
  1241. flex-direction: column;
  1242. align-items: center;
  1243. justify-content: center;
  1244. image {
  1245. width:32rpx;
  1246. height:32rpx;
  1247. margin-bottom:6rpx;
  1248. }
  1249. view {
  1250. font-size: 24rpx;
  1251. color: #999999;
  1252. }
  1253. }
  1254. }
  1255. }
  1256. .boxSty {
  1257. padding: 44rpx 41rpx 0rpx;
  1258. }
  1259. .liListSty {
  1260. border:1rpx solid #EEEEEE;
  1261. width: 88rpx;
  1262. height: 88rpx;
  1263. border-radius: 32rpx;
  1264. text-align: center;
  1265. line-height: 88rpx;
  1266. color: #333;
  1267. font-size: 32rpx;
  1268. float: left;
  1269. margin: 20rpx 23rpx;
  1270. &.isRight {
  1271. border:1rpx solid #EEEEEE;
  1272. color:#fff;
  1273. background: #36C75A;
  1274. }
  1275. &.isWrong {
  1276. border:1rpx solid #EEEEEE;
  1277. color:#fff;
  1278. background: #FF3B30;
  1279. }
  1280. }
  1281. .answerInfos {
  1282. padding: 25rpx 25rpx 25rpx 23rpx;
  1283. }
  1284. .answerTitle {
  1285. margin-bottom: 28rpx;
  1286. color: #666;
  1287. font-size: 30rpx;
  1288. }
  1289. .answerContent {
  1290. font-size: 30rpx;
  1291. color: #666;
  1292. }
  1293. .textChild {
  1294. display: inline-block;
  1295. vertical-align: middle;
  1296. }
  1297. .dialog {
  1298. position: fixed;
  1299. left:0;
  1300. top:0;
  1301. width:100%;
  1302. height:100%;
  1303. background-color: rgba(0,0,0,0.8);
  1304. display: flex;
  1305. flex-direction: column;
  1306. align-items: center;
  1307. justify-content: center;
  1308. z-index: 20000;
  1309. .pointer {
  1310. width:338rpx;
  1311. height:240rpx;
  1312. }
  1313. .text {
  1314. font-size: 32rpx;
  1315. color: #FFFFFF;
  1316. text-align: center;
  1317. }
  1318. .btn {
  1319. width: 242rpx;
  1320. height: 82rpx;
  1321. border: 2rpx solid #FFFFFF;
  1322. border-radius: 16rpx;
  1323. text-align: center;
  1324. line-height: 82rpx;
  1325. margin:41rpx auto;
  1326. color:#fff;
  1327. font-size: 32rpx;
  1328. }
  1329. }
  1330. </style>