bankExam.vue 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235
  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. // 回答错误
  1207. if (isWrong) {
  1208. this.$api
  1209. .examWrongRecord({
  1210. orderGoodsId: this.orderGoodsId,
  1211. examId: this.examId,
  1212. goodsId: this.goodsId,
  1213. moduleExamId: this.moduleId || 0,
  1214. chapterExamId: this.chapterId || 0,
  1215. questionIds: [this.questionList[bindex].questionId],
  1216. recordId: this.recordId,
  1217. })
  1218. .then((res) => {});
  1219. } else {
  1220. // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
  1221. // if(question) {
  1222. // this.$api.wrongRecordDelete({
  1223. // "examId": +this.id,
  1224. // "goodsId": +this.goodsId,
  1225. // "questionId": this.questionList[bindex].questionId,
  1226. // }).then(res => {
  1227. // })
  1228. // }
  1229. }
  1230. },
  1231. /**
  1232. * @param {Object} 案例多选确认
  1233. */
  1234. checkboxSubmitChild(bindex, ansIndex) {
  1235. if (this.questionList[bindex].ques[ansIndex]) return;
  1236. let arr = [];
  1237. this.questionList[bindex].jsonStr[ansIndex].optionsList.forEach(
  1238. (item) => {
  1239. if (item.checked) {
  1240. arr.push(item.optionsId);
  1241. }
  1242. }
  1243. );
  1244. if (!arr.length) {
  1245. uni.showToast({
  1246. title: "请选择答案",
  1247. icon: "none",
  1248. });
  1249. return;
  1250. }
  1251. this.$set(this.questionList[bindex].ques, ansIndex, arr);
  1252. this.isDoOver();
  1253. },
  1254. /**
  1255. * @param {Object} index
  1256. * @param {Object} bindex
  1257. * 判断题
  1258. */
  1259. judgeSelect(index, bindex) {
  1260. if (this.questionList[bindex].ques) return;
  1261. this.$set(this.questionList[bindex], "ques", index + "");
  1262. this.isDoOver();
  1263. // 回答错误
  1264. if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
  1265. this.$api
  1266. .examWrongRecord({
  1267. orderGoodsId: this.orderGoodsId,
  1268. examId: this.examId,
  1269. goodsId: this.goodsId,
  1270. moduleExamId: this.moduleId || 0,
  1271. chapterExamId: this.chapterId || 0,
  1272. questionIds: [this.questionList[bindex].questionId],
  1273. recordId: this.recordId,
  1274. })
  1275. .then((res) => {});
  1276. } else {
  1277. // let question = this.wrongList.find(item => item.questionId == this.questionList[bindex].questionId);
  1278. // if(question) {
  1279. // this.$api.wrongRecordDelete({
  1280. // "examId": +this.id,
  1281. // "goodsId": +this.goodsId,
  1282. // "questionId": this.questionList[bindex].questionId,
  1283. // }).then(res => {
  1284. // })
  1285. // }
  1286. }
  1287. },
  1288. /**
  1289. * @param {Object} ansindex
  1290. * @param {Object} childindex
  1291. * @param {Object} bindex
  1292. * 案例判断题
  1293. */
  1294. judgeSelectChild(ansindex, childindex, bindex) {
  1295. if (this.questionList[bindex].ques[ansindex]) return;
  1296. this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
  1297. this.isDoOver();
  1298. },
  1299. openFooterTab() {
  1300. this.show = true;
  1301. },
  1302. changeIndex(index) {
  1303. this.currentIndex = index;
  1304. },
  1305. swiperChange(e) {
  1306. this.currentIndex = e.detail.current;
  1307. this.getCollectInfo(this.currentIndex);
  1308. },
  1309. /**
  1310. * @param {Object} current
  1311. * 获取收藏信息
  1312. */
  1313. getCollectInfo(current) {
  1314. this.$api
  1315. .getCollectInfo({
  1316. examId: this.examId,
  1317. questionId: this.questionList[current].questionId,
  1318. goodsId: this.goodsId,
  1319. orderGoodsId: this.orderGoodsId,
  1320. })
  1321. .then((res) => {
  1322. if (res.data.code == 500) {
  1323. this.$set(this.collectList, current, false);
  1324. } else if (res.data.code == 200) {
  1325. this.$set(this.collectList, current, res.data.data);
  1326. }
  1327. });
  1328. },
  1329. /**
  1330. * @param {Object} state
  1331. * @param {Object} index
  1332. * 收藏
  1333. */
  1334. collect(state, index) {
  1335. if (!state) {
  1336. this.$api
  1337. .collectQuestion({
  1338. examId: this.examId,
  1339. questionId: this.questionList[index].questionId,
  1340. goodsId: this.goodsId || "",
  1341. orderGoodsId: this.orderGoodsId,
  1342. })
  1343. .then((res) => {
  1344. if (res.data.code == 200) {
  1345. this.$set(this.collectList, index, true);
  1346. uni.showToast({
  1347. title: "收藏成功",
  1348. duration: 2000,
  1349. icon: "none",
  1350. });
  1351. this.getCollectInfo(index);
  1352. }
  1353. });
  1354. } else {
  1355. this.$api
  1356. .deleteCollectQuestion(this.collectList[index].collectQuestionId)
  1357. .then((res) => {
  1358. if (res.data.code == 200) {
  1359. this.$set(this.collectList, index, false);
  1360. uni.showToast({
  1361. title: "取消收藏成功",
  1362. duration: 2000,
  1363. icon: "none",
  1364. });
  1365. }
  1366. });
  1367. }
  1368. return;
  1369. },
  1370. /**
  1371. * @param {Object} imgIndex
  1372. * @param {Object} bankIndex
  1373. * 删除简答图片
  1374. */
  1375. deleteImg(imgIndex, bankIndex) {
  1376. this.questionList[bankIndex].ansText.imageList.splice(imgIndex, 1);
  1377. },
  1378. /**
  1379. * @param {Object} imgIndex
  1380. * @param {Object} bankIndex
  1381. * @param {Object} ansIndex
  1382. * 删除案例题简答图片
  1383. */
  1384. deleteImgChild(imgIndex, bankIndex, ansIndex) {
  1385. this.questionList[bankIndex].jsonStr[ansIndex].ansText.imageList.splice(
  1386. imgIndex,
  1387. 1
  1388. );
  1389. },
  1390. /**
  1391. * @param {Object} bankindex
  1392. * 选择上传图片
  1393. */
  1394. chooseImg(bankindex) {
  1395. if (
  1396. this.questionList[bankindex] &&
  1397. this.questionList[bankindex].ansText &&
  1398. this.questionList[bankindex].ansText.imageList.length >= 4
  1399. ) {
  1400. uni.showToast({
  1401. icon: "none",
  1402. title: "最多选择4张",
  1403. });
  1404. return;
  1405. }
  1406. uni.chooseImage({
  1407. count: 1, //默认9
  1408. sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
  1409. sourceType: ["album", "camera"], //从相册选择
  1410. success: (res) => {
  1411. let self = this;
  1412. // console.log(JSON.stringify(res.tempFilePaths));
  1413. let img = res.tempFilePaths[0];
  1414. uni.getImageInfo({
  1415. src: img,
  1416. success: async (res) => {
  1417. let canvasWidth = res.width; //图片原始长宽
  1418. let canvasHeight = res.height;
  1419. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1420. uni.compressImage({
  1421. src: img,
  1422. quality: 75,
  1423. width: "50%",
  1424. height: "50%",
  1425. success: async (rest) => {
  1426. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1427. this.questionList[bankindex].ansText.imageList.push(dir);
  1428. },
  1429. });
  1430. } else {
  1431. const dir = await self.uploadFile(img, 0);
  1432. this.questionList[bankindex].ansText.imageList.push(dir);
  1433. }
  1434. },
  1435. });
  1436. },
  1437. });
  1438. },
  1439. /**
  1440. * @param {Object} bankindex
  1441. * @param {Object} ansindex
  1442. * 案例题选择上传图片
  1443. */
  1444. chooseImgChild(bankindex, ansindex) {
  1445. if (
  1446. this.questionList[bankindex].jsonStr[ansindex] &&
  1447. this.questionList[bankindex].jsonStr[ansindex].ansText &&
  1448. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList
  1449. .length >= 4
  1450. ) {
  1451. uni.showToast({
  1452. icon: "none",
  1453. title: "最多选择4张",
  1454. });
  1455. return;
  1456. }
  1457. uni.chooseImage({
  1458. count: 1, //默认9
  1459. sizeType: ["compressed"], //可以指定是原图还是压缩图,默认二者都有
  1460. sourceType: ["album", "camera"], //从相册选择
  1461. success: (res) => {
  1462. let self = this;
  1463. // console.log(JSON.stringify(res.tempFilePaths));
  1464. let img = res.tempFilePaths[0];
  1465. uni.getImageInfo({
  1466. src: img,
  1467. success: async (res) => {
  1468. let canvasWidth = res.width; //图片原始长宽
  1469. let canvasHeight = res.height;
  1470. if (canvasWidth > 1000 || canvasHeight > 1000) {
  1471. uni.compressImage({
  1472. src: img,
  1473. quality: 75,
  1474. width: "50%",
  1475. height: "50%",
  1476. success: async (rest) => {
  1477. const dir = await self.uploadFile(rest.tempFilePath, 0);
  1478. this.questionList[bankindex].jsonStr[
  1479. ansindex
  1480. ].ansText.imageList.push(dir);
  1481. },
  1482. });
  1483. } else {
  1484. const dir = await self.uploadFile(img, 0);
  1485. this.questionList[bankindex].jsonStr[
  1486. ansindex
  1487. ].ansText.imageList.push(dir);
  1488. }
  1489. },
  1490. });
  1491. },
  1492. });
  1493. },
  1494. uploadFile(options, int) {
  1495. var self = this;
  1496. return new Promise((resolve, reject) => {
  1497. var data = {
  1498. orderGoodsId: this.orderGoodsId,
  1499. imageStatus: int,
  1500. };
  1501. self.$api.aliyunpolicy(data).then((res) => {
  1502. console.log(res.data, 6);
  1503. if (res.data.code != 200) {
  1504. self.$method.showToast("签名错误" + JSON.stringify(res.data));
  1505. return;
  1506. }
  1507. var ossToken = res.data.data.resultContent;
  1508. if (ossToken.host == null || ossToken.host == undefined) {
  1509. self.$method.showToast("上传路径报错" + JSON.stringify(res.data));
  1510. return;
  1511. }
  1512. uni.uploadFile({
  1513. url: ossToken.host,
  1514. name: "file",
  1515. filePath: options,
  1516. fileType: "image",
  1517. header: {
  1518. AuthorizationToken: "WX " + uni.getStorageSync("token"),
  1519. },
  1520. formData: {
  1521. key: ossToken.dir,
  1522. OSSAccessKeyId: ossToken.accessid,
  1523. policy: ossToken.policy,
  1524. Signature: ossToken.signature,
  1525. callback: ossToken.callback,
  1526. success_action_status: 200,
  1527. },
  1528. success: (result) => {
  1529. // if (result.statusCode === 200) {
  1530. resolve(ossToken.dir);
  1531. // } else {
  1532. // uni.showToast({
  1533. // title: "上传失败",
  1534. // icon: "none",
  1535. // });
  1536. // return;
  1537. // }
  1538. },
  1539. fail: (error) => {
  1540. uni.showToast({
  1541. title: "上传接口报错" + error,
  1542. icon: "none",
  1543. });
  1544. return;
  1545. },
  1546. });
  1547. });
  1548. });
  1549. },
  1550. /**
  1551. * @param {Object} type
  1552. * @param {Object} bankindex
  1553. * 简答题答案确认
  1554. */
  1555. submitAns(bankindex) {
  1556. console.log(this.questionList[bankindex]);
  1557. if (
  1558. !this.questionList[bankindex].ansText.text &&
  1559. !this.questionList[bankindex].ansText.imageList.length
  1560. ) {
  1561. uni.showToast({
  1562. title: "请输入内容或上传图片",
  1563. duration: 2000,
  1564. icon: "none",
  1565. });
  1566. return;
  1567. }
  1568. this.$set(this.questionList[bankindex], "ques", {
  1569. imageList: this.questionList[bankindex].ansText.imageList || [],
  1570. text: this.questionList[bankindex].ansText.text || "",
  1571. });
  1572. this.isDoOver();
  1573. },
  1574. /**
  1575. * @param {Object} bankindex
  1576. * @param {Object} ansindex
  1577. * 案例题简答答案确认
  1578. */
  1579. submitAnsChild(bankindex, ansindex) {
  1580. if (
  1581. !this.questionList[bankindex].jsonStr[ansindex].ansText.text &&
  1582. !this.questionList[bankindex].jsonStr[ansindex].ansText.imageList.length
  1583. ) {
  1584. uni.showToast({
  1585. title: "请输入内容或上传图片",
  1586. duration: 2000,
  1587. icon: "none",
  1588. });
  1589. return;
  1590. }
  1591. this.$set(this.questionList[bankindex].ques, ansindex, {
  1592. imageList:
  1593. this.questionList[bankindex].jsonStr[ansindex].ansText.imageList ||
  1594. [],
  1595. text: this.questionList[bankindex].jsonStr[ansindex].ansText.text || "",
  1596. });
  1597. this.isDoOver();
  1598. },
  1599. isRight(item, index) {
  1600. //单选
  1601. if (this.questionList[index].ques) {
  1602. if (item.type == 1) {
  1603. return this.questionList[index].ques == this.questionList[index].ans;
  1604. //多选
  1605. } else if (item.type == 2) {
  1606. //每一项都相等
  1607. return this.questionList[index].ans.every((item, i) => {
  1608. return item == this.questionList[index].ques[i];
  1609. });
  1610. //判断
  1611. } else if (item.type == 3) {
  1612. return this.questionList[index].ques == this.questionList[index].ans;
  1613. // } else if (item.type == 5) {
  1614. // if(this.questionList[index].ques.text){
  1615. // return true
  1616. // }else{
  1617. // return false
  1618. // }
  1619. } else {
  1620. return false;
  1621. }
  1622. } else {
  1623. return false;
  1624. }
  1625. },
  1626. right(bankIndex, ansIndex, option) {
  1627. if (
  1628. this.questionList[bankIndex].ques[ansIndex] &&
  1629. this.questionList[bankIndex].ans[ansIndex]
  1630. ) {
  1631. if (
  1632. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1633. option.optionsId
  1634. ) != -1 ||
  1635. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1636. option.optionsId
  1637. ) != -1
  1638. ) {
  1639. return true;
  1640. } else {
  1641. return false;
  1642. }
  1643. } else {
  1644. return false;
  1645. }
  1646. },
  1647. wrong(bankIndex, ansIndex, option) {
  1648. if (
  1649. this.questionList[bankIndex].ques[ansIndex] &&
  1650. this.questionList[bankIndex].ans[ansIndex]
  1651. ) {
  1652. if (
  1653. this.questionList[bankIndex].ques[ansIndex].indexOf(
  1654. option.optionsId
  1655. ) != -1 &&
  1656. this.questionList[bankIndex].ans[ansIndex].indexOf(
  1657. option.optionsId
  1658. ) == -1
  1659. ) {
  1660. return true;
  1661. } else {
  1662. return false;
  1663. }
  1664. } else {
  1665. return false;
  1666. }
  1667. },
  1668. isWrong(item, index) {
  1669. if (this.questionList[index].ques) {
  1670. //单选
  1671. if (item.type == 1) {
  1672. return this.questionList[index].ques != this.questionList[index].ans;
  1673. //多选
  1674. } else if (item.type == 2) {
  1675. //每一项都相等
  1676. return this.questionList[index].ques.some((item, i) => {
  1677. return this.questionList[index].ans.indexOf(item) == -1;
  1678. });
  1679. //判断
  1680. } else if (item.type == 3) {
  1681. return this.questionList[index].ques != this.questionList[index].ans;
  1682. } else {
  1683. return false;
  1684. }
  1685. } else {
  1686. return false;
  1687. }
  1688. },
  1689. isPart(item, index) {
  1690. if (this.questionList[index].ques) {
  1691. if (item.type == 2) {
  1692. let isWrong = this.questionList[index].ques.some((item, i) => {
  1693. return this.questionList[index].ans.indexOf(item) == -1;
  1694. });
  1695. let isRight = this.questionList[index].ans.every((item, i) => {
  1696. return item == this.questionList[index].ques[i];
  1697. });
  1698. if (!isRight && !isWrong) {
  1699. return true;
  1700. }
  1701. }
  1702. } else {
  1703. return false;
  1704. }
  1705. },
  1706. isOver(item, index) {
  1707. if (this.questionList[index].ques) {
  1708. if (item.type == 4) {
  1709. //案例题
  1710. let isOver = item.jsonStr.every((jsonItem, indexs) => {
  1711. if (
  1712. jsonItem.type == 1 ||
  1713. jsonItem.type == 2 ||
  1714. jsonItem.type == 3
  1715. ) {
  1716. if (item.ques[indexs]) {
  1717. return true;
  1718. } else {
  1719. return false;
  1720. }
  1721. } else if (jsonItem.type == 5) {
  1722. if (
  1723. item.ques[indexs] &&
  1724. (item.ques[indexs].text || item.ques[indexs].imageList.length)
  1725. ) {
  1726. console.log("chil");
  1727. return true;
  1728. } else {
  1729. return false;
  1730. }
  1731. }
  1732. });
  1733. if (isOver) {
  1734. return true;
  1735. } else {
  1736. return false;
  1737. }
  1738. } else if (item.type == 5) {
  1739. //简答题
  1740. //每一项都相等
  1741. if (item.ques && (item.ques.imageList.length || item.ques.text)) {
  1742. return true;
  1743. }
  1744. //判断
  1745. } else {
  1746. return false;
  1747. }
  1748. } else {
  1749. return false;
  1750. }
  1751. },
  1752. tabSelect(index, bankindex) {
  1753. this.$set(this.questionList[bankindex], "current", index);
  1754. },
  1755. showPhoto(contentStr) {
  1756. if (contentStr && typeof contentStr == "string") {
  1757. let reg = /<img[^>]*src[=\'\"\s]+([^\'\"]*)[\'\"]?[^>]*>/gi;
  1758. let strArr = contentStr.match(reg);
  1759. strArr.forEach((str, index) => {
  1760. strArr[index] = str.replace(reg, "$1");
  1761. });
  1762. // 预览图片
  1763. uni.previewImage({
  1764. urls: strArr,
  1765. longPressActions: {
  1766. itemList: ["发送给朋友", "保存图片", "收藏"],
  1767. success: function (data) {
  1768. console.log(
  1769. "选中了第" +
  1770. (data.tapIndex + 1) +
  1771. "个按钮,第" +
  1772. (data.index + 1) +
  1773. "张图片"
  1774. );
  1775. },
  1776. fail: function (err) {
  1777. console.log(err.errMsg);
  1778. },
  1779. },
  1780. });
  1781. }
  1782. },
  1783. },
  1784. computed: { ...mapGetters(['playSectionId','playChannelId','playVID','playNextId','userInfo','liveLast']) }
  1785. };
  1786. </script>
  1787. <style scoped lang="scss">
  1788. .lisSty {
  1789. margin-bottom: 16rpx;
  1790. display: flex;
  1791. align-items: center;
  1792. .flex_auto {
  1793. flex: 1;
  1794. }
  1795. }
  1796. .swiper,.bankExam {
  1797. height:100%;
  1798. }
  1799. .activeTI {
  1800. vertical-align: middle;
  1801. display: inline-block;
  1802. border: 1rpx solid #eee;
  1803. border-radius: 50rpx;
  1804. height: 48rpx;
  1805. line-height: 46rpx;
  1806. text-align: center;
  1807. width: 48rpx;
  1808. margin-right: 15rpx;
  1809. color: #666;
  1810. font-size: 30rpx;
  1811. &.right {
  1812. color: #fff;
  1813. background: #36c75a;
  1814. }
  1815. &.wrong {
  1816. color: #fff;
  1817. background: #ff3b30;
  1818. }
  1819. &.checked {
  1820. color: #fff;
  1821. background: #007aff;
  1822. }
  1823. }
  1824. .submit_checkbox {
  1825. position: fixed;
  1826. left: 0;
  1827. right: 0;
  1828. bottom: 120rpx;
  1829. margin: 20rpx auto;
  1830. width: 526rpx;
  1831. height: 80rpx;
  1832. background: rgba(0, 122, 255, 1);
  1833. color: #fff;
  1834. text-align: center;
  1835. line-height: 80rpx;
  1836. font-size: 30rpx;
  1837. border-radius: 40rpx;
  1838. &.disabled {
  1839. opacity: 0.6;
  1840. }
  1841. }
  1842. .titles {
  1843. overflow: hidden;
  1844. margin-bottom: 24rpx;
  1845. }
  1846. .titBox {
  1847. padding: 41rpx 25rpx 24rpx 25rpx;
  1848. }
  1849. .titBox_title {
  1850. padding: 21rpx;
  1851. }
  1852. .tabs {
  1853. margin: 10rpx;
  1854. display: flex;
  1855. .tab {
  1856. margin: 0 4rpx;
  1857. padding: 10rpx 13rpx;
  1858. text-align: center;
  1859. color: #007aff;
  1860. font-size: 28rpx;
  1861. border-radius: 16rpx;
  1862. background: #fff;
  1863. &.current {
  1864. color: #fff;
  1865. background: #007aff;
  1866. }
  1867. }
  1868. }
  1869. .ans {
  1870. margin: 8rpx 8rpx 8rpx;
  1871. .ans_input {
  1872. border-radius: 16rpx;
  1873. background: #fff;
  1874. .top {
  1875. border-bottom: 1rpx solid #eeeeee;
  1876. padding: 16rpx;
  1877. display: flex;
  1878. align-items: center;
  1879. .icon {
  1880. margin-right: 20rpx;
  1881. width: 40rpx;
  1882. height: 38rpx;
  1883. }
  1884. .progress {
  1885. flex: 1;
  1886. }
  1887. .submit {
  1888. width: 168rpx;
  1889. height: 48rpx;
  1890. line-height: 48rpx;
  1891. text-align: center;
  1892. color: #fff;
  1893. font-size: 30rpx;
  1894. background: #007aff;
  1895. border-radius: 24rpx;
  1896. &.disabled {
  1897. opacity: 0.6;
  1898. }
  1899. }
  1900. }
  1901. .textarea {
  1902. textarea {
  1903. width: 100%;
  1904. height: 287rpx;
  1905. padding: 10rpx;
  1906. }
  1907. }
  1908. .imgs {
  1909. overflow: hidden;
  1910. display: flex;
  1911. width: 100%;
  1912. .img {
  1913. width: 104rpx;
  1914. height: 104rpx;
  1915. border-radius: 8rpx;
  1916. position: relative;
  1917. margin: 20rpx;
  1918. text {
  1919. position: absolute;
  1920. right: -15rpx;
  1921. top: -15rpx;
  1922. width: 30rpx;
  1923. height: 30rpx;
  1924. text-align: center;
  1925. line-height: 30rpx;
  1926. color: #fff;
  1927. background: #ff3b30;
  1928. border-radius: 50%;
  1929. }
  1930. image {
  1931. width: 100%;
  1932. height: 100%;
  1933. }
  1934. }
  1935. }
  1936. }
  1937. .ans_submit {
  1938. padding: 16rpx;
  1939. border-radius: 16rpx;
  1940. background: #fff;
  1941. .imgs {
  1942. overflow: hidden;
  1943. display: flex;
  1944. width: 100%;
  1945. .img {
  1946. width: 104rpx;
  1947. height: 104rpx;
  1948. border-radius: 8rpx;
  1949. position: relative;
  1950. margin: 20rpx;
  1951. image {
  1952. width: 100%;
  1953. height: 100%;
  1954. }
  1955. }
  1956. }
  1957. }
  1958. }
  1959. .leftLetters {
  1960. display: flex;
  1961. align-items: center;
  1962. width: 220rpx;
  1963. .btnType {
  1964. padding: 5rpx 10rpx;
  1965. border: 1rpx solid #007aff;
  1966. border-radius: 10rpx;
  1967. background-color: rgba(0, 122, 255, 0.1);
  1968. font-size: 28rpx;
  1969. color: #007aff;
  1970. margin-right: 15rpx;
  1971. }
  1972. }
  1973. .firstLetter {
  1974. display: flex;
  1975. justify-content: space-between;
  1976. align-items: center;
  1977. margin-bottom: 30rpx;
  1978. }
  1979. .popupView {
  1980. height: 100%;
  1981. padding-bottom: 100rpx;
  1982. .popupTops {
  1983. height: 77rpx;
  1984. border-bottom: 1rpx solid #eee;
  1985. text-align: center;
  1986. line-height: 77rpx;
  1987. font-size: 24rpx;
  1988. color: #999;
  1989. position: relative;
  1990. .topIcon {
  1991. position: absolute;
  1992. top: 10rpx;
  1993. left: 50%;
  1994. transform: translateX(-50%);
  1995. width: 80rpx;
  1996. height: 8rpx;
  1997. background-color: #999;
  1998. border-radius: 4rpx;
  1999. }
  2000. }
  2001. .popupContent {
  2002. }
  2003. }
  2004. .pageContent {
  2005. position: relative;
  2006. background-color: #eaeef1;
  2007. height: 100%;
  2008. padding-top: 8rpx;
  2009. padding-bottom: 100rpx;
  2010. overflow-y: scroll;
  2011. }
  2012. .pad_8 {
  2013. background-color: #fff;
  2014. margin: 0rpx 8rpx 8rpx;
  2015. border-radius: 16rpx;
  2016. &.no-margin {
  2017. margin-top: -16rpx;
  2018. border-radius: 0 0 16rpx 16rpx;
  2019. }
  2020. }
  2021. .answer {
  2022. height: 80rpx;
  2023. line-height: 80rpx;
  2024. padding: 0rpx 24rpx;
  2025. display: flex;
  2026. align-items: center;
  2027. justify-content: space-between;
  2028. color: #666;
  2029. font-size: 30rpx;
  2030. }
  2031. .footer_btn {
  2032. background-color: #fff;
  2033. z-index: 10078;
  2034. position: fixed;
  2035. bottom: 0rpx;
  2036. display: flex;
  2037. align-items: center;
  2038. justify-content: space-between;
  2039. width: 100%;
  2040. height: 98rpx;
  2041. padding: 0rpx 38rpx;
  2042. border-top: 1rpx solid #eee;
  2043. .flex_center {
  2044. flex: 1;
  2045. display: flex;
  2046. justify-content: center;
  2047. align-items: center;
  2048. flex-direction: column;
  2049. margin: 0 200rpx;
  2050. font-size: 24rpx;
  2051. color: #999999;
  2052. .up-icon {
  2053. margin-bottom: 18rpx;
  2054. width: 100%;
  2055. display: flex;
  2056. justify-content: center;
  2057. image {
  2058. width: 58rpx;
  2059. height: 21rpx;
  2060. }
  2061. }
  2062. }
  2063. .collect {
  2064. visibility: hidden;
  2065. width: 100rpx;
  2066. &.show {
  2067. visibility: visible;
  2068. }
  2069. > view {
  2070. display: flex;
  2071. flex-direction: column;
  2072. align-items: center;
  2073. justify-content: center;
  2074. image {
  2075. width: 32rpx;
  2076. height: 32rpx;
  2077. margin-bottom: 6rpx;
  2078. }
  2079. view {
  2080. font-size: 24rpx;
  2081. color: #999999;
  2082. }
  2083. }
  2084. }
  2085. }
  2086. .boxSty {
  2087. padding: 44rpx 41rpx 0rpx;
  2088. }
  2089. .liListSty {
  2090. border: 1rpx solid #eeeeee;
  2091. width: 88rpx;
  2092. height: 88rpx;
  2093. border-radius: 32rpx;
  2094. text-align: center;
  2095. line-height: 88rpx;
  2096. color: #333;
  2097. font-size: 32rpx;
  2098. float: left;
  2099. margin: 20rpx 23rpx;
  2100. &.isRight {
  2101. border: 1rpx solid #eeeeee;
  2102. color: #fff;
  2103. background: #36c75a;
  2104. }
  2105. &.isWrong {
  2106. border: 1rpx solid #eeeeee;
  2107. color: #fff;
  2108. background: #ff3b30;
  2109. }
  2110. &.isPart {
  2111. border: 1rpx solid #eeeeee;
  2112. color: #fff;
  2113. background: #FFC53D;
  2114. }
  2115. &.isOver {
  2116. border: 1rpx solid #eeeeee;
  2117. color: #fff;
  2118. background: blue;
  2119. }
  2120. }
  2121. .answerInfos {
  2122. padding: 25rpx 25rpx 25rpx 23rpx;
  2123. }
  2124. .answerTitle {
  2125. margin-bottom: 28rpx;
  2126. color: #666;
  2127. font-size: 30rpx;
  2128. }
  2129. .answerContent {
  2130. font-size: 30rpx;
  2131. color: #666;
  2132. }
  2133. .textChild {
  2134. display: inline-block;
  2135. vertical-align: middle;
  2136. }
  2137. </style>