questionBankExplain.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158
  1. <template>
  2. <view class="questionBank">
  3. <nav-bar title="解析"></nav-bar>
  4. <swiper
  5. class="swiper"
  6. :current="current"
  7. @change="swiperChange"
  8. >
  9. <swiper-item v-for="(bank, bankIndex) in questionList" :key="bankIndex">
  10. <view class="pageContent">
  11. <view class="pad_8 titBox">
  12. <view class="firstLetter">
  13. <view class="leftLetters">
  14. <view class="btnType">
  15. <text v-if="bank.type == 1">单选</text>
  16. <text v-if="bank.type == 2">多选</text>
  17. <text v-if="bank.type == 3">判断</text>
  18. <text v-if="bank.type == 4">案例</text>
  19. <text v-if="bank.type == 5">简答</text>
  20. </view>
  21. <text>{{ bankIndex + 1 }}/{{ questionList.length }}</text>
  22. </view>
  23. <view style="color: #666; font-size: 28rpx"></view>
  24. <view class="leftLetters"></view>
  25. </view>
  26. <view class="titles">
  27. <rich-text :nodes="bank.content"></rich-text>
  28. </view>
  29. </view>
  30. <template v-if="bank.type == 1">
  31. <view class="pad_8 titBox no-margin">
  32. <view>
  33. <view
  34. v-for="(item, index) in bank.jsonStr"
  35. :key="index"
  36. class="lisSty"
  37. >
  38. <text
  39. :class="{
  40. right:
  41. item.optionsId == bank.ques ||
  42. item.optionsId == bank.ans,
  43. wrong:
  44. item.optionsId == bank.ques && bank.ques != bank.ans,
  45. }"
  46. class="activeTI"
  47. >{{ ast[index] }}</text
  48. >
  49. <view class="flex_auto">
  50. {{ item.content }}
  51. <view v-if="item.imgUrl">
  52. <image
  53. style="width: 600rpx"
  54. mode="widthFix"
  55. :src="$method.splitImgHost(item.imgUrl)"
  56. ></image>
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <view>
  63. <view class="pad_8 answer">
  64. <view>题目答案:{{ ast[bank.ans - 1] }}</view>
  65. </view>
  66. <view class="pad_8 answerInfos">
  67. <view class="answerTitle">答案解析</view>
  68. <view class="answerContent">
  69. <rich-text :nodes="bank.analysisContent"></rich-text>
  70. </view>
  71. </view>
  72. </view>
  73. </template>
  74. <template v-if="bank.type == 2">
  75. <view class="pad_8 titBox no-margin">
  76. <view>
  77. <view
  78. v-for="(item, index) in bank.jsonStr"
  79. :key="index"
  80. class="lisSty"
  81. >
  82. <text
  83. :class="{
  84. right:
  85. bank.ques.indexOf(item.optionsId) != -1 ||
  86. bank.ans.indexOf(item.optionsId) != -1,
  87. wrong:
  88. bank.ques.indexOf(item.optionsId) != -1 &&
  89. bank.ans.indexOf(item.optionsId) == -1,
  90. }"
  91. class="activeTI"
  92. >{{ ast[index] }}</text
  93. >
  94. <view class="flex_auto">
  95. {{ item.content }}
  96. <view v-if="item.imgUrl">
  97. <image
  98. style="width: 600rpx"
  99. mode="widthFix"
  100. :src="$method.splitImgHost(item.imgUrl)"
  101. ></image>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view>
  108. <view class="pad_8 answer">
  109. <view
  110. >题目答案:
  111. <text
  112. :key="ansItemIndex"
  113. v-for="(ansItem, ansItemIndex) in bank.ans"
  114. >{{ ast[ansItem - 1] }}</text
  115. >
  116. </view>
  117. </view>
  118. <view class="pad_8 answerInfos">
  119. <view class="answerTitle">答案解析</view>
  120. <view class="answerContent">
  121. <rich-text :nodes="bank.analysisContent"></rich-text>
  122. </view>
  123. </view>
  124. </view>
  125. </template>
  126. <template v-if="bank.type == 3">
  127. <view class="pad_8 titBox no-margin">
  128. <view>
  129. <view
  130. v-for="(item, index) in judge"
  131. :key="index"
  132. class="lisSty"
  133. >
  134. <text
  135. :class="{
  136. right: index == bank.ques || index == bank.ans,
  137. wrong: index == bank.ques && bank.ques != bank.ans,
  138. }"
  139. class="activeTI"
  140. >{{ ast[index] }}</text
  141. >
  142. <view class="flex_auto">
  143. {{ item }}
  144. <view v-if="item.imgUrl">
  145. <image
  146. style="width: 600rpx"
  147. mode="widthFix"
  148. :src="$method.splitImgHost(item.imgUrl)"
  149. ></image>
  150. </view>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <view>
  156. <view class="pad_8 answer">
  157. <view>题目答案:{{ ast[bank.ans] }}</view>
  158. </view>
  159. <view class="pad_8 answerInfos">
  160. <view class="answerTitle">答案解析</view>
  161. <view class="answerContent">
  162. <rich-text :nodes="bank.analysisContent"></rich-text>
  163. </view>
  164. </view>
  165. </view>
  166. </template>
  167. <!-- 简答题 -->
  168. <template v-if="bank.type == 5">
  169. <view class="pad_8 titBox">
  170. <view>
  171. <view class="pad_8 answerInfos">
  172. <view class="answerTitle">答案解析:</view>
  173. <view class="answerContent">
  174. <rich-text :nodes="bank.analysisContent"></rich-text>
  175. </view>
  176. </view>
  177. </view>
  178. </view>
  179. </template>
  180. <!-- 案例题 -->
  181. <template v-if="bank.type == 4">
  182. <view class="tabs">
  183. <view
  184. class="tab"
  185. :class="{ current: tabIndex == bank.current }"
  186. :key="tabIndex"
  187. v-for="(tab, tabIndex) in bank.jsonStr"
  188. @click="tabSelect(tabIndex, bankIndex)"
  189. >
  190. 问题{{ tabIndex + 1 }}
  191. </view>
  192. </view>
  193. <view
  194. v-for="(ansItem, ansIndex) in bank.jsonStr"
  195. v-if="bank.current == ansIndex"
  196. :key="ansIndex"
  197. >
  198. <template v-if="ansItem.type == 1">
  199. <view class="pad_8 titBox">
  200. <view class="leftLetters">
  201. <view class="btnType">
  202. <text>单选</text>
  203. </view>
  204. </view>
  205. <view class="titles">
  206. <rich-text :nodes="ansItem.content"></rich-text>
  207. </view>
  208. <view>
  209. <view
  210. v-for="(option, childIndex) in ansItem.optionsList"
  211. :key="childIndex"
  212. class="lisSty"
  213. >
  214. <text
  215. :class="{
  216. right:
  217. option.optionsId == bank.ques[ansIndex] ||
  218. option.optionsId == bank.ans[ansIndex],
  219. wrong:
  220. option.optionsId == bank.ques[ansIndex] &&
  221. bank.ques[ansIndex] != bank.ans[ansIndex],
  222. }"
  223. class="activeTI"
  224. >{{ ast[childIndex] }}</text
  225. >
  226. <view class="flex_auto">
  227. <rich-text :nodes="option.content"></rich-text>
  228. <view v-if="option.imgUrl">
  229. <image
  230. style="width: 600rpx"
  231. mode="widthFix"
  232. :src="$method.splitImgHost(option.imgUrl)"
  233. ></image>
  234. </view>
  235. </view>
  236. </view>
  237. </view>
  238. </view>
  239. <view>
  240. <view class="pad_8 answer">
  241. <view>题目答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
  242. </view>
  243. <view class="pad_8 answerInfos">
  244. <view class="answerTitle">答案解析</view>
  245. <view class="answerContent">
  246. <rich-text :nodes="option.analysisContent"></rich-text>
  247. </view>
  248. </view>
  249. </view>
  250. </template>
  251. <template v-if="ansItem.type == 2">
  252. <view class="pad_8 titBox">
  253. <view class="leftLetters">
  254. <view class="btnType">
  255. <text>多选</text>
  256. </view>
  257. </view>
  258. <view class="titles">
  259. <rich-text :nodes="ansItem.content"></rich-text>
  260. </view>
  261. <view>
  262. <view
  263. v-for="(option, childindex) in ansItem.optionsList"
  264. :key="childindex"
  265. class="lisSty"
  266. >
  267. <text
  268. :class="{
  269. right: right(bankIndex, ansIndex, option),
  270. wrong: wrong(bankIndex, ansIndex, option),
  271. }"
  272. class="activeTI"
  273. >{{ ast[childindex] }}</text
  274. >
  275. <view class="flex_auto">
  276. <rich-text :nodes="option.content"></rich-text>
  277. <view v-if="option.imgUrl">
  278. <image
  279. style="width: 600rpx"
  280. mode="widthFix"
  281. :src="$method.splitImgHost(option.imgUrl)"
  282. ></image>
  283. </view>
  284. </view>
  285. </view>
  286. </view>
  287. </view>
  288. <view v-if="bank.ques[ansIndex]">
  289. <view class="pad_8 answer">
  290. <view
  291. >题目答案:
  292. <text
  293. :key="ansItemIndex1"
  294. v-for="(ansItem1, ansItemIndex1) in bank.ans[ansIndex]"
  295. >{{ ast[ansItem1 - 1] }}</text
  296. >
  297. </view>
  298. </view>
  299. <view class="pad_8 answerInfos">
  300. <view class="answerTitle">答案解析</view>
  301. <view class="answerContent">
  302. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  303. </view>
  304. </view>
  305. </view>
  306. </template>
  307. <template v-if="ansItem.type == 3">
  308. <view class="pad_8 titBox">
  309. <view class="leftLetters">
  310. <view class="btnType">
  311. <text>判断</text>
  312. </view>
  313. </view>
  314. <view class="titles">
  315. <rich-text :nodes="ansItem.content"></rich-text>
  316. </view>
  317. <view>
  318. <view
  319. v-for="(option, childindex) in judge"
  320. :key="childindex"
  321. class="lisSty"
  322. >
  323. <text
  324. :class="{
  325. right:
  326. childindex == bank.ques[ansIndex] ||
  327. childindex == bank.ans[ansIndex],
  328. wrong:
  329. childindex == bank.ques[ansIndex] &&
  330. bank.ques[ansIndex] != bank.ans[ansIndex],
  331. }"
  332. class="activeTI"
  333. >{{ ast[childindex] }}</text
  334. >
  335. <view class="flex_auto">
  336. {{ option }}
  337. <view v-if="option.imgUrl">
  338. <image
  339. style="width: 600rpx"
  340. mode="widthFix"
  341. :src="$method.splitImgHost(option.imgUrl)"
  342. ></image>
  343. </view>
  344. </view>
  345. </view>
  346. </view>
  347. </view>
  348. <view>
  349. <view class="pad_8 answer">
  350. <view>题目答案:{{ ast[bank.ans[ansIndex]] }}</view>
  351. </view>
  352. <view class="pad_8 answerInfos">
  353. <view class="answerTitle">答案解析</view>
  354. <view class="answerContent">
  355. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  356. </view>
  357. </view>
  358. </view>
  359. </template>
  360. <!-- 简答题 -->
  361. <template v-if="ansItem.type == 5">
  362. <view class="pad_8 titBox">
  363. <view class="leftLetters">
  364. <view class="btnType">
  365. <text>简答</text>
  366. </view>
  367. </view>
  368. <view class="titles">
  369. <rich-text :nodes="ansItem.content"></rich-text>
  370. </view>
  371. </view>
  372. <view>
  373. <view class="pad_8 answerInfos">
  374. <view class="answerTitle">答案解析</view>
  375. <view class="answerContent">
  376. <rich-text :nodes="ansItem.analysisContent"></rich-text>
  377. </view>
  378. </view>
  379. </view>
  380. </template>
  381. </view>
  382. </template>
  383. <view class="footer_btn">
  384. <view class="collect">
  385. <view>
  386. <image src="/static/icon/collect.png" mode=""></image>
  387. <view>收藏</view>
  388. </view>
  389. </view>
  390. <view class="flex_center" @click="openFooterTab">
  391. <view class="up-icon">
  392. <image src="/static/up.png"></image>
  393. </view>
  394. 答题卡
  395. </view>
  396. <view class="collect">
  397. <view>
  398. <image src="/static/jj.png" mode=""></image>
  399. <view>交卷</view>
  400. </view>
  401. </view>
  402. </view>
  403. </view>
  404. </swiper-item>
  405. </swiper>
  406. <u-popup v-model="show" mode="bottom" border-radius="14" height="680rpx">
  407. <view class="popupView">
  408. <view class="popupTops">
  409. <view class="topIcon"></view>
  410. 点击编号即可跳转至对应题目
  411. </view>
  412. <view class="popupContent">
  413. <scroll-view scroll-y="true" style="height: 506rpx">
  414. <view class="boxSty">
  415. <view
  416. v-for="(item, index) in questionList"
  417. :key="index"
  418. @click="changeIndex(index)"
  419. :class="{
  420. isRight: isRight(item, index),
  421. isWrong: isWrong(item, index),
  422. }"
  423. class="liListSty"
  424. >{{ index + 1 }}</view
  425. >
  426. </view>
  427. </scroll-view>
  428. </view>
  429. </view>
  430. </u-popup>
  431. <view class="dialog" v-if="showDialog">
  432. <view class="text">左右滑动切换上下题</view>
  433. <view class="btn" @click="hideDialog">我知道了</view>
  434. </view>
  435. </view>
  436. </template>
  437. <script>
  438. export default {
  439. data() {
  440. return {
  441. id: "",
  442. current: 0,
  443. showpopups: false,
  444. questionList: [],
  445. ast: ["A", "B", "C", "D", "E", "F", "G"],
  446. judge: ["错误", "正确"],
  447. show: false,
  448. showDialog: false,
  449. bankList: [],
  450. collectList: [],
  451. goodsId: "",
  452. recordId: "",
  453. chapterId: "",
  454. moduleId: "",
  455. doMode: 1, // 1-普通章卷,2-随机练习
  456. };
  457. },
  458. onLoad(option) {
  459. this.id = option.id || "";
  460. this.goodsId = option.goodsid || "";
  461. this.chapterId = option.chapterId || "";
  462. this.moduleId = option.moduleId || "";
  463. this.recordId = option.recordId || "";
  464. this.doMode = option.doMode
  465. let showDialog = uni.getStorageSync("showDialog");
  466. if (showDialog) {
  467. this.showDialog = false;
  468. } else {
  469. this.showDialog = true;
  470. uni.setStorageSync("showDialog", "1");
  471. }
  472. console.log('------解析解析', this.doMode);
  473. if (this.doMode == 2) {
  474. this.getQuestionTempList()
  475. } else {
  476. this.goodsQuestionList();
  477. }
  478. },
  479. onUnload() {},
  480. methods: {
  481. /**
  482. * 是否有上传图片
  483. */
  484. hasImgs(bank) {
  485. return bank.ansText.imageList.length == 0;
  486. },
  487. // 获取随机练习解析题
  488. getQuestionTempList() {
  489. this.$api.goodsQuestionTempList({examId: this.id,}).then((res) => {
  490. if (res.data.code == 200) {
  491. this.analyseData(res.data.data)
  492. }
  493. })
  494. },
  495. goodsQuestionList() {
  496. //解析
  497. this.$api
  498. .goodsQuestionList({
  499. examId: this.id,
  500. })
  501. .then((res) => {
  502. if (res.data.code == 200) {
  503. this.analyseData(res.data.data)
  504. }
  505. });
  506. },
  507. analyseData(datas = []) {
  508. datas.forEach((item, index) => {
  509. if (typeof item.jsonStr == "string") {
  510. item.jsonStr = JSON.parse(item.jsonStr);
  511. if (item.type == 2) {
  512. //多选
  513. item.jsonStr.forEach((str) => {
  514. str.optionsId = "" + str.optionsId;
  515. });
  516. let arr = item.answerQuestion.split(",");
  517. arr.forEach((a, i) => {
  518. arr[i] = "" + a;
  519. });
  520. item.ans = arr;
  521. item.ques = item.ans;
  522. return;
  523. } else if (item.type == 5) {
  524. item.ansText = {
  525. text: item.analysisContent,
  526. imageList: [],
  527. };
  528. item.ques = {
  529. text: item.analysisContent,
  530. imageList: [],
  531. };
  532. return;
  533. } else if (item.type == 4) {
  534. console.log(item.jsonStr);
  535. item.ques = [];
  536. item.current = 0;
  537. let ansArr = [];
  538. item.jsonStr.forEach((json, index) => {
  539. if (json.type == 1) {
  540. ansArr[index] = json.answerQuestion;
  541. } else if (json.type == 2) {
  542. json.optionsList.forEach((str) => {
  543. str.optionsId = "" + str.optionsId;
  544. });
  545. let arr = json.answerQuestion.split(",");
  546. arr.forEach((a, i) => {
  547. arr[i] = "" + a;
  548. });
  549. ansArr[index] = arr;
  550. } else if (json.type == 3) {
  551. ansArr[index] = json.answerQuestion;
  552. } else if (json.type == 5) {
  553. ansArr[index] = {
  554. text: "",
  555. imageList: [],
  556. };
  557. json.ansText = {
  558. text: "",
  559. imageList: [],
  560. };
  561. }
  562. });
  563. item.ans = ansArr;
  564. item.ques = item.ans;
  565. return;
  566. }
  567. item.ans = item.answerQuestion;
  568. item.ques = item.ans;
  569. } else {
  570. item.ques = item.ans;
  571. }
  572. });
  573. this.questionList = datas
  574. },
  575. openFooterTab() {
  576. this.show = true;
  577. },
  578. hideDialog() {
  579. this.showDialog = false;
  580. },
  581. changeIndex(index) {
  582. this.current = index;
  583. },
  584. swiperChange(e) {
  585. this.current = e.detail.current;
  586. },
  587. isRight(item, index) {
  588. //单选
  589. if (this.questionList[index].ques) {
  590. if (item.type == 1) {
  591. return this.questionList[index].ques == this.questionList[index].ans;
  592. //多选
  593. } else if (item.type == 2) {
  594. //每一项都相等
  595. return this.questionList[index].ans.every((item, i) => {
  596. return item == this.questionList[index].ques[i];
  597. });
  598. //判断
  599. } else if (item.type == 3) {
  600. return this.questionList[index].ques == this.questionList[index].ans;
  601. } else {
  602. return false;
  603. }
  604. } else {
  605. return false;
  606. }
  607. },
  608. right(bankIndex, ansIndex, option) {
  609. if (
  610. this.questionList[bankIndex].ques[ansIndex] &&
  611. this.questionList[bankIndex].ans[ansIndex]
  612. ) {
  613. if (
  614. this.questionList[bankIndex].ques[ansIndex].indexOf(
  615. option.optionsId
  616. ) != -1 ||
  617. this.questionList[bankIndex].ans[ansIndex].indexOf(
  618. option.optionsId
  619. ) != -1
  620. ) {
  621. return true;
  622. } else {
  623. return false;
  624. }
  625. } else {
  626. return false;
  627. }
  628. },
  629. wrong(bankIndex, ansIndex, option) {
  630. if (
  631. this.questionList[bankIndex].ques[ansIndex] &&
  632. this.questionList[bankIndex].ans[ansIndex]
  633. ) {
  634. if (
  635. this.questionList[bankIndex].ques[ansIndex].indexOf(
  636. option.optionsId
  637. ) != -1 &&
  638. this.questionList[bankIndex].ans[ansIndex].indexOf(
  639. option.optionsId
  640. ) == -1
  641. ) {
  642. return true;
  643. } else {
  644. return false;
  645. }
  646. } else {
  647. return false;
  648. }
  649. },
  650. isWrong(item, index) {
  651. if (this.questionList[index].ques) {
  652. //单选
  653. if (item.type == 1) {
  654. return this.questionList[index].ques != this.questionList[index].ans;
  655. //多选
  656. } else if (item.type == 2) {
  657. //每一项都相等
  658. return this.questionList[index].ans.some((item, i) => {
  659. return item != this.questionList[index].ques[i];
  660. });
  661. //判断
  662. } else if (item.type == 3) {
  663. return this.questionList[index].ques != this.questionList[index].ans;
  664. } else {
  665. return false;
  666. }
  667. } else {
  668. return false;
  669. }
  670. },
  671. tabSelect(index, bankindex) {
  672. this.$set(this.questionList[bankindex], "current", index);
  673. },
  674. },
  675. };
  676. </script>
  677. <style lang="scss" scoped>
  678. .questionBank {
  679. width: 100%;
  680. height: 100vh;
  681. display: flex;
  682. flex-direction: column;
  683. }
  684. .swiper {
  685. width: 100%;
  686. flex: 1;
  687. }
  688. .lisSty {
  689. margin-bottom: 16rpx;
  690. display: flex;
  691. align-items: center;
  692. .flex_auto {
  693. flex: 1;
  694. }
  695. }
  696. .activeTI {
  697. vertical-align: middle;
  698. display: inline-block;
  699. border: 1rpx solid #eee;
  700. border-radius: 50rpx;
  701. height: 48rpx;
  702. line-height: 46rpx;
  703. text-align: center;
  704. width: 48rpx;
  705. margin-right: 15rpx;
  706. color: #666;
  707. font-size: 30rpx;
  708. &.right {
  709. color: #fff;
  710. background: #36c75a;
  711. }
  712. &.wrong {
  713. color: #fff;
  714. background: #ff3b30;
  715. }
  716. &.checked {
  717. color: #fff;
  718. background: #007aff;
  719. }
  720. }
  721. .submit_checkbox {
  722. position: fixed;
  723. left: 0;
  724. right: 0;
  725. bottom: 120rpx;
  726. margin: 20rpx auto;
  727. width: 526rpx;
  728. height: 80rpx;
  729. background: rgba(0, 122, 255, 1);
  730. color: #fff;
  731. text-align: center;
  732. line-height: 80rpx;
  733. font-size: 30rpx;
  734. border-radius: 40rpx;
  735. }
  736. .titles {
  737. overflow: hidden;
  738. margin-bottom: 24rpx;
  739. }
  740. .titBox {
  741. padding: 41rpx 25rpx 24rpx 25rpx;
  742. }
  743. .titBox_title {
  744. padding: 21rpx;
  745. }
  746. .tabs {
  747. margin: 10rpx;
  748. display: flex;
  749. .tab {
  750. margin: 0 4rpx;
  751. padding: 10rpx 13rpx;
  752. text-align: center;
  753. color: #007aff;
  754. font-size: 28rpx;
  755. border-radius: 16rpx;
  756. background: #fff;
  757. &.current {
  758. color: #fff;
  759. background: #007aff;
  760. }
  761. }
  762. }
  763. .ans {
  764. margin: 8rpx 8rpx 8rpx;
  765. .ans_input {
  766. border-radius: 16rpx;
  767. background: #fff;
  768. .top {
  769. border-bottom: 1rpx solid #eeeeee;
  770. padding: 16rpx;
  771. display: flex;
  772. align-items: center;
  773. .icon {
  774. margin-right: 20rpx;
  775. width: 40rpx;
  776. height: 38rpx;
  777. }
  778. .progress {
  779. flex: 1;
  780. }
  781. .submit {
  782. width: 168rpx;
  783. height: 48rpx;
  784. line-height: 48rpx;
  785. text-align: center;
  786. color: #fff;
  787. font-size: 30rpx;
  788. background: #007aff;
  789. border-radius: 24rpx;
  790. &.disabled {
  791. opacity: 0.6;
  792. }
  793. }
  794. }
  795. .textarea {
  796. textarea {
  797. width: 100%;
  798. height: 287rpx;
  799. padding: 10rpx;
  800. }
  801. }
  802. .imgs {
  803. overflow: hidden;
  804. display: flex;
  805. width: 100%;
  806. .img {
  807. width: 104rpx;
  808. height: 104rpx;
  809. border-radius: 8rpx;
  810. position: relative;
  811. margin: 20rpx;
  812. text {
  813. position: absolute;
  814. right: -15rpx;
  815. top: -15rpx;
  816. width: 30rpx;
  817. height: 30rpx;
  818. text-align: center;
  819. line-height: 30rpx;
  820. color: #fff;
  821. background: #ff3b30;
  822. border-radius: 50%;
  823. }
  824. image {
  825. width: 100%;
  826. height: 100%;
  827. }
  828. }
  829. }
  830. }
  831. .ans_submit {
  832. padding: 16rpx;
  833. border-radius: 16rpx;
  834. background: #fff;
  835. .imgs {
  836. overflow: hidden;
  837. display: flex;
  838. width: 100%;
  839. .img {
  840. width: 104rpx;
  841. height: 104rpx;
  842. border-radius: 8rpx;
  843. position: relative;
  844. margin: 20rpx;
  845. image {
  846. width: 100%;
  847. height: 100%;
  848. }
  849. }
  850. }
  851. }
  852. }
  853. .leftLetters {
  854. display: flex;
  855. align-items: center;
  856. width: 220rpx;
  857. .btnType {
  858. padding: 5rpx 10rpx;
  859. border: 1rpx solid #007aff;
  860. border-radius: 10rpx;
  861. background-color: rgba(0, 122, 255, 0.1);
  862. font-size: 28rpx;
  863. color: #007aff;
  864. margin-right: 15rpx;
  865. }
  866. }
  867. .firstLetter {
  868. display: flex;
  869. justify-content: space-between;
  870. align-items: center;
  871. margin-bottom: 30rpx;
  872. }
  873. .popupView {
  874. height: 100%;
  875. padding-bottom: 100rpx;
  876. .popupTops {
  877. height: 77rpx;
  878. border-bottom: 1rpx solid #eee;
  879. text-align: center;
  880. line-height: 77rpx;
  881. font-size: 24rpx;
  882. color: #999;
  883. position: relative;
  884. .topIcon {
  885. position: absolute;
  886. top: 10rpx;
  887. left: 50%;
  888. transform: translateX(-50%);
  889. width: 80rpx;
  890. height: 8rpx;
  891. background-color: #999;
  892. border-radius: 4rpx;
  893. }
  894. }
  895. .popupContent {
  896. }
  897. }
  898. .pageContent {
  899. position: relative;
  900. background-color: #eaeef1;
  901. height: 100%;
  902. overflow-y: scroll;
  903. padding-top: 8rpx;
  904. padding-bottom: 100rpx;
  905. }
  906. .pad_8 {
  907. background-color: #fff;
  908. margin: 0rpx 8rpx 8rpx;
  909. border-radius: 16rpx;
  910. &.no-margin {
  911. margin-top: -16rpx;
  912. border-radius: 0 0 16rpx 16rpx;
  913. }
  914. }
  915. .answer {
  916. height: 80rpx;
  917. line-height: 80rpx;
  918. padding: 0rpx 24rpx;
  919. display: flex;
  920. align-items: center;
  921. justify-content: space-between;
  922. color: #666;
  923. font-size: 30rpx;
  924. }
  925. .footer_btn {
  926. background-color: #fff;
  927. z-index: 10078;
  928. position: fixed;
  929. bottom: 0rpx;
  930. display: flex;
  931. align-items: center;
  932. justify-content: space-between;
  933. width: 100%;
  934. height: 98rpx;
  935. padding: 0rpx 38rpx;
  936. border-top: 1rpx solid #eee;
  937. .flex_center {
  938. flex: 1;
  939. display: flex;
  940. justify-content: center;
  941. align-items: center;
  942. flex-direction: column;
  943. margin: 0 200rpx;
  944. font-size: 24rpx;
  945. color: #999999;
  946. .up-icon {
  947. margin-bottom: 18rpx;
  948. width: 100%;
  949. display: flex;
  950. justify-content: center;
  951. image {
  952. width: 58rpx;
  953. height: 21rpx;
  954. }
  955. }
  956. }
  957. .collect {
  958. visibility: hidden;
  959. width: 100rpx;
  960. &.show {
  961. visibility: visible;
  962. }
  963. > view {
  964. display: flex;
  965. flex-direction: column;
  966. align-items: center;
  967. justify-content: center;
  968. image {
  969. width: 32rpx;
  970. height: 32rpx;
  971. margin-bottom: 6rpx;
  972. }
  973. view {
  974. font-size: 24rpx;
  975. color: #999999;
  976. }
  977. }
  978. }
  979. }
  980. .boxSty {
  981. padding: 44rpx 41rpx 0rpx;
  982. }
  983. .liListSty {
  984. border: 1rpx solid #eeeeee;
  985. width: 88rpx;
  986. height: 88rpx;
  987. border-radius: 32rpx;
  988. text-align: center;
  989. line-height: 88rpx;
  990. color: #333;
  991. font-size: 32rpx;
  992. float: left;
  993. margin: 20rpx 23rpx;
  994. &.isRight {
  995. border: 1rpx solid #eeeeee;
  996. color: #fff;
  997. background: #36c75a;
  998. }
  999. &.isWrong {
  1000. border: 1rpx solid #eeeeee;
  1001. color: #fff;
  1002. background: #ff3b30;
  1003. }
  1004. }
  1005. .answerInfos {
  1006. padding: 25rpx 25rpx 25rpx 23rpx;
  1007. }
  1008. .answerTitle {
  1009. margin-bottom: 28rpx;
  1010. color: #666;
  1011. font-size: 30rpx;
  1012. }
  1013. .answerContent {
  1014. font-size: 30rpx;
  1015. color: #666;
  1016. }
  1017. .textChild {
  1018. display: inline-block;
  1019. vertical-align: middle;
  1020. }
  1021. .dialog {
  1022. position: fixed;
  1023. left: 0;
  1024. top: 0;
  1025. width: 100%;
  1026. height: 100%;
  1027. background-color: rgba(0, 0, 0, 0.8);
  1028. display: flex;
  1029. flex-direction: column;
  1030. align-items: center;
  1031. justify-content: center;
  1032. z-index: 20000;
  1033. .pointer {
  1034. width: 338rpx;
  1035. height: 240rpx;
  1036. }
  1037. .text {
  1038. font-size: 32rpx;
  1039. color: #ffffff;
  1040. text-align: center;
  1041. }
  1042. .btn {
  1043. width: 242rpx;
  1044. height: 82rpx;
  1045. border: 2rpx solid #ffffff;
  1046. border-radius: 16rpx;
  1047. text-align: center;
  1048. line-height: 82rpx;
  1049. margin: 41rpx auto;
  1050. color: #fff;
  1051. font-size: 32rpx;
  1052. }
  1053. }
  1054. .popboxs {
  1055. width: 100%;
  1056. height: 100%;
  1057. display: flex;
  1058. flex-direction: column;
  1059. align-items: center;
  1060. }
  1061. .classTops {
  1062. flex-shrink: 0;
  1063. padding: 39rpx 0rpx 4rpx;
  1064. font-weight: bold;
  1065. color: #333;
  1066. font-size: 30rpx;
  1067. }
  1068. .textStys {
  1069. width: 100%;
  1070. flex: 1;
  1071. padding: 36rpx;
  1072. }
  1073. .classFootsty {
  1074. flex-shrink: 0;
  1075. display: flex;
  1076. align-items: center;
  1077. justify-content: center;
  1078. padding: 10rpx 0rpx 40rpx;
  1079. .btnsty {
  1080. width: 200rpx;
  1081. height: 80rpx;
  1082. border-radius: 40rpx;
  1083. font-weight: bold;
  1084. font-size: 30rpx;
  1085. text-align: center;
  1086. line-height: 80rpx;
  1087. }
  1088. .btns1 {
  1089. background-color: #f5f5f5;
  1090. color: #007aff;
  1091. }
  1092. .btns2 {
  1093. margin-left: 40rpx;
  1094. background-color: #007aff;
  1095. color: #ffffff;
  1096. }
  1097. }
  1098. </style>