wrongBank.vue 39 KB

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