questionBankExplain.vue 40 KB

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