collectBank.vue 52 KB

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