collectTypeBank.vue 51 KB

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