questionBankExplain.vue 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518
  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 v-for="ansItem in bank.ans">{{ast[ansItem-1]}}</text>
  74. </view>
  75. <view v-if="!explain">我的答案:
  76. <text v-for="quesItem 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" >
  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 in bank.ques.imageList" :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="index" 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 v-for="ansItem1 in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
  210. </view>
  211. <view v-if="!explain">我的答案:
  212. <text v-for="quesItem 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" >
  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" v-for="ques 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. examId:this.id,
  584. goodsId:this.goodsId,
  585. recordId: this.recordId,
  586. rightQuestionNum:number,
  587. status:0,
  588. doQuestionNum: doQuestionNum,
  589. historyExamJson:JSON.stringify(this.questionList)
  590. }).then(res => {
  591. })
  592. }
  593. },
  594. /**
  595. * @param {Object} e单选点击
  596. */
  597. radioSelectChild(optionsId,ansIndex,bindex) {
  598. if(this.questionList[bindex].ques[ansIndex]) return;
  599. this.$set(this.questionList[bindex].ques,ansIndex,optionsId)
  600. },
  601. /**
  602. * @param {Object} 多选点击
  603. */
  604. checkboxSelect(optionsId,bindex,index) {
  605. this.$set(this.questionList[bindex].jsonStr[index],'checked',!this.questionList[bindex].jsonStr[index].checked)
  606. },
  607. /**
  608. * @param {Object} 多选点击
  609. */
  610. checkboxSelectChild(bindex,ansIndex,childIndex) {
  611. this.$set(this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],'checked',!this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex].checked)
  612. },
  613. /**
  614. * 提交数据
  615. */
  616. submit() {
  617. let score = 0; //计算总分
  618. let reportStatus = 0;
  619. let number = 0;
  620. let allScore = 0;
  621. let passScore = 0;
  622. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  623. let doQuestionIds = []; //做过的题目id
  624. let rightQuestionIds = []; //做对的题目id
  625. this.questionList.forEach((item,index) => {
  626. passScore = item.passScore
  627. if(item.type == 1) {
  628. if(item.ques == item.ans) {
  629. score += item.score;
  630. number++
  631. rightQuestionIds.push(item.questionId)
  632. } else { //错误
  633. doWrongQuestionIds.push(item.questionId)
  634. }
  635. allScore += item.score
  636. if (item.ques) {
  637. doQuestionNum++;
  638. doQuestionIds.push(item.questionId)
  639. }
  640. } else if(item.type == 2) {
  641. let isRight = item.ans && item.ans.every((quesItem,quesIndex) => {
  642. return item.ques[quesIndex] == item.ans[quesIndex]
  643. })
  644. if(isRight) {
  645. score += item.score;
  646. number++
  647. rightQuestionIds.push(item.questionId)
  648. } else {
  649. let checkboxScore = item.score; //获取单题总分数
  650. item.ques.forEach((ques,quesIndex) => {
  651. //选错一个全扣
  652. if(item.ans.indexOf(item.ques[quesIndex]) == -1) {
  653. checkboxScore = 0;
  654. }
  655. })
  656. console.log(checkboxScore)
  657. //没选错
  658. if(checkboxScore) {
  659. item.ans.forEach((ans,quesIndex) => {
  660. //漏选扣一部分
  661. console.log(item.ques.indexOf(item.ans[quesIndex]))
  662. if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
  663. checkboxScore -= item.partScore;
  664. }
  665. })
  666. }
  667. if(checkboxScore <= 0) { //0分
  668. item.scoreResult = 0;
  669. doWrongQuestionIds.push(item.questionId)
  670. } else { //部分分
  671. number++;
  672. item.scoreResult = checkboxScore;
  673. score += checkboxScore;
  674. rightQuestionIds.push(item.questionId)
  675. }
  676. }
  677. allScore += item.score;
  678. if (item.ques && item.ques.length) {
  679. doQuestionNum++;
  680. doQuestionIds.push(item.questionId)
  681. }
  682. } else if(item.type == 3) {
  683. if(item.ques == item.ans) {
  684. score += item.score;
  685. number++
  686. rightQuestionIds.push(item.questionId)
  687. } else {
  688. doWrongQuestionIds.push(item.questionId)
  689. }
  690. allScore += item.score;
  691. if (item.ques) {
  692. doQuestionNum++;
  693. doQuestionIds.push(item.questionId)
  694. }
  695. } else if (item.type == 4) {
  696. if (item.ques && item.ques.length) {
  697. doQuestionNum++;
  698. }
  699. } else if (item.type == 5) {
  700. if (item.ques) {
  701. doQuestionNum++;
  702. }
  703. }
  704. })
  705. //大于60分及格
  706. if(score >= passScore) {
  707. reportStatus = 1
  708. } else {
  709. reportStatus = 0
  710. }
  711. this.$api.examRecordEdit({
  712. examId:this.id,
  713. goodsId:this.goodsId,
  714. reportStatus:reportStatus,
  715. totalScore:allScore,
  716. recordId: this.recordId,
  717. rightQuestionNum:number,
  718. status:1,
  719. doQuestionIds:doQuestionIds.join(','),
  720. rightQuestionIds:rightQuestionIds.join(','),
  721. doQuestionNum: doQuestionNum,
  722. performance: score,
  723. historyExamJson:JSON.stringify(this.questionList)
  724. }).then(res => {
  725. this.isSubmit = true;
  726. if(res.data.code == 200) {
  727. uni.showToast({
  728. title: '交卷成功',
  729. duration: 2000,
  730. icon:'none'
  731. });
  732. setTimeout(() => {
  733. uni.redirectTo({
  734. url:'/pages2/bank/question_report?id='+this.recordId+'&examId='+this.id
  735. })
  736. },2000)
  737. }
  738. })
  739. },
  740. /**
  741. * @param {Object} 多选确认
  742. */
  743. checkboxSubmit(bindex) {
  744. if(this.questionList[bindex].ques) return;
  745. let arr = [];
  746. this.questionList[bindex].jsonStr.forEach(item => {
  747. if(item.checked) {
  748. arr.push(item.optionsId)
  749. }
  750. })
  751. this.$set(this.questionList[bindex],'ques',arr)
  752. },
  753. /**
  754. * @param {Object} 多选确认
  755. */
  756. checkboxSubmitChild(bindex,ansIndex) {
  757. if(this.questionList[bindex].ques[ansIndex]) return;
  758. let arr = [];
  759. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(item => {
  760. if(item.checked) {
  761. arr.push(item.optionsId)
  762. }
  763. })
  764. this.$set(this.questionList[bindex].ques,ansIndex,arr)
  765. },
  766. judgeSelect(index,bindex) {
  767. if(this.questionList[bindex].ques) return;
  768. this.$set(this.questionList[bindex],'ques',index+'')
  769. },
  770. judgeSelectChild(ansindex,childindex,bindex) {
  771. if(this.questionList[bindex].ques[ansindex]) return;
  772. this.$set(this.questionList[bindex].ques,ansindex,childindex+'')
  773. },
  774. openFooterTab() {
  775. this.show = true;
  776. },
  777. hideDialog() {
  778. this.showDialog = false
  779. },
  780. changeIndex(index) {
  781. this.current = index
  782. },
  783. swiperChange(e) {
  784. this.current = e.detail.current;
  785. },
  786. deleteImg(imgIndex,bankIndex) {
  787. this.questionList[bankIndex].ansText.imageList.splice(imgIndex,1)
  788. },
  789. deleteImgChild(imgIndex,bankIndex,ansIndex) {
  790. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(imgIndex,1)
  791. },
  792. chooseImg(bankindex) {
  793. uni.chooseImage({
  794. count: 1, //默认9
  795. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  796. sourceType: ['album','camera'], //从相册选择
  797. success: (res) => {
  798. let self = this;
  799. // console.log(JSON.stringify(res.tempFilePaths));
  800. let img = res.tempFilePaths[0];
  801. uni.getImageInfo({
  802. src: img,
  803. success: async res => {
  804. let canvasWidth = res.width; //图片原始长宽
  805. let canvasHeight = res.height;
  806. if (canvasWidth > 1000 || canvasHeight > 1000) {
  807. uni.compressImage({
  808. src: img,
  809. quality: 75,
  810. width: '50%',
  811. height: '50%',
  812. success: async rest => {
  813. const dir = await self.uploadFile(rest.tempFilePath, 0);
  814. this.questionList[bankindex].ansText.imageList.push(dir)
  815. }
  816. });
  817. } else {
  818. const dir = await self.uploadFile(img, 0);
  819. this.questionList[bankindex].ansText.imageList.push(dir)
  820. }
  821. }
  822. });
  823. }
  824. })
  825. },
  826. chooseImgChild(bankindex,ansindex) {
  827. uni.chooseImage({
  828. count: 1, //默认9
  829. sizeType: ['compressed', ], //可以指定是原图还是压缩图,默认二者都有
  830. sourceType: ['album','camera'], //从相册选择
  831. success: (res) => {
  832. let self = this;
  833. // console.log(JSON.stringify(res.tempFilePaths));
  834. let img = res.tempFilePaths[0];
  835. uni.getImageInfo({
  836. src: img,
  837. success: async res => {
  838. let canvasWidth = res.width; //图片原始长宽
  839. let canvasHeight = res.height;
  840. if (canvasWidth > 1000 || canvasHeight > 1000) {
  841. uni.compressImage({
  842. src: img,
  843. quality: 75,
  844. width: '50%',
  845. height: '50%',
  846. success: async rest => {
  847. const dir = await self.uploadFile(rest.tempFilePath, 0);
  848. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  849. }
  850. });
  851. } else {
  852. const dir = await self.uploadFile(img, 0);
  853. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.push(dir)
  854. }
  855. }
  856. });
  857. }
  858. })
  859. },
  860. uploadFile(options, int) {
  861. var self = this;
  862. return new Promise((resolve, reject) => {
  863. var data = {
  864. imageStatus: int
  865. };
  866. self.$api.aliyunpolicy(data).then(res => {
  867. console.log(res.data,6)
  868. if(res.data.code!=200){
  869. self.$method.showToast('签名错误'+JSON.stringify(res.data))
  870. return
  871. }
  872. var ossToken = res.data.data.resultContent;
  873. if(ossToken.host==null||ossToken.host==undefined){
  874. self.$method.showToast('上传路径报错'+JSON.stringify(res.data))
  875. return
  876. }
  877. uni.uploadFile({
  878. url: ossToken.host,
  879. name: 'file',
  880. filePath: options,
  881. fileType: 'image',
  882. header: {
  883. AuthorizationToken: 'WX ' + uni.getStorageSync('token')
  884. },
  885. formData: {
  886. key: ossToken.dir,
  887. OSSAccessKeyId: ossToken.accessid,
  888. policy: ossToken.policy,
  889. Signature: ossToken.signature,
  890. callback: ossToken.callback,
  891. success_action_status: 200
  892. },
  893. success: result => {
  894. if (result.statusCode === 200) {
  895. resolve(ossToken.dir);
  896. } else {
  897. uni.showToast({
  898. title: '上传失败',
  899. icon: 'none'
  900. });
  901. return;
  902. }
  903. },
  904. fail: error => {
  905. uni.showToast({
  906. title: '上传接口报错'+error,
  907. icon: 'none'
  908. });
  909. return;
  910. }
  911. });
  912. });
  913. });
  914. },
  915. submitAns(bankindex) {
  916. console.log(this.questionList[bankindex])
  917. if(!this.questionList[bankindex].ansText.text && !this.questionList[bankindex].ansText.imageList.length) {
  918. uni.showToast({
  919. title: '请输入内容或上传图片',
  920. duration: 2000,
  921. icon:'none'
  922. });
  923. return
  924. }
  925. this.$set(this.questionList[bankindex],'ques',{
  926. imageList:this.questionList[bankindex].ansText.imageList,
  927. text:this.questionList[bankindex].ansText.text,
  928. })
  929. },
  930. submitAnsChild(bankindex,ansindex) {
  931. if(!this.questionList[bankindex].jsonStr[ansindex].ansText.text && !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length) {
  932. uni.showToast({
  933. title: '请输入内容或上传图片',
  934. duration: 2000,
  935. icon:'none'
  936. });
  937. return
  938. }
  939. this.$set(this.questionList[bankindex].ques,ansindex,{
  940. imageList:this.questionList[bankindex].jsonStr[ansindex].ansText.imageList,
  941. text:this.questionList[bankindex].jsonStr[ansindex].ansText.text,
  942. })
  943. },
  944. isRight(item,index) {
  945. //单选
  946. if(this.questionList[index].ques) {
  947. if(item.type == 1) {
  948. return this.questionList[index].ques == this.questionList[index].ans;
  949. //多选
  950. } else if(item.type == 2) {
  951. //每一项都相等
  952. return this.questionList[index].ques.every((item,i) => {
  953. console.log(item == this.questionList[index].ans[i])
  954. return item == this.questionList[index].ans[i];
  955. })
  956. //判断
  957. } else if(item.type == 3) {
  958. return this.questionList[index].ques == this.questionList[index].ans;
  959. } else {
  960. return false;
  961. }
  962. } else {
  963. return false;
  964. }
  965. },
  966. right(bankIndex,ansIndex,option) {
  967. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  968. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) || (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) != -1)) {
  969. return true
  970. } else {
  971. return false;
  972. }
  973. } else {
  974. return false;
  975. }
  976. },
  977. wrong(bankIndex,ansIndex,option) {
  978. if(this.questionList[bankIndex].ques[ansIndex] && this.questionList[bankIndex].ans[ansIndex]) {
  979. if((this.questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1 ) && (this.questionList[bankIndex].ans[ansIndex].indexOf(option.optionsId) == -1)) {
  980. return true;
  981. } else {
  982. return false;
  983. }
  984. } else {
  985. return false;
  986. }
  987. },
  988. isWrong(item,index) {
  989. if(this.questionList[index].ques) {
  990. //单选
  991. if(item.type == 1) {
  992. return this.questionList[index].ques != this.questionList[index].ans;
  993. //多选
  994. } else if(item.type == 2) {
  995. //每一项都相等
  996. return this.questionList[index].ques.some((item,i) => {
  997. return item != this.questionList[index].ans[i];
  998. })
  999. //判断
  1000. } else if(item.type == 3) {
  1001. return this.questionList[index].ques != this.questionList[index].ans;
  1002. } else {
  1003. return false;
  1004. }
  1005. } else {
  1006. return false;
  1007. }
  1008. },
  1009. tabSelect(index,bankindex) {
  1010. this.$set(this.questionList[bankindex],'current',index)
  1011. },
  1012. }
  1013. };
  1014. </script>
  1015. <style lang="scss" scoped>
  1016. .swiper {
  1017. width:100%;
  1018. height:100vh;
  1019. }
  1020. .lisSty {
  1021. margin-bottom: 16rpx;
  1022. display: flex;
  1023. .flex_auto {
  1024. flex:1;
  1025. }
  1026. }
  1027. .activeTI {
  1028. vertical-align: middle;
  1029. display: inline-block;
  1030. border: 1rpx solid #eee;
  1031. border-radius: 50rpx;
  1032. height: 48rpx;
  1033. line-height: 46rpx;
  1034. text-align: center;
  1035. width: 48rpx;
  1036. margin-right: 15rpx;
  1037. color: #666;
  1038. font-size: 30rpx;
  1039. &.right {
  1040. color:#fff;
  1041. background:green;
  1042. }
  1043. &.wrong {
  1044. color:#fff;
  1045. background:red;
  1046. }
  1047. &.checked {
  1048. color:#fff;
  1049. background:blue;
  1050. }
  1051. }
  1052. .submit_checkbox {
  1053. margin:20rpx auto;
  1054. width: 526rpx;
  1055. height: 80rpx;
  1056. background: rgba(0, 122, 255, 1);
  1057. color:#fff;
  1058. text-align: center;
  1059. line-height: 80rpx;
  1060. font-size: 30rpx;
  1061. border-radius: 40rpx;
  1062. }
  1063. .titles {
  1064. overflow: hidden;
  1065. margin-bottom: 24rpx;
  1066. }
  1067. .titBox {
  1068. padding: 41rpx 25rpx 24rpx 25rpx;
  1069. }
  1070. .tabs {
  1071. margin:10rpx;
  1072. display: flex;
  1073. .tab {
  1074. margin:0 10rpx;
  1075. width: 96rpx;
  1076. height: 48rpx;
  1077. line-height: 48rpx;
  1078. text-align: center;
  1079. color:#007AFF;
  1080. font-size: 28rpx;
  1081. border-radius: 16rpx;
  1082. &.current {
  1083. color:#fff;
  1084. background: #007AFF;
  1085. }
  1086. }
  1087. }
  1088. .ans {
  1089. margin:8rpx 8rpx 8rpx;
  1090. .ans_input {
  1091. border-radius: 16rpx;
  1092. background:#fff;
  1093. .top {
  1094. border-bottom:1rpx solid #EEEEEE;
  1095. padding: 16rpx;
  1096. display: flex;
  1097. align-items: center;
  1098. .icon {
  1099. margin-right:20rpx;
  1100. width: 40rpx;
  1101. height: 38rpx;
  1102. }
  1103. .progress {
  1104. flex:1;
  1105. }
  1106. .submit {
  1107. width: 168rpx;
  1108. height: 48rpx;
  1109. line-height: 48rpx;
  1110. text-align: center;
  1111. color:#fff;
  1112. font-size: 30rpx;
  1113. background: #007AFF;
  1114. border-radius: 24rpx;
  1115. &.disabled {
  1116. opacity: 0.6;
  1117. }
  1118. }
  1119. }
  1120. .textarea {
  1121. textarea {
  1122. width:100%;
  1123. height:287rpx;
  1124. padding:10rpx;
  1125. }
  1126. }
  1127. .imgs {
  1128. overflow: hidden;
  1129. display: flex;
  1130. width:100%;
  1131. .img {
  1132. width: 104rpx;
  1133. height: 104rpx;
  1134. border-radius: 8rpx;
  1135. position:relative;
  1136. margin:20rpx;
  1137. text {
  1138. position:absolute;
  1139. right:-15rpx;
  1140. top:-15rpx;
  1141. width:30rpx;
  1142. height:30rpx;
  1143. text-align: center;
  1144. line-height: 30rpx;
  1145. color:#fff;
  1146. background:red;
  1147. border-radius:50%;
  1148. }
  1149. image {
  1150. width:100%;
  1151. height:100%;
  1152. }
  1153. }
  1154. }
  1155. }
  1156. .ans_submit {
  1157. padding:16rpx;
  1158. border-radius: 16rpx;
  1159. background:#fff;
  1160. .imgs {
  1161. overflow: hidden;
  1162. display: flex;
  1163. width:100%;
  1164. .img {
  1165. width: 104rpx;
  1166. height: 104rpx;
  1167. border-radius: 8rpx;
  1168. position:relative;
  1169. margin:20rpx;
  1170. image {
  1171. width:100%;
  1172. height:100%;
  1173. }
  1174. }
  1175. }
  1176. }
  1177. }
  1178. .firstLetter {
  1179. display: flex;
  1180. justify-content: space-between;
  1181. align-items: center;
  1182. margin-bottom: 30rpx;
  1183. .leftLetters {
  1184. display: flex;
  1185. align-items: center;
  1186. width: 220rpx;
  1187. .btnType {
  1188. padding: 5rpx 10rpx;
  1189. border: 1rpx solid #007aff;
  1190. border-radius: 10rpx;
  1191. background-color: rgba(0, 122, 255, 0.1);
  1192. font-size: 28rpx;
  1193. color: #007aff;
  1194. margin-right: 15rpx;
  1195. }
  1196. }
  1197. }
  1198. .popupView {
  1199. height: 100%;
  1200. padding-bottom: 100rpx;
  1201. .popupTops {
  1202. height: 77rpx;
  1203. border-bottom: 1rpx solid #eee;
  1204. text-align: center;
  1205. line-height: 77rpx;
  1206. font-size: 24rpx;
  1207. color: #999;
  1208. position: relative;
  1209. .topIcon {
  1210. position: absolute;
  1211. top: 10rpx;
  1212. left: 50%;
  1213. transform: translateX(-50%);
  1214. width: 80rpx;
  1215. height: 8rpx;
  1216. background-color: #999;
  1217. border-radius: 4rpx;
  1218. }
  1219. }
  1220. .popupContent {
  1221. }
  1222. }
  1223. .pageContent {
  1224. position:relative;
  1225. background-color: #eaeef1;
  1226. height: 100%;
  1227. overflow-y: scroll;
  1228. padding-top: 8rpx;
  1229. padding-bottom: 100rpx;
  1230. }
  1231. .pad_8 {
  1232. background-color: #fff;
  1233. margin: 0rpx 8rpx 8rpx;
  1234. border-radius: 16rpx;
  1235. &.no-margin {
  1236. margin-top:-16rpx;
  1237. border-radius: 0 0 16rpx 16rpx;
  1238. }
  1239. }
  1240. .answer {
  1241. height: 80rpx;
  1242. line-height: 80rpx;
  1243. padding: 0rpx 24rpx;
  1244. display: flex;
  1245. align-items: center;
  1246. justify-content: space-between;
  1247. color: #666;
  1248. font-size: 30rpx;
  1249. }
  1250. .footer_btn {
  1251. background-color: #fff;
  1252. z-index: 10078;
  1253. position: fixed;
  1254. bottom: 0rpx;
  1255. display: flex;
  1256. align-items: center;
  1257. justify-content: space-between;
  1258. width: 100%;
  1259. height: 98rpx;
  1260. padding: 0rpx 38rpx;
  1261. border-top: 1rpx solid #eee;
  1262. .flex_center {
  1263. flex:1;
  1264. display: flex;
  1265. justify-content: center;
  1266. align-items: center;
  1267. flex-direction: column;
  1268. margin:0 200rpx;
  1269. font-size: 24rpx;
  1270. color: #999999;
  1271. .up-icon {
  1272. margin-bottom:18rpx;
  1273. width:100%;
  1274. display: flex;
  1275. justify-content: center;
  1276. image {
  1277. width:58rpx;
  1278. height:21rpx;
  1279. }
  1280. }
  1281. }
  1282. .collect {
  1283. visibility: hidden;
  1284. width:100rpx;
  1285. &.show {
  1286. visibility: visible;
  1287. }
  1288. >view {
  1289. display: flex;
  1290. flex-direction: column;
  1291. align-items: center;
  1292. justify-content: center;
  1293. image {
  1294. width:32rpx;
  1295. height:32rpx;
  1296. margin-bottom:6rpx;
  1297. }
  1298. view {
  1299. font-size: 24rpx;
  1300. color: #999999;
  1301. }
  1302. }
  1303. }
  1304. }
  1305. .boxSty {
  1306. padding: 44rpx 41rpx 0rpx;
  1307. }
  1308. .liListSty {
  1309. border:1rpx solid #EEEEEE;
  1310. width: 88rpx;
  1311. height: 88rpx;
  1312. border-radius: 32rpx;
  1313. text-align: center;
  1314. line-height: 88rpx;
  1315. color: #333;
  1316. font-size: 32rpx;
  1317. float: left;
  1318. margin: 20rpx 23rpx;
  1319. &.isRight {
  1320. border:1rpx solid #EEEEEE;
  1321. color:#fff;
  1322. background: green;
  1323. }
  1324. &.isWrong {
  1325. border:1rpx solid #EEEEEE;
  1326. color:#fff;
  1327. background: red;
  1328. }
  1329. }
  1330. .answerInfos {
  1331. padding: 25rpx 25rpx 25rpx 23rpx;
  1332. }
  1333. .answerTitle {
  1334. margin-bottom: 28rpx;
  1335. color: #666;
  1336. font-size: 30rpx;
  1337. }
  1338. .answerContent {
  1339. font-size: 30rpx;
  1340. color: #666;
  1341. }
  1342. .textChild {
  1343. display: inline-block;
  1344. vertical-align: middle;
  1345. }
  1346. .dialog {
  1347. position: fixed;
  1348. left:0;
  1349. top:0;
  1350. width:100%;
  1351. height:100%;
  1352. background-color: rgba(0,0,0,0.8);
  1353. display: flex;
  1354. flex-direction: column;
  1355. align-items: center;
  1356. justify-content: center;
  1357. z-index: 20000;
  1358. .pointer {
  1359. width:338rpx;
  1360. height:240rpx;
  1361. }
  1362. .text {
  1363. font-size: 32rpx;
  1364. color: #FFFFFF;
  1365. text-align: center;
  1366. }
  1367. .btn {
  1368. width: 242rpx;
  1369. height: 82rpx;
  1370. border: 2rpx solid #FFFFFF;
  1371. border-radius: 16rpx;
  1372. text-align: center;
  1373. line-height: 82rpx;
  1374. margin:41rpx auto;
  1375. color:#fff;
  1376. font-size: 32rpx;
  1377. }
  1378. }
  1379. </style>