bankExam.vue 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238
  1. <template>
  2. <view class="bankExam">
  3. <swiper
  4. class="swiper"
  5. :current="currentIndex"
  6. @change="swiperChange"
  7. :interval="interval"
  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">{{
  24. countdown(lastTime)
  25. }}</view>
  26. </view>
  27. <view class="titles" @click="showPhoto(bank.content)"
  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. >
  69. {{ ast[index] }}
  70. </text>
  71. <view class="flex_auto">
  72. {{ item.content }}
  73. <view v-if="item.imgUrl">
  74. <image
  75. style="width: 600rpx"
  76. mode="widthFix"
  77. :src="$method.splitImgHost(item.imgUrl)"
  78. ></image>
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. <view v-if="bank.ques">
  85. <view class="pad_8 answer">
  86. <view>正确答案:{{ ast[bank.ans - 1] }} </view>
  87. <view>我的答案:{{ ast[bank.ques - 1] }}</view>
  88. </view>
  89. <view class="pad_8 answerInfos">
  90. <view class="answerTitle">答案解析</view>
  91. <view class="answerContent"
  92. ><rich-text :nodes="bank.analysisContent"></rich-text
  93. ></view>
  94. </view>
  95. </view>
  96. </template>
  97. <template v-if="bank.type == 2">
  98. <view class="pad_8 titBox no-margin">
  99. <view v-if="!bank.ques">
  100. <view
  101. v-for="(item, index) in bank.jsonStr"
  102. :key="index"
  103. class="lisSty"
  104. @click="checkboxSelect(item.optionsId, bankIndex, index)"
  105. >
  106. <view :class="{ checked: item.checked }" class="activeTI">{{
  107. ast[index]
  108. }}</view>
  109. <view class="flex_auto">
  110. {{ item.content }}
  111. <view v-if="item.imgUrl">
  112. <image
  113. style="width: 600rpx"
  114. mode="widthFix"
  115. :src="$method.splitImgHost(item.imgUrl)"
  116. ></image>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. <view v-if="bank.ques">
  122. <view
  123. v-for="(item, index) in bank.jsonStr"
  124. :key="index"
  125. class="lisSty"
  126. >
  127. <text
  128. :class="{
  129. right:
  130. bank.ques.indexOf(item.optionsId) != -1 ||
  131. bank.ans.indexOf(item.optionsId) != -1,
  132. wrong:
  133. bank.ques.indexOf(item.optionsId) != -1 &&
  134. bank.ans.indexOf(item.optionsId) == -1,
  135. }"
  136. class="activeTI"
  137. >
  138. {{ ast[index] }}
  139. </text>
  140. <view class="flex_auto">
  141. {{ item.content }}
  142. <view v-if="item.imgUrl">
  143. <image
  144. style="width: 600rpx"
  145. mode="widthFix"
  146. :src="$method.splitImgHost(item.imgUrl)"
  147. ></image>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. <view
  153. v-if="!bank.ques"
  154. class="submit_checkbox"
  155. :class="{ disabled: !isCheckboxChecked(bank.jsonStr) }"
  156. @click="checkboxSubmit(bankIndex)"
  157. >确认答案</view
  158. >
  159. </view>
  160. <view v-if="bank.ques">
  161. <view class="pad_8 answer">
  162. <view>
  163. 正确答案:
  164. <text
  165. v-for="(ansItem, ansIndex) in bank.ans"
  166. :key="ansIndex"
  167. >{{ ast[ansItem - 1] }}</text
  168. >
  169. </view>
  170. <view>
  171. 我的答案:
  172. <text
  173. v-for="(quesItem, quesIndex) in bank.ques"
  174. :key="quesIndex"
  175. >{{ ast[quesItem - 1] }}</text
  176. >
  177. </view>
  178. </view>
  179. <view class="pad_8 answerInfos">
  180. <view class="answerTitle">答案解析</view>
  181. <view class="answerContent"
  182. ><rich-text :nodes="bank.analysisContent"></rich-text
  183. ></view>
  184. </view>
  185. </view>
  186. </template>
  187. <template v-if="bank.type == 3">
  188. <view class="pad_8 titBox no-margin">
  189. <view v-if="!bank.ques">
  190. <view
  191. v-for="(item, index) in judge"
  192. :key="index"
  193. class="lisSty"
  194. @click="judgeSelect(index, bankIndex)"
  195. >
  196. <view class="activeTI">{{ ast[index] }}</view>
  197. <view class="flex_auto">
  198. {{ item }}
  199. <view v-if="item.imgUrl">
  200. <image
  201. style="width: 600rpx"
  202. mode="widthFix"
  203. :src="$method.splitImgHost(item.imgUrl)"
  204. ></image>
  205. </view>
  206. </view>
  207. </view>
  208. </view>
  209. <view v-if="bank.ques">
  210. <view
  211. v-for="(item, index) in judge"
  212. :key="index"
  213. class="lisSty"
  214. >
  215. <text
  216. :class="{
  217. right: index == bank.ques || index == bank.ans,
  218. wrong: index == bank.ques && bank.ques != bank.ans,
  219. }"
  220. class="activeTI"
  221. >
  222. {{ ast[index] }}
  223. </text>
  224. <view class="flex_auto">
  225. {{ item }}
  226. <view v-if="item.imgUrl">
  227. <image
  228. style="width: 600rpx"
  229. mode="widthFix"
  230. :src="$method.splitImgHost(item.imgUrl)"
  231. ></image>
  232. </view>
  233. </view>
  234. </view>
  235. </view>
  236. </view>
  237. <view v-if="bank.ques">
  238. <view class="pad_8 answer">
  239. <view>正确答案:{{ ast[bank.ans] }}</view>
  240. <view>我的答案:{{ ast[bank.ques] }}</view>
  241. </view>
  242. <view class="pad_8 answerInfos">
  243. <view class="answerTitle">答案解析</view>
  244. <view class="answerContent"
  245. ><rich-text :nodes="bank.analysisContent"></rich-text
  246. ></view>
  247. </view>
  248. </view>
  249. </template>
  250. <!-- 简答题 -->
  251. <template v-if="bank.type == 5">
  252. <view class="pad_8 titBox">
  253. <view class="ans">
  254. <view
  255. class="ans_input"
  256. v-if="
  257. !bank.ques ||
  258. (!bank.ques.imageList.length && !bank.ques.text)
  259. "
  260. >
  261. <view class="top flex">
  262. <image
  263. :data-index="bankIndex"
  264. class="icon"
  265. @click="chooseImg(bankIndex)"
  266. src="/static/camera.png"
  267. mode=""
  268. ></image>
  269. <view class="progress"
  270. >{{ bank.ansText.imageList.length || "0" }}/4</view
  271. >
  272. <view
  273. class="submit"
  274. :class="{ disabled: !bank.ansText.text && hasImgs(bank) }"
  275. @click="submitAns(bankIndex)"
  276. >确认答案</view
  277. >
  278. </view>
  279. <view class="textarea">
  280. <textarea
  281. v-model="bank.ansText.text"
  282. placeholder="在此输入答案"
  283. ></textarea>
  284. </view>
  285. <view class="imgs">
  286. <view
  287. class="img"
  288. v-for="(img, imgIndex) in bank.ansText.imageList"
  289. :key="imgIndex"
  290. >
  291. <text @click="deleteImg(imgIndex, bankIndex)">x</text>
  292. <image :src="$method.splitImgHost(img, true)"></image>
  293. </view>
  294. </view>
  295. </view>
  296. <view
  297. class="ans_submit answerInfos"
  298. v-if="
  299. bank.ques && (bank.ques.imageList.length || bank.ques.text)
  300. "
  301. >
  302. <view class="answerTitle">我的答案:</view>
  303. {{ bank.ques.text }}
  304. <view class="imgs"
  305. ><image
  306. class="img"
  307. :key="quesIndex"
  308. v-for="(ques, quesIndex) in bank.ques.imageList"
  309. :src="$method.splitImgHost(ques, true)"
  310. ></image
  311. ></view>
  312. </view>
  313. </view>
  314. </view>
  315. <view
  316. v-if="bank.ques && (bank.ques.imageList.length || bank.ques.text)"
  317. >
  318. <view class="pad_8 answerInfos">
  319. <view class="answerTitle">答案解析:</view>
  320. <view class="answerContent"
  321. ><rich-text :nodes="bank.analysisContent"></rich-text
  322. ></view>
  323. </view>
  324. </view>
  325. </template>
  326. <!-- 案例题 -->
  327. <template v-if="bank.type == 4">
  328. <view class="tabs">
  329. <view
  330. class="tab"
  331. :class="{ current: tabIndex == bank.current }"
  332. :key="tabIndex"
  333. v-for="(tab, tabIndex) in bank.jsonStr"
  334. @click="tabSelect(tabIndex, bankIndex)"
  335. >
  336. 问题{{ tabIndex + 1 }}
  337. </view>
  338. </view>
  339. <view
  340. v-for="(ansItem, ansIndex) in bank.jsonStr"
  341. v-if="bank.current == ansIndex"
  342. :key="ansIndex"
  343. >
  344. <template v-if="ansItem.type == 1">
  345. <view class="pad_8 titBox">
  346. <view class="leftLetters">
  347. <view class="btnType">
  348. <text>单选</text>
  349. </view>
  350. </view>
  351. <view class="titles"
  352. ><rich-text :nodes="ansItem.content"></rich-text
  353. ></view>
  354. <view v-if="!bank.ques[ansIndex]">
  355. <view
  356. v-for="(option, childIndex) in ansItem.optionsList"
  357. :key="childIndex"
  358. class="lisSty"
  359. @click="
  360. radioSelectChild(option.optionsId, ansIndex, bankIndex)
  361. "
  362. >
  363. <view class="activeTI">{{ ast[childIndex] }}</view>
  364. <view class="flex_auto">
  365. <rich-text
  366. class="textChild"
  367. :nodes="option.content"
  368. ></rich-text>
  369. <view v-if="option.imgUrl">
  370. <image
  371. style="width: 600rpx"
  372. mode="widthFix"
  373. :src="$method.splitImgHost(option.imgUrl)"
  374. ></image>
  375. </view>
  376. </view>
  377. </view>
  378. </view>
  379. <view v-if="bank.ques[ansIndex]">
  380. <view
  381. v-for="(option, childIndex) in ansItem.optionsList"
  382. :key="childIndex"
  383. class="lisSty"
  384. >
  385. <text
  386. :class="{
  387. right:
  388. option.optionsId == bank.ques[ansIndex] ||
  389. option.optionsId == bank.ans[ansIndex],
  390. wrong:
  391. option.optionsId == bank.ques[ansIndex] &&
  392. bank.ques[ansIndex] != bank.ans[ansIndex],
  393. }"
  394. class="activeTI"
  395. >
  396. {{ ast[childIndex] }}
  397. </text>
  398. <view class="flex_auto">
  399. <rich-text :nodes="option.content"></rich-text>
  400. <view v-if="option.imgUrl">
  401. <image
  402. style="width: 600rpx"
  403. mode="widthFix"
  404. :src="$method.splitImgHost(option.imgUrl)"
  405. ></image>
  406. </view>
  407. </view>
  408. </view>
  409. </view>
  410. </view>
  411. <view v-if="bank.ques[ansIndex]">
  412. <view class="pad_8 answer">
  413. <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
  414. <view>我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view>
  415. </view>
  416. <view class="pad_8 answerInfos">
  417. <view class="answerTitle">答案解析</view>
  418. <view class="answerContent"
  419. ><rich-text :nodes="option.analysisContent"></rich-text
  420. ></view>
  421. </view>
  422. </view>
  423. </template>
  424. <template v-if="ansItem.type == 2">
  425. <view class="pad_8 titBox">
  426. <view class="leftLetters">
  427. <view class="btnType">
  428. <text>多选</text>
  429. </view>
  430. </view>
  431. <view class="titles"
  432. ><rich-text :nodes="ansItem.content"></rich-text
  433. ></view>
  434. <view v-if="!bank.ques[ansIndex]">
  435. <view
  436. v-for="(option, childindex) in ansItem.optionsList"
  437. :key="childindex"
  438. class="lisSty"
  439. @click="
  440. checkboxSelectChild(bankIndex, ansIndex, childindex)
  441. "
  442. >
  443. <view
  444. :class="{ checked: option.checked }"
  445. class="activeTI"
  446. >{{ ast[childindex] }}</view
  447. >
  448. <view class="flex_auto">
  449. <rich-text :nodes="option.content"></rich-text>
  450. <view v-if="option.imgUrl">
  451. <image
  452. style="width: 600rpx"
  453. mode="widthFix"
  454. :src="$method.splitImgHost(option.imgUrl)"
  455. ></image>
  456. </view>
  457. </view>
  458. </view>
  459. </view>
  460. <view
  461. v-if="!bank.ques[ansIndex]"
  462. class="submit_checkbox"
  463. :class="{
  464. disabled: !isCheckboxChecked(ansItem.optionsList),
  465. }"
  466. @click="checkboxSubmitChild(bankIndex, ansIndex)"
  467. >确认答案</view
  468. >
  469. <view v-if="bank.ques && bank.ques[ansIndex]">
  470. <view
  471. v-for="(option, childindex) in ansItem.optionsList"
  472. :key="childindex"
  473. class="lisSty"
  474. >
  475. <text
  476. :class="{
  477. right: right(bankIndex, ansIndex, option),
  478. wrong: wrong(bankIndex, ansIndex, option),
  479. }"
  480. class="activeTI"
  481. >
  482. {{ ast[childindex] }}
  483. </text>
  484. <view class="flex_auto">
  485. <rich-text :nodes="option.content"></rich-text>
  486. <view v-if="option.imgUrl">
  487. <image
  488. style="width: 600rpx"
  489. mode="widthFix"
  490. :src="$method.splitImgHost(option.imgUrl)"
  491. ></image>
  492. </view>
  493. </view>
  494. </view>
  495. </view>
  496. </view>
  497. <view v-if="bank.ques[ansIndex]">
  498. <view class="pad_8 answer">
  499. <view>
  500. 正确答案:
  501. <text
  502. :key="ansItemIndex1"
  503. v-for="(ansItem1, ansItemIndex1) in bank.ans[ansIndex]"
  504. >{{ ast[ansItem1 - 1] }}</text
  505. >
  506. </view>
  507. <view>
  508. 我的答案:
  509. <text
  510. :key="quesItemIndex"
  511. v-for="(quesItem, quesItemIndex) in bank.ques[ansIndex]"
  512. >{{ ast[quesItem - 1] }}</text
  513. >
  514. </view>
  515. </view>
  516. <view class="pad_8 answerInfos">
  517. <view class="answerTitle">答案解析</view>
  518. <view class="answerContent"
  519. ><rich-text :nodes="ansItem.analysisContent"></rich-text
  520. ></view>
  521. </view>
  522. </view>
  523. </template>
  524. <template v-if="ansItem.type == 3">
  525. <view class="pad_8 titBox">
  526. <view class="leftLetters">
  527. <view class="btnType">
  528. <text>判断</text>
  529. </view>
  530. </view>
  531. <view class="titles"
  532. ><rich-text :nodes="ansItem.content"></rich-text
  533. ></view>
  534. <view v-if="!bank.ques[ansIndex]">
  535. <view
  536. v-for="(option, childindex) in judge"
  537. :key="childindex"
  538. class="lisSty"
  539. @click="judgeSelectChild(ansIndex, childindex, bankIndex)"
  540. >
  541. <view class="activeTI">{{ ast[childindex] }}</view>
  542. <view class="flex_auto">
  543. {{ option }}
  544. <view v-if="option.imgUrl">
  545. <image
  546. style="width: 600rpx"
  547. mode="widthFix"
  548. :src="$method.splitImgHost(option.imgUrl)"
  549. ></image>
  550. </view>
  551. </view>
  552. </view>
  553. </view>
  554. <view v-if="bank.ques[ansIndex]">
  555. <view
  556. v-for="(option, childindex) in judge"
  557. :key="childindex"
  558. class="lisSty"
  559. >
  560. <text
  561. :class="{
  562. right:
  563. childindex == bank.ques[ansIndex] ||
  564. childindex == bank.ans[ansIndex],
  565. wrong:
  566. childindex == bank.ques[ansIndex] &&
  567. bank.ques[ansIndex] != bank.ans[ansIndex],
  568. }"
  569. class="activeTI"
  570. >
  571. {{ ast[childindex] }}
  572. </text>
  573. <view class="flex_auto">
  574. {{ option }}
  575. <view v-if="option.imgUrl">
  576. <image
  577. style="width: 600rpx"
  578. mode="widthFix"
  579. :src="$method.splitImgHost(option.imgUrl)"
  580. ></image>
  581. </view>
  582. </view>
  583. </view>
  584. </view>
  585. </view>
  586. <view v-if="bank.ques[ansIndex]">
  587. <view class="pad_8 answer">
  588. <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
  589. <view>我的答案:{{ ast[bank.ques[ansIndex]] }}</view>
  590. </view>
  591. <view class="pad_8 answerInfos">
  592. <view class="answerTitle">答案解析</view>
  593. <view class="answerContent"
  594. ><rich-text :nodes="ansItem.analysisContent"></rich-text
  595. ></view>
  596. </view>
  597. </view>
  598. </template>
  599. <!-- 简答题 -->
  600. <template v-if="ansItem.type == 5">
  601. <view class="pad_8 titBox_title">
  602. <view class="leftLetters">
  603. <view class="btnType">
  604. <text>简答</text>
  605. </view>
  606. </view>
  607. <view><rich-text :nodes="ansItem.content"></rich-text></view>
  608. </view>
  609. <view class="pad_8 titBox_title">
  610. <view class="ans">
  611. <view
  612. class="ans_input"
  613. v-if="
  614. !bank.ques[ansIndex] ||
  615. (!bank.ques[ansIndex].text &&
  616. !bank.ques[ansIndex].imageList.length)
  617. "
  618. >
  619. <view class="top flex">
  620. <image
  621. class="icon"
  622. @click="chooseImgChild(bankIndex, ansIndex)"
  623. src="/static/camera.png"
  624. mode=""
  625. ></image>
  626. <view class="progress"
  627. >{{ ansItem.ansText.imageList.length || "0" }}/4</view
  628. >
  629. <view
  630. class="submit"
  631. :class="{
  632. disabled: !ansItem.ansText.text && hasImgs(ansItem),
  633. }"
  634. @click="submitAnsChild(bankIndex, ansIndex)"
  635. >确认答案</view
  636. >
  637. </view>
  638. <view class="textarea">
  639. <textarea
  640. v-model="ansItem.ansText.text"
  641. placeholder="在此输入答案"
  642. ></textarea>
  643. </view>
  644. <view class="imgs">
  645. <view
  646. class="img"
  647. v-for="(img, imgIndex) in ansItem.ansText.imageList"
  648. :key="imgIndex"
  649. >
  650. <text
  651. @click="
  652. deleteImgChild(imgIndex, bankIndex, ansIndex)
  653. "
  654. >x</text
  655. >
  656. <image :src="$method.splitImgHost(img, true)"></image>
  657. </view>
  658. </view>
  659. </view>
  660. <view
  661. class="ans_submit answerInfos"
  662. v-if="
  663. bank.ques[ansIndex] &&
  664. (bank.ques[ansIndex].imageList.length ||
  665. bank.ques[ansIndex].text)
  666. "
  667. >
  668. <view class="answerTitle">我的答案</view>
  669. {{ bank.ques[ansIndex].text || "" }}
  670. <view class="imgs">
  671. <image
  672. class="img"
  673. v-for="(ques, quesIndex) in bank.ques[ansIndex]
  674. .imageList"
  675. :key="quesIndex"
  676. :src="$method.splitImgHost(ques, true)"
  677. ></image>
  678. </view>
  679. </view>
  680. </view>
  681. </view>
  682. <view
  683. v-if="
  684. bank.ques[ansIndex].imageList.length ||
  685. bank.ques[ansIndex].text
  686. "
  687. >
  688. <view class="pad_8 answerInfos">
  689. <view class="answerTitle">答案解析</view>
  690. <view class="answerContent"
  691. ><rich-text :nodes="ansItem.analysisContent"></rich-text
  692. ></view>
  693. </view>
  694. </view>
  695. </template>
  696. </view>
  697. </template>
  698. <view class="footer_btn">
  699. <view
  700. v-if="isCollect"
  701. class="collect"
  702. :class="{ show: goodsId && !isFromVideo ? true : false }"
  703. @click="collect(collectList[bankIndex], bankIndex)"
  704. >
  705. <view v-if="collectList[bankIndex]">
  706. <image src="/static/icon/collected.png" mode=""></image>
  707. <view>取消收藏</view>
  708. </view>
  709. <view v-if="!collectList[bankIndex]">
  710. <image src="/static/icon/collect.png" mode=""></image>
  711. <view>收藏</view>
  712. </view>
  713. </view>
  714. <view class="flex_center" @click="openFooterTab">
  715. <view class="up-icon">
  716. <image src="/static/up.png"></image>
  717. </view>
  718. 答题卡
  719. </view>
  720. <view class="collect show" @click="pdsubmit">
  721. <view>
  722. <image src="/static/jj.png" mode=""></image>
  723. <view>交卷</view>
  724. </view>
  725. </view>
  726. </view>
  727. </view>
  728. </swiper-item>
  729. </swiper>
  730. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  731. <view class="popupView">
  732. <view class="popupTops">
  733. <view class="topIcon"></view>
  734. 点击编号即可跳转至对应题目
  735. </view>
  736. <view class="popupContent">
  737. <scroll-view scroll-y="true" style="height: 506rpx">
  738. <view class="boxSty">
  739. <view
  740. v-for="(item, index) in questionList"
  741. :key="index"
  742. @click="changeIndex(index)"
  743. :class="{
  744. isRight: isRight(item, index),
  745. isWrong: isWrong(item, index),
  746. isPart: isPart(item, index),
  747. isOver: isOver(item, index),
  748. }"
  749. class="liListSty"
  750. >
  751. {{ index + 1 }}
  752. </view>
  753. </view>
  754. </scroll-view>
  755. </view>
  756. </view>
  757. </u-popup>
  758. </view>
  759. </template>
  760. <script>
  761. import { mapGetters } from 'vuex';
  762. import eventHub from '@/common/eventHub.js'
  763. import {WEBVIEW_URL} from '@/common/request.js'
  764. export default {
  765. name: 'bankExam',
  766. props: {
  767. examId:0,
  768. current: 0,
  769. list: {
  770. type:Array,
  771. default:[]
  772. },
  773. recordId: "",
  774. goodsId:'',
  775. bankType:0,
  776. orderGoodsId:'',
  777. isCollect:true,
  778. lastTime: 0, //剩余考试时长
  779. allTimes: 0, //总考试时长
  780. },
  781. watch:{
  782. },
  783. data() {
  784. return {
  785. ast: ["A", "B", "C", "D", "E", "F", "G"],
  786. judge: ["错误", "正确"],
  787. ans: [],
  788. ques: [],
  789. wrongList: [],
  790. timer: null,
  791. collectList: [],
  792. show: false,
  793. currentIndex:0,
  794. questionList:[],
  795. examLastTime: 0, //剩余考试时长
  796. examAllTimes: 0, //总考试时长
  797. };
  798. },
  799. onLoad() {
  800. },
  801. created() {
  802. },
  803. watch: {
  804. list:function (newVal,oldVal) {
  805. console.log(this)
  806. this.questionList = newVal;
  807. },
  808. current:function (newVal) {
  809. this.currentIndex = newVal;
  810. }
  811. },
  812. mounted() {
  813. if (this.examLastTime) {
  814. this.timer = setInterval(() => {
  815. if (this.examLastTime <= 0) {
  816. clearInterval(this.timer);
  817. uni.showToast({
  818. icon: "none",
  819. mask: true,
  820. title: "考试时间已到,系统将自动交卷",
  821. duration: 10000,
  822. });
  823. this.submit();
  824. return;
  825. }
  826. this.examLastTime--;
  827. }, 1000);
  828. }
  829. },
  830. methods: {
  831. getExamData() {
  832. let score = 0; //计算总分
  833. let reportStatus = 0;
  834. let number = 0; //做对的题目数量
  835. let doQuestionNum = 0; //做过的题目数量
  836. let allScore = 0; //总分
  837. let passScore = 0;
  838. let doWrongQuestionIds = []; //错题和未做题id(客观题)
  839. let doQuestionIds = []; //做过的题目id
  840. let lessQuestionNum = 0;
  841. let rightQuestionIds = []; //做对的题目id
  842. this.questionList.forEach((item, index) => {
  843. passScore = item.passScore;
  844. if (item.type == 1) {
  845. //正确
  846. if (item.ques == item.ans) {
  847. item.scoreResult = item.score;
  848. score += item.score;
  849. number++;
  850. rightQuestionIds.push(item.questionId);
  851. } else {
  852. //错误
  853. item.scoreResult = 0;
  854. if (item.ques) {
  855. doWrongQuestionIds.push(item.questionId);
  856. }
  857. }
  858. allScore += item.score;
  859. if (item.ques) {
  860. doQuestionNum++;
  861. doQuestionIds.push(item.questionId);
  862. }
  863. } else if (item.type == 2) {
  864. let isRight =
  865. item.ans &&
  866. item.ans.every((quesItem, quesIndex) => {
  867. if (item.ques) {
  868. return item.ques[quesIndex] == item.ans[quesIndex];
  869. } else {
  870. return false;
  871. }
  872. });
  873. if (isRight) {
  874. score += item.score;
  875. number++;
  876. item.scoreResult = item.score;
  877. rightQuestionIds.push(item.questionId);
  878. } else {
  879. let hasPart = false;
  880. let checkboxScore = 1; //获取单题总分数
  881. item.ques &&
  882. item.ques.forEach((ques, quesIndex) => {
  883. //选错一个全扣
  884. if (item.ques) {
  885. if (item.ans.indexOf(item.ques[quesIndex]) == -1) {
  886. checkboxScore = 0;
  887. }
  888. } else {
  889. checkboxScore = 0;
  890. }
  891. });
  892. //没选错
  893. if (checkboxScore) {
  894. checkboxScore = 0;
  895. item.ans.forEach((ans, quesIndex) => {
  896. //漏选扣一部分,对n题给n X partScore 分
  897. if (item.ques) {
  898. if (item.ques.indexOf(item.ans[quesIndex]) != -1) {
  899. checkboxScore += item.partScore;
  900. hasPart = true;
  901. }
  902. } else {
  903. checkboxScore = 0;
  904. }
  905. });
  906. }
  907. if (!hasPart) {
  908. //0分
  909. item.scoreResult = 0;
  910. if (item.ques) {
  911. doWrongQuestionIds.push(item.questionId);
  912. }
  913. } else {
  914. //部分分
  915. // number++;
  916. lessQuestionNum++
  917. // doWrongQuestionIds.push(item.questionId);
  918. item.scoreResult = checkboxScore;
  919. score += checkboxScore;
  920. // rightQuestionIds.push(item.questionId)
  921. }
  922. }
  923. allScore += item.score;
  924. if (item.ques && item.ques.length) {
  925. doQuestionNum++;
  926. doQuestionIds.push(item.questionId);
  927. }
  928. } else if (item.type == 3) {
  929. if (item.ques == item.ans) {
  930. item.scoreResult = item.score;
  931. score += item.score;
  932. number++;
  933. rightQuestionIds.push(item.questionId);
  934. } else {
  935. item.scoreResult = 0;
  936. if (item.ques) {
  937. doWrongQuestionIds.push(item.questionId);
  938. }
  939. }
  940. allScore += item.score;
  941. if (item.ques) {
  942. doQuestionNum++;
  943. doQuestionIds.push(item.questionId);
  944. }
  945. } else if (item.type == 4) {
  946. allScore += item.score;
  947. if (item.ques && item.ques.length) {
  948. doQuestionNum++;
  949. doQuestionIds.push(item.questionId);
  950. }
  951. } else if (item.type == 5) {
  952. allScore += item.score;
  953. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  954. doQuestionNum++;
  955. doQuestionIds.push(item.questionId);
  956. }
  957. }
  958. });
  959. //大于及格
  960. if (score >= passScore) {
  961. reportStatus = 1;
  962. } else {
  963. reportStatus = 0;
  964. }
  965. let data = {
  966. examId: this.examId,
  967. goodsId: this.goodsId,
  968. reportStatus: reportStatus,
  969. recordId: this.recordId,
  970. rightQuestionNum: number,
  971. orderGoodsId: this.orderGoodsId,
  972. lessQuestionNum:lessQuestionNum,
  973. doQuestionIds: doQuestionIds.join(","),
  974. rightQuestionIds: rightQuestionIds.join(","),
  975. doQuestionNum: doQuestionNum,
  976. performance: score,
  977. totalScore: allScore,
  978. examTime: parseInt(this.allTimes),
  979. doTime: parseInt(this.allTimes) - parseInt(this.lastTime),
  980. historyExamJson: JSON.stringify(this.questionList),
  981. doWrongQuestionIds:doWrongQuestionIds,
  982. }
  983. return data;
  984. },
  985. /**
  986. * 交卷
  987. */
  988. submit() {
  989. this.$emit('submit',this.getExamData())
  990. },
  991. pdsubmit() {
  992. // if (this.bankType == 1) {
  993. let ansCount = this.questionOverNum(true); //已答题数
  994. this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
  995. //没有答完
  996. if (this.lastCount !== 0) {
  997. // this.cgType = 6;
  998. // this.showpopups = true;
  999. this.$emit('showpopups',6)
  1000. return;
  1001. }
  1002. // }
  1003. if (this.bankType == 2) {
  1004. if (this.lastTime > 0) {
  1005. let lastTime = this.countdown(this.lastTime);
  1006. uni.showModal({
  1007. title: "提示",
  1008. content: `时间还剩余${lastTime},确定交卷吗?`,
  1009. confirmText: "交卷",
  1010. cancelText: "继续答题",
  1011. success: (res) => {
  1012. if (res.confirm) {
  1013. //确定
  1014. this.submit();
  1015. } else {
  1016. //取消
  1017. }
  1018. },
  1019. });
  1020. return;
  1021. }
  1022. }
  1023. this.submit();
  1024. },
  1025. /**
  1026. * 是否有上传图片
  1027. */
  1028. hasImgs(bank) {
  1029. return bank.ansText.imageList.length == 0;
  1030. },
  1031. /**
  1032. * 是否做完所有题目
  1033. */
  1034. isDoOver() {
  1035. let questionOverNum = this.questionOverNum(true); //获取已经回答的题目数(包括简答和案例)
  1036. if (this.questionList.length == questionOverNum) {
  1037. this.$emit('isDoOver')
  1038. }
  1039. },
  1040. /**
  1041. * 获取已经回答的题目数
  1042. * hasSpecail (是否包含简答和案例)
  1043. */
  1044. questionOverNum(hasSpecail) {
  1045. let count = 0;
  1046. this.questionList.forEach((item) => {
  1047. if (item.type == 1 || item.type == 2 || item.type == 3) {
  1048. if (item.ques) {
  1049. count++;
  1050. }
  1051. } else if (item.type == 4) {
  1052. //案例题
  1053. if (hasSpecail) {
  1054. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  1055. if (
  1056. jsonItem.type == 1 ||
  1057. jsonItem.type == 2 ||
  1058. jsonItem.type == 3
  1059. ) {
  1060. if (item.ques[indexs]) {
  1061. return true;
  1062. } else {
  1063. return false;
  1064. }
  1065. } else if (jsonItem.type == 5) {
  1066. if (
  1067. item.ques[indexs] &&
  1068. (item.ques[indexs].text || item.ques[indexs].imageList.length)
  1069. ) {
  1070. console.log("chil");
  1071. return true;
  1072. } else {
  1073. return false;
  1074. }
  1075. }
  1076. });
  1077. if (isOver) {
  1078. count++;
  1079. console.log(item, 444);
  1080. }
  1081. }
  1082. } else if (item.type == 5) {
  1083. //简答题
  1084. if (hasSpecail) {
  1085. if (item.ques && (item.ques.text || item.ques.imageList.length)) {
  1086. console.log(5, item);
  1087. count++;
  1088. }
  1089. }
  1090. }
  1091. });
  1092. return count;
  1093. },
  1094. /**
  1095. * @param {Object} second倒计时过滤器
  1096. */
  1097. countdown(second) {
  1098. if (second) {
  1099. let h = parseInt((second / 60 / 60) % 24); // 计算小时
  1100. let m = parseInt((second / 60) % 60); // 计算分数
  1101. let s = parseInt(second % 60); // 计算当前秒数
  1102. if (h < 10) h = "0" + h;
  1103. if (m < 10) m = "0" + m;
  1104. if (s < 10) s = "0" + s;
  1105. return h + ":" + m + ":" + s;
  1106. } else {
  1107. return "";
  1108. }
  1109. },
  1110. /**
  1111. * @param {Object} e单选点击
  1112. */
  1113. radioSelect(optionsId, bindex) {
  1114. if (this.questionList[bindex].ques) return;
  1115. this.$set(this.questionList[bindex], "ques", optionsId);
  1116. this.isDoOver();
  1117. // 回答错误
  1118. if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
  1119. this.$api
  1120. .examWrongRecord({
  1121. orderGoodsId: this.orderGoodsId,
  1122. examId: this.examId,
  1123. goodsId: this.goodsId,
  1124. moduleExamId: this.moduleId || 0,
  1125. chapterExamId: this.chapterId || 0,
  1126. questionIds: [this.questionList[bindex].questionId],
  1127. recordId: this.recordId,
  1128. })
  1129. .then((res) => {});
  1130. } else {
  1131. // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
  1132. // if(question) {
  1133. // this.$api.wrongRecordDelete({
  1134. // "examId": +this.id,
  1135. // "goodsId": +this.goodsId,
  1136. // "questionId": this.questionList[bindex].questionId,
  1137. // }).then(res => {
  1138. // })
  1139. // }
  1140. }
  1141. },
  1142. /**
  1143. * @param {Object} e案例单选点击
  1144. */
  1145. radioSelectChild(optionsId, ansIndex, bindex) {
  1146. if (this.questionList[bindex].ques[ansIndex]) return;
  1147. this.$set(this.questionList[bindex].ques, ansIndex, optionsId);
  1148. this.isDoOver();
  1149. },
  1150. /**
  1151. * @param {Object} 多选点击
  1152. */
  1153. checkboxSelect(optionsId, bindex, index) {
  1154. this.$set(
  1155. this.questionList[bindex].jsonStr[index],
  1156. "checked",
  1157. !this.questionList[bindex].jsonStr[index].checked
  1158. );
  1159. },
  1160. /**
  1161. * @param {Object} 案例多选点击
  1162. */
  1163. checkboxSelectChild(bindex, ansIndex, childIndex) {
  1164. this.$set(
  1165. this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex],
  1166. "checked",
  1167. !this.questionList[bindex].jsonStr[ansIndex].optionsList[childIndex]
  1168. .checked
  1169. );
  1170. },
  1171. isCheckboxChecked(arr) {
  1172. return arr.some((item) => {
  1173. if (item.checked) {
  1174. return true;
  1175. }
  1176. });
  1177. },
  1178. /**
  1179. * @param {Object} 多选确认
  1180. */
  1181. checkboxSubmit(bindex) {
  1182. if (this.questionList[bindex].ques) return;
  1183. let arr = [];
  1184. this.questionList[bindex].jsonStr.forEach((item) => {
  1185. if (item.checked) {
  1186. arr.push(item.optionsId);
  1187. }
  1188. });
  1189. if (!arr.length) {
  1190. uni.showToast({
  1191. title: "请选择答案",
  1192. icon: "none",
  1193. });
  1194. return;
  1195. }
  1196. this.$set(this.questionList[bindex], "ques", arr);
  1197. this.isDoOver();
  1198. // let isWrong = this.questionList[bindex].ques.some(
  1199. // (quesItem, quesIndex) => {
  1200. // return (
  1201. // this.questionList[bindex].ques[quesIndex] !=
  1202. // this.questionList[bindex].ans[quesIndex]
  1203. // );
  1204. // }
  1205. // );
  1206. let isWrong = this.questionList[bindex].ques.some((item, i) => {
  1207. return this.questionList[bindex].ans.indexOf(item) == -1;
  1208. })
  1209. // 回答错误
  1210. if (isWrong) {
  1211. this.$api
  1212. .examWrongRecord({
  1213. orderGoodsId: this.orderGoodsId,
  1214. examId: this.examId,
  1215. goodsId: this.goodsId,
  1216. moduleExamId: this.moduleId || 0,
  1217. chapterExamId: this.chapterId || 0,
  1218. questionIds: [this.questionList[bindex].questionId],
  1219. recordId: this.recordId,
  1220. })
  1221. .then((res) => {});
  1222. } else {
  1223. // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
  1224. // if(question) {
  1225. // this.$api.wrongRecordDelete({
  1226. // "examId": +this.id,
  1227. // "goodsId": +this.goodsId,
  1228. // "questionId": this.questionList[bindex].questionId,
  1229. // }).then(res => {
  1230. // })
  1231. // }
  1232. }
  1233. },
  1234. /**
  1235. * @param {Object} 案例多选确认
  1236. */
  1237. checkboxSubmitChild(bindex, ansIndex) {
  1238. if (this.questionList[bindex].ques[ansIndex]) return;
  1239. let arr = [];
  1240. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(
  1241. (item) => {
  1242. if (item.checked) {
  1243. arr.push(item.optionsId);
  1244. }
  1245. }
  1246. );
  1247. if (!arr.length) {
  1248. uni.showToast({
  1249. title: "请选择答案",
  1250. icon: "none",
  1251. });
  1252. return;
  1253. }
  1254. this.$set(this.questionList[bindex].ques, ansIndex, arr);
  1255. this.isDoOver();
  1256. },
  1257. /**
  1258. * @param {Object} index
  1259. * @param {Object} bindex
  1260. * 判断题
  1261. */
  1262. judgeSelect(index, bindex) {
  1263. if (this.questionList[bindex].ques) return;
  1264. this.$set(this.questionList[bindex], "ques", index + "");
  1265. this.isDoOver();
  1266. // 回答错误
  1267. if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
  1268. this.$api
  1269. .examWrongRecord({
  1270. orderGoodsId: this.orderGoodsId,
  1271. examId: this.examId,
  1272. goodsId: this.goodsId,
  1273. moduleExamId: this.moduleId || 0,
  1274. chapterExamId: this.chapterId || 0,
  1275. questionIds: [this.questionList[bindex].questionId],
  1276. recordId: this.recordId,
  1277. })
  1278. .then((res) => {});
  1279. } else {
  1280. // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
  1281. // if(question) {
  1282. // this.$api.wrongRecordDelete({
  1283. // "examId": +this.id,
  1284. // "goodsId": +this.goodsId,
  1285. // "questionId": this.questionList[bindex].questionId,
  1286. // }).then(res => {
  1287. // })
  1288. // }
  1289. }
  1290. },
  1291. /**
  1292. * @param {Object} ansindex
  1293. * @param {Object} childindex
  1294. * @param {Object} bindex
  1295. * 案例判断题
  1296. */
  1297. judgeSelectChild(ansindex, childindex, bindex) {
  1298. if (this.questionList[bindex].ques[ansindex]) return;
  1299. this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
  1300. this.isDoOver();
  1301. },
  1302. openFooterTab() {
  1303. this.show = true;
  1304. },
  1305. changeIndex(index) {
  1306. this.currentIndex = index;
  1307. },
  1308. swiperChange(e) {
  1309. this.currentIndex = e.detail.current;
  1310. this.getCollectInfo(this.currentIndex);
  1311. },
  1312. /**
  1313. * @param {Object} current
  1314. * 获取收藏信息
  1315. */
  1316. getCollectInfo(current) {
  1317. this.$api
  1318. .getCollectInfo({
  1319. examId: this.examId,
  1320. questionId: this.questionList[current].questionId,
  1321. goodsId: this.goodsId,
  1322. orderGoodsId: this.orderGoodsId,
  1323. })
  1324. .then((res) => {
  1325. if (res.data.code == 500) {
  1326. this.$set(this.collectList, current, false);
  1327. } else if (res.data.code == 200) {
  1328. this.$set(this.collectList, current, res.data.data);
  1329. }
  1330. });
  1331. },
  1332. /**
  1333. * @param {Object} state
  1334. * @param {Object} index
  1335. * 收藏
  1336. */
  1337. collect(state, index) {
  1338. if (!state) {
  1339. this.$api
  1340. .collectQuestion({
  1341. examId: this.examId,
  1342. questionId: this.questionList[index].questionId,
  1343. goodsId: this.goodsId || "",
  1344. orderGoodsId: this.orderGoodsId,
  1345. })
  1346. .then((res) => {
  1347. if (res.data.code == 200) {
  1348. this.$set(this.collectList, index, true);
  1349. uni.showToast({
  1350. title: "收藏成功",
  1351. duration: 2000,
  1352. icon: "none",
  1353. });
  1354. this.getCollectInfo(index);
  1355. }
  1356. });
  1357. } else {
  1358. this.$api
  1359. .deleteCollectQuestion(this.collectList[index].collectQuestionId)
  1360. .then((res) => {
  1361. if (res.data.code == 200) {
  1362. this.$set(this.collectList, index, false);
  1363. uni.showToast({
  1364. title: "取消收藏成功",
  1365. duration: 2000,
  1366. icon: "none",
  1367. });
  1368. }
  1369. });
  1370. }
  1371. return;
  1372. },
  1373. /**
  1374. * @param {Object} imgIndex
  1375. * @param {Object} bankIndex
  1376. * 删除简答图片
  1377. */
  1378. deleteImg(imgIndex, bankIndex) {
  1379. this.questionList[bankIndex].ansText.imageList.splice(imgIndex, 1);
  1380. },
  1381. /**
  1382. * @param {Object} imgIndex
  1383. * @param {Object} bankIndex
  1384. * @param {Object} ansIndex
  1385. * 删除案例题简答图片
  1386. */
  1387. deleteImgChild(imgIndex, bankIndex, ansIndex) {
  1388. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(
  1389. imgIndex,
  1390. 1
  1391. );
  1392. },
  1393. /**
  1394. * @param {Object} bankindex
  1395. * 选择上传图片
  1396. */
  1397. chooseImg(bankindex) {
  1398. if (
  1399. this.questionList[bankindex] &&
  1400. this.questionList[bankindex].ansText &&
  1401. this.questionList[bankindex].ansText.imageList.length >= 4
  1402. ) {
  1403. uni.showToast({
  1404. icon: "none",
  1405. title: "最多选择4张",
  1406. });
  1407. return;
  1408. }
  1409. uni.chooseImage({
  1410. count: 1, //默认9
  1411. sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
  1412. sourceType: ["album", "camera"], //从相册选择
  1413. success: (res) => {
  1414. let self = this;
  1415. // console.log(JSON.stringify(res.tempFilePaths));
  1416. let img = res.tempFilePaths[0];
  1417. uni.getImageInfo({
  1418. src: img,
  1419. success: async (res) => {
  1420. let canvasWidth = res.width; //图片原始长宽
  1421. let canvasHeight = res.height;
  1422. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1423. uni.compressImage({
  1424. src: img,
  1425. quality: 75,
  1426. width: "50%",
  1427. height: "50%",
  1428. success: async (rest) => {
  1429. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1430. this.questionList[bankindex].ansText.imageList.push(dir);
  1431. },
  1432. });
  1433. } else {
  1434. const dir = await self.uploadFile(img, 0);
  1435. this.questionList[bankindex].ansText.imageList.push(dir);
  1436. }
  1437. },
  1438. });
  1439. },
  1440. });
  1441. },
  1442. /**
  1443. * @param {Object} bankindex
  1444. * @param {Object} ansindex
  1445. * 案例题选择上传图片
  1446. */
  1447. chooseImgChild(bankindex, ansindex) {
  1448. if (
  1449. this.questionList[bankindex].jsonStr[ansindex] &&
  1450. this.questionList[bankindex].jsonStr[ansindex].ansText &&
  1451. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList
  1452. .length >= 4
  1453. ) {
  1454. uni.showToast({
  1455. icon: "none",
  1456. title: "最多选择4张",
  1457. });
  1458. return;
  1459. }
  1460. uni.chooseImage({
  1461. count: 1, //默认9
  1462. sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
  1463. sourceType: ["album", "camera"], //从相册选择
  1464. success: (res) => {
  1465. let self = this;
  1466. // console.log(JSON.stringify(res.tempFilePaths));
  1467. let img = res.tempFilePaths[0];
  1468. uni.getImageInfo({
  1469. src: img,
  1470. success: async (res) => {
  1471. let canvasWidth = res.width; //图片原始长宽
  1472. let canvasHeight = res.height;
  1473. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1474. uni.compressImage({
  1475. src: img,
  1476. quality: 75,
  1477. width: "50%",
  1478. height: "50%",
  1479. success: async (rest) => {
  1480. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1481. this.questionList[bankindex].jsonStr[
  1482. ansindex
  1483. ].ansText.imageList.push(dir);
  1484. },
  1485. });
  1486. } else {
  1487. const dir = await self.uploadFile(img, 0);
  1488. this.questionList[bankindex].jsonStr[
  1489. ansindex
  1490. ].ansText.imageList.push(dir);
  1491. }
  1492. },
  1493. });
  1494. },
  1495. });
  1496. },
  1497. uploadFile(options, int) {
  1498. var self = this;
  1499. return new Promise((resolve, reject) => {
  1500. var data = {
  1501. orderGoodsId: this.orderGoodsId,
  1502. imageStatus: int,
  1503. };
  1504. self.$api.aliyunpolicy(data).then((res) => {
  1505. console.log(res.data, 6);
  1506. if (res.data.code != 200) {
  1507. self.$method.showToast("签名错误" + JSON.stringify(res.data));
  1508. return;
  1509. }
  1510. var ossToken = res.data.data.resultContent;
  1511. if (ossToken.host == null || ossToken.host == undefined) {
  1512. self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
  1513. return;
  1514. }
  1515. uni.uploadFile({
  1516. url: ossToken.host,
  1517. name: "file",
  1518. filePath: options,
  1519. fileType: "image",
  1520. header: {
  1521. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  1522. },
  1523. formData: {
  1524. key: ossToken.dir,
  1525. OSSAccessKeyId: ossToken.accessid,
  1526. policy: ossToken.policy,
  1527. Signature: ossToken.signature,
  1528. callback: ossToken.callback,
  1529. success_action_status: 200,
  1530. },
  1531. success: (result) => {
  1532. // if (result.statusCode === 200) {
  1533. resolve(ossToken.dir);
  1534. // } else {
  1535. // uni.showToast({
  1536. // title: "上传失败",
  1537. // icon: "none",
  1538. // });
  1539. // return;
  1540. // }
  1541. },
  1542. fail: (error) => {
  1543. uni.showToast({
  1544. title: "上传接口报错" + error,
  1545. icon: "none",
  1546. });
  1547. return;
  1548. },
  1549. });
  1550. });
  1551. });
  1552. },
  1553. /**
  1554. * @param {Object} type
  1555. * @param {Object} bankindex
  1556. * 简答题答案确认
  1557. */
  1558. submitAns(bankindex) {
  1559. console.log(this.questionList[bankindex]);
  1560. if (
  1561. !this.questionList[bankindex].ansText.text &&
  1562. !this.questionList[bankindex].ansText.imageList.length
  1563. ) {
  1564. uni.showToast({
  1565. title: "请输入内容或上传图片",
  1566. duration: 2000,
  1567. icon: "none",
  1568. });
  1569. return;
  1570. }
  1571. this.$set(this.questionList[bankindex], "ques", {
  1572. imageList: this.questionList[bankindex].ansText.imageList || [],
  1573. text: this.questionList[bankindex].ansText.text || "",
  1574. });
  1575. this.isDoOver();
  1576. },
  1577. /**
  1578. * @param {Object} bankindex
  1579. * @param {Object} ansindex
  1580. * 案例题简答答案确认
  1581. */
  1582. submitAnsChild(bankindex, ansindex) {
  1583. if (
  1584. !this.questionList[bankindex].jsonStr[ansindex].ansText.text &&
  1585. !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length
  1586. ) {
  1587. uni.showToast({
  1588. title: "请输入内容或上传图片",
  1589. duration: 2000,
  1590. icon: "none",
  1591. });
  1592. return;
  1593. }
  1594. this.$set(this.questionList[bankindex].ques, ansindex, {
  1595. imageList:
  1596. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList ||
  1597. [],
  1598. text: this.questionList[bankindex].jsonStr[ansindex].ansText.text || "",
  1599. });
  1600. this.isDoOver();
  1601. },
  1602. isRight(item, index) {
  1603. //单选
  1604. if (this.questionList[index].ques) {
  1605. if (item.type == 1) {
  1606. return this.questionList[index].ques == this.questionList[index].ans;
  1607. //多选
  1608. } else if (item.type == 2) {
  1609. //每一项都相等
  1610. return this.questionList[index].ans.every((item, i) => {
  1611. return item == this.questionList[index].ques[i];
  1612. });
  1613. //判断
  1614. } else if (item.type == 3) {
  1615. return this.questionList[index].ques == this.questionList[index].ans;
  1616. // } else if (item.type == 5) {
  1617. // if(this.questionList[index].ques.text){
  1618. // return true
  1619. // }else{
  1620. // return false
  1621. // }
  1622. } else {
  1623. return false;
  1624. }
  1625. } else {
  1626. return false;
  1627. }
  1628. },
  1629. right(bankIndex, ansIndex, option) {
  1630. if (
  1631. this.questionList[bankIndex].ques[ansIndex] &&
  1632. this.questionList[bankIndex].ans[ansIndex]
  1633. ) {
  1634. if (
  1635. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1636. option.optionsId
  1637. ) != -1 ||
  1638. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1639. option.optionsId
  1640. ) != -1
  1641. ) {
  1642. return true;
  1643. } else {
  1644. return false;
  1645. }
  1646. } else {
  1647. return false;
  1648. }
  1649. },
  1650. wrong(bankIndex, ansIndex, option) {
  1651. if (
  1652. this.questionList[bankIndex].ques[ansIndex] &&
  1653. this.questionList[bankIndex].ans[ansIndex]
  1654. ) {
  1655. if (
  1656. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1657. option.optionsId
  1658. ) != -1 &&
  1659. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1660. option.optionsId
  1661. ) == -1
  1662. ) {
  1663. return true;
  1664. } else {
  1665. return false;
  1666. }
  1667. } else {
  1668. return false;
  1669. }
  1670. },
  1671. isWrong(item, index) {
  1672. if (this.questionList[index].ques) {
  1673. //单选
  1674. if (item.type == 1) {
  1675. return this.questionList[index].ques != this.questionList[index].ans;
  1676. //多选
  1677. } else if (item.type == 2) {
  1678. //每一项都相等
  1679. return this.questionList[index].ques.some((item, i) => {
  1680. return this.questionList[index].ans.indexOf(item) == -1;
  1681. });
  1682. //判断
  1683. } else if (item.type == 3) {
  1684. return this.questionList[index].ques != this.questionList[index].ans;
  1685. } else {
  1686. return false;
  1687. }
  1688. } else {
  1689. return false;
  1690. }
  1691. },
  1692. isPart(item, index) {
  1693. if (this.questionList[index].ques) {
  1694. if (item.type == 2) {
  1695. let isWrong = this.questionList[index].ques.some((item, i) => {
  1696. return this.questionList[index].ans.indexOf(item) == -1;
  1697. });
  1698. let isRight = this.questionList[index].ans.every((item, i) => {
  1699. return item == this.questionList[index].ques[i];
  1700. });
  1701. if (!isRight && !isWrong) {
  1702. return true;
  1703. }
  1704. }
  1705. } else {
  1706. return false;
  1707. }
  1708. },
  1709. isOver(item, index) {
  1710. if (this.questionList[index].ques) {
  1711. if (item.type == 4) {
  1712. //案例题
  1713. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  1714. if (
  1715. jsonItem.type == 1 ||
  1716. jsonItem.type == 2 ||
  1717. jsonItem.type == 3
  1718. ) {
  1719. if (item.ques[indexs]) {
  1720. return true;
  1721. } else {
  1722. return false;
  1723. }
  1724. } else if (jsonItem.type == 5) {
  1725. if (
  1726. item.ques[indexs] &&
  1727. (item.ques[indexs].text || item.ques[indexs].imageList.length)
  1728. ) {
  1729. console.log("chil");
  1730. return true;
  1731. } else {
  1732. return false;
  1733. }
  1734. }
  1735. });
  1736. if (isOver) {
  1737. return true;
  1738. } else {
  1739. return false;
  1740. }
  1741. } else if (item.type == 5) {
  1742. //简答题
  1743. //每一项都相等
  1744. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  1745. return true;
  1746. }
  1747. //判断
  1748. } else {
  1749. return false;
  1750. }
  1751. } else {
  1752. return false;
  1753. }
  1754. },
  1755. tabSelect(index, bankindex) {
  1756. this.$set(this.questionList[bankindex], "current", index);
  1757. },
  1758. showPhoto(contentStr) {
  1759. if (contentStr && typeof contentStr == "string") {
  1760. let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;
  1761. let strArr = contentStr.match(reg);
  1762. strArr.forEach((str, index) => {
  1763. strArr[index] = str.replace(reg, "$1");
  1764. });
  1765. // 预览图片
  1766. uni.previewImage({
  1767. urls: strArr,
  1768. longPressActions: {
  1769. itemList: ["发送给朋友", "保存图片", "收藏"],
  1770. success: function (data) {
  1771. console.log(
  1772. "选中了第" +
  1773. (data.tapIndex + 1) +
  1774. "个按钮,第" +
  1775. (data.index + 1) +
  1776. "张图片"
  1777. );
  1778. },
  1779. fail: function (err) {
  1780. console.log(err.errMsg);
  1781. },
  1782. },
  1783. });
  1784. }
  1785. },
  1786. },
  1787. computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId','userInfo','liveLast']) }
  1788. };
  1789. </script>
  1790. <style scoped lang="scss">
  1791. .lisSty {
  1792. margin-bottom: 16rpx;
  1793. display: flex;
  1794. align-items: center;
  1795. .flex_auto {
  1796. flex: 1;
  1797. }
  1798. }
  1799. .swiper,.bankExam {
  1800. height:100%;
  1801. }
  1802. .activeTI {
  1803. vertical-align: middle;
  1804. display: inline-block;
  1805. border: 1rpx solid #eee;
  1806. border-radius: 50rpx;
  1807. height: 48rpx;
  1808. line-height: 46rpx;
  1809. text-align: center;
  1810. width: 48rpx;
  1811. margin-right: 15rpx;
  1812. color: #666;
  1813. font-size: 30rpx;
  1814. &.right {
  1815. color: #fff;
  1816. background: #36c75a;
  1817. }
  1818. &.wrong {
  1819. color: #fff;
  1820. background: #ff3b30;
  1821. }
  1822. &.checked {
  1823. color: #fff;
  1824. background: #007aff;
  1825. }
  1826. }
  1827. .submit_checkbox {
  1828. position: fixed;
  1829. left: 0;
  1830. right: 0;
  1831. bottom: 120rpx;
  1832. margin: 20rpx auto;
  1833. width: 526rpx;
  1834. height: 80rpx;
  1835. background: rgba(0, 122, 255, 1);
  1836. color: #fff;
  1837. text-align: center;
  1838. line-height: 80rpx;
  1839. font-size: 30rpx;
  1840. border-radius: 40rpx;
  1841. &.disabled {
  1842. opacity: 0.6;
  1843. }
  1844. }
  1845. .titles {
  1846. overflow: hidden;
  1847. margin-bottom: 24rpx;
  1848. }
  1849. .titBox {
  1850. padding: 41rpx 25rpx 24rpx 25rpx;
  1851. }
  1852. .titBox_title {
  1853. padding: 21rpx;
  1854. }
  1855. .tabs {
  1856. margin: 10rpx;
  1857. display: flex;
  1858. .tab {
  1859. margin: 0 4rpx;
  1860. padding: 10rpx 13rpx;
  1861. text-align: center;
  1862. color: #007aff;
  1863. font-size: 28rpx;
  1864. border-radius: 16rpx;
  1865. background: #fff;
  1866. &.current {
  1867. color: #fff;
  1868. background: #007aff;
  1869. }
  1870. }
  1871. }
  1872. .ans {
  1873. margin: 8rpx 8rpx 8rpx;
  1874. .ans_input {
  1875. border-radius: 16rpx;
  1876. background: #fff;
  1877. .top {
  1878. border-bottom: 1rpx solid #eeeeee;
  1879. padding: 16rpx;
  1880. display: flex;
  1881. align-items: center;
  1882. .icon {
  1883. margin-right: 20rpx;
  1884. width: 40rpx;
  1885. height: 38rpx;
  1886. }
  1887. .progress {
  1888. flex: 1;
  1889. }
  1890. .submit {
  1891. width: 168rpx;
  1892. height: 48rpx;
  1893. line-height: 48rpx;
  1894. text-align: center;
  1895. color: #fff;
  1896. font-size: 30rpx;
  1897. background: #007aff;
  1898. border-radius: 24rpx;
  1899. &.disabled {
  1900. opacity: 0.6;
  1901. }
  1902. }
  1903. }
  1904. .textarea {
  1905. textarea {
  1906. width: 100%;
  1907. height: 287rpx;
  1908. padding: 10rpx;
  1909. }
  1910. }
  1911. .imgs {
  1912. overflow: hidden;
  1913. display: flex;
  1914. width: 100%;
  1915. .img {
  1916. width: 104rpx;
  1917. height: 104rpx;
  1918. border-radius: 8rpx;
  1919. position: relative;
  1920. margin: 20rpx;
  1921. text {
  1922. position: absolute;
  1923. right: -15rpx;
  1924. top: -15rpx;
  1925. width: 30rpx;
  1926. height: 30rpx;
  1927. text-align: center;
  1928. line-height: 30rpx;
  1929. color: #fff;
  1930. background: #ff3b30;
  1931. border-radius: 50%;
  1932. }
  1933. image {
  1934. width: 100%;
  1935. height: 100%;
  1936. }
  1937. }
  1938. }
  1939. }
  1940. .ans_submit {
  1941. padding: 16rpx;
  1942. border-radius: 16rpx;
  1943. background: #fff;
  1944. .imgs {
  1945. overflow: hidden;
  1946. display: flex;
  1947. width: 100%;
  1948. .img {
  1949. width: 104rpx;
  1950. height: 104rpx;
  1951. border-radius: 8rpx;
  1952. position: relative;
  1953. margin: 20rpx;
  1954. image {
  1955. width: 100%;
  1956. height: 100%;
  1957. }
  1958. }
  1959. }
  1960. }
  1961. }
  1962. .leftLetters {
  1963. display: flex;
  1964. align-items: center;
  1965. width: 220rpx;
  1966. .btnType {
  1967. padding: 5rpx 10rpx;
  1968. border: 1rpx solid #007aff;
  1969. border-radius: 10rpx;
  1970. background-color: rgba(0, 122, 255, 0.1);
  1971. font-size: 28rpx;
  1972. color: #007aff;
  1973. margin-right: 15rpx;
  1974. }
  1975. }
  1976. .firstLetter {
  1977. display: flex;
  1978. justify-content: space-between;
  1979. align-items: center;
  1980. margin-bottom: 30rpx;
  1981. }
  1982. .popupView {
  1983. height: 100%;
  1984. padding-bottom: 100rpx;
  1985. .popupTops {
  1986. height: 77rpx;
  1987. border-bottom: 1rpx solid #eee;
  1988. text-align: center;
  1989. line-height: 77rpx;
  1990. font-size: 24rpx;
  1991. color: #999;
  1992. position: relative;
  1993. .topIcon {
  1994. position: absolute;
  1995. top: 10rpx;
  1996. left: 50%;
  1997. transform: translateX(-50%);
  1998. width: 80rpx;
  1999. height: 8rpx;
  2000. background-color: #999;
  2001. border-radius: 4rpx;
  2002. }
  2003. }
  2004. .popupContent {
  2005. }
  2006. }
  2007. .pageContent {
  2008. position: relative;
  2009. background-color: #eaeef1;
  2010. height: 100%;
  2011. padding-top: 8rpx;
  2012. padding-bottom: 100rpx;
  2013. overflow-y: scroll;
  2014. }
  2015. .pad_8 {
  2016. background-color: #fff;
  2017. margin: 0rpx 8rpx 8rpx;
  2018. border-radius: 16rpx;
  2019. &.no-margin {
  2020. margin-top: -16rpx;
  2021. border-radius: 0 0 16rpx 16rpx;
  2022. }
  2023. }
  2024. .answer {
  2025. height: 80rpx;
  2026. line-height: 80rpx;
  2027. padding: 0rpx 24rpx;
  2028. display: flex;
  2029. align-items: center;
  2030. justify-content: space-between;
  2031. color: #666;
  2032. font-size: 30rpx;
  2033. }
  2034. .footer_btn {
  2035. background-color: #fff;
  2036. z-index: 10078;
  2037. position: fixed;
  2038. bottom: 0rpx;
  2039. display: flex;
  2040. align-items: center;
  2041. justify-content: space-between;
  2042. width: 100%;
  2043. height: 98rpx;
  2044. padding: 0rpx 38rpx;
  2045. border-top: 1rpx solid #eee;
  2046. .flex_center {
  2047. flex: 1;
  2048. display: flex;
  2049. justify-content: center;
  2050. align-items: center;
  2051. flex-direction: column;
  2052. margin: 0 200rpx;
  2053. font-size: 24rpx;
  2054. color: #999999;
  2055. .up-icon {
  2056. margin-bottom: 18rpx;
  2057. width: 100%;
  2058. display: flex;
  2059. justify-content: center;
  2060. image {
  2061. width: 58rpx;
  2062. height: 21rpx;
  2063. }
  2064. }
  2065. }
  2066. .collect {
  2067. visibility: hidden;
  2068. width: 100rpx;
  2069. &.show {
  2070. visibility: visible;
  2071. }
  2072. > view {
  2073. display: flex;
  2074. flex-direction: column;
  2075. align-items: center;
  2076. justify-content: center;
  2077. image {
  2078. width: 32rpx;
  2079. height: 32rpx;
  2080. margin-bottom: 6rpx;
  2081. }
  2082. view {
  2083. font-size: 24rpx;
  2084. color: #999999;
  2085. }
  2086. }
  2087. }
  2088. }
  2089. .boxSty {
  2090. padding: 44rpx 41rpx 0rpx;
  2091. }
  2092. .liListSty {
  2093. border: 1rpx solid #eeeeee;
  2094. width: 88rpx;
  2095. height: 88rpx;
  2096. border-radius: 32rpx;
  2097. text-align: center;
  2098. line-height: 88rpx;
  2099. color: #333;
  2100. font-size: 32rpx;
  2101. float: left;
  2102. margin: 20rpx 23rpx;
  2103. &.isRight {
  2104. border: 1rpx solid #eeeeee;
  2105. color: #fff;
  2106. background: #36c75a;
  2107. }
  2108. &.isWrong {
  2109. border: 1rpx solid #eeeeee;
  2110. color: #fff;
  2111. background: #ff3b30;
  2112. }
  2113. &.isPart {
  2114. border: 1rpx solid #eeeeee;
  2115. color: #fff;
  2116. background: #FFC53D;
  2117. }
  2118. &.isOver {
  2119. border: 1rpx solid #eeeeee;
  2120. color: #fff;
  2121. background: blue;
  2122. }
  2123. }
  2124. .answerInfos {
  2125. padding: 25rpx 25rpx 25rpx 23rpx;
  2126. }
  2127. .answerTitle {
  2128. margin-bottom: 28rpx;
  2129. color: #666;
  2130. font-size: 30rpx;
  2131. }
  2132. .answerContent {
  2133. font-size: 30rpx;
  2134. color: #666;
  2135. }
  2136. .textChild {
  2137. display: inline-block;
  2138. vertical-align: middle;
  2139. }
  2140. </style>