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