collectTypeBank.vue 51 KB

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