choose-tone-question.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745
  1. <template>
  2. <!-- 选择声调题 -->
  3. <view class="choosetone-area" v-model="questionData">
  4. <view class="question_title">
  5. <text class="question_number">
  6. {{ questionNumberEndIsBracket(questionData.property.question_number) }}
  7. </text>
  8. <text class="question_stem" v-html="sanitizeHTML(questionData.stem)"
  9. :ref="'richText-1-1'+questionData.question_id"
  10. @longpress="previewByRichTextImg(-1,-1,questionData.question_id)"></text>
  11. </view>
  12. <view class="description"
  13. v-if="isEnable(questionData.property.is_enable_description)&&questionData.description.length > 0"
  14. v-html="sanitizeHTML(questionData.description)" :ref="'richText-2-2'+questionData.question_id"
  15. @longpress="previewByRichTextImg(-2,-2,questionData.question_id)">
  16. </view>
  17. <view class="option-area">
  18. <view class="option-box" v-for="(item,i) in questionData.option_list" :key="i">
  19. <view class="option-serial">
  20. <text class="serial-number" :style="{'font-size':questionData.property.option_question_number_font_size}">
  21. {{ computedQuestionNumber(i,questionData.option_number_show_mode) }}</text>
  22. </view>
  23. <view class="option-content-area">
  24. <AudioPlay v-if="item.audio_file_id" :file-id="item.audio_file_id" :showProgress="true" :showSlider="true"
  25. :isPlaying="item.isPlaying" :questionId="questionData.question_id" />
  26. <view :class="['option-content', computedIsJudgeRight(item.mark)]">
  27. <span class="items-hz" v-if="item.content_hz">{{ item.content_hz }}</span>
  28. <template v-if="questionData.property.answer_mode === 'select'">
  29. <text v-for="(itemc, indexc) in con_preview[i].item_con" :key="indexc" :class="['item-con', active_index_str === i + '-' + indexc ? 'active' : '',
  30. computedIsJudgeRight(item.mark,indexc)]" @click="handleSelectItemTone('select',item.mark,i,indexc)">
  31. {{itemc}}
  32. <!-- con_preview[i].item_active_index = indexc;
  33. active_index_str = i + '-' + indexc; -->
  34. </text>
  35. </template>
  36. <template v-else>
  37. <text class="item-con" v-for="(itemc, indexc) in con_preview[i].item_con" :key="indexc">
  38. <text v-for="(itemi, indexi) in itemc" :key="indexi"
  39. :class="['items-con', active_index_str === i + '-' + indexc + '-' + indexi ? 'active' : '',computedIsJudgeRight(item.mark,indexc,indexi)]"
  40. @click="handleSelectItemTone('label',item.mark,i, indexc, indexi, con_preview[i].item_con_yuan[indexc][indexi])">
  41. {{itemi}}
  42. </text>
  43. </text>
  44. </template>
  45. </view>
  46. <view class="option-tone">
  47. <view ref="toneView" v-for="({ img, value }, j) in toneList" :key="j"
  48. @click="choosetone( con_preview[i] , value , i )"
  49. :class="['tone',isViewActive(con_preview[i] , value , i),isRightAnswer(item.mark,j,active_index_str)]">
  50. <SvgIcon :icon-class="img" />
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="answer-tips-box">
  57. <template v-if="show_tips&&questionData.property.answer_mode === 'label'">
  58. <img v-if="show_tips" class="answer-tips" src="static/select_tone_tips.png" />
  59. </template>
  60. <template v-if="show_tips&&questionData.property.answer_mode === 'select'">
  61. <img v-if="show_tips" class="answer-tips" src="static/select_tone_tips2.png" />
  62. </template>
  63. <text :class="['tips-btn', show_tips ? 'tips-btn-active' : '']" @click="show_tips = !show_tips">
  64. <img src="static/tips_icon.png" />
  65. </text>
  66. </view>
  67. <view class="reference" v-if="isViewAnalysis&&answer_control[questionData.question_id].isViewRightAnswer">
  68. <text class="reference-title">解析</text>
  69. <text class="reference-answer" v-html="sanitizeHTML(questionData.analysis)"
  70. :ref="'richText-3-3'+questionData.question_id"
  71. @longpress="previewByRichTextImg(-3,-3,questionData.question_id)">
  72. </text>
  73. </view>
  74. </view>
  75. </template>
  76. <script>
  77. import {
  78. questionData,
  79. sanitizeHTML,
  80. isEnable,
  81. computedQuestionNumber,
  82. answer_control,
  83. } from '@/pages/answer_question/common/data/common.js';
  84. import {
  85. GetFileStoreInfo
  86. } from '@/api/api.js';
  87. import AnswerControlMixin from '@/pages/answer_question/common/data/AnswerControlMixin.js';
  88. export default {
  89. name: "choose-tone-question",
  90. mixins: [AnswerControlMixin],
  91. props: {
  92. questionData: questionData
  93. },
  94. data() {
  95. return {
  96. computedQuestionNumber,
  97. isEnable,
  98. sanitizeHTML,
  99. answer_control,
  100. curMark: '',
  101. toneList: [{
  102. value: '1',
  103. label: '一声',
  104. img: 'first-tone'
  105. },
  106. {
  107. value: '2',
  108. label: '二声',
  109. img: 'second-tone'
  110. },
  111. {
  112. value: '3',
  113. label: '三声',
  114. img: 'third-tone'
  115. },
  116. {
  117. value: '4',
  118. label: '四声',
  119. img: 'fourth-tone'
  120. }
  121. ],
  122. con_preview: [],
  123. tone_data: [
  124. ['ā', 'á', 'ǎ', 'à'],
  125. ['ō', 'ó', 'ǒ', 'ò'],
  126. ['ē', 'é', 'ě', 'è'],
  127. ['ī', 'í', 'ǐ', 'ì'],
  128. ['ū', 'ú', 'ǔ', 'ù'],
  129. ['ǖ', 'ǘ', 'ǚ', 'ǜ'],
  130. ['ǖ', 'ǘ', 'ǚ', 'ǜ'],
  131. ['Ā', 'Á', 'Â', 'À'],
  132. ['Ō', 'Ó', 'Ô', 'Ò'],
  133. ['Ē', 'É', 'Ê', 'È'],
  134. ['Ī', 'Í', 'Î', 'Ì'],
  135. ['Ū', 'Ú', 'Û', 'Ù'],
  136. ],
  137. final_con: '',
  138. active_index_str: '', // 高亮索引的字符串
  139. active_letter: '', // 选中字母的值
  140. active_letter_index: 0, // 选择字母索引
  141. select_item_index: 0, // 小题索引
  142. show_tips: false, // 是否显示答题提示
  143. answer_list: [], // 初始化用户答案,未答题也回传相应标记
  144. };
  145. },
  146. watch: {
  147. 'questionData.question_id': {
  148. handler(val) {
  149. this.commonComputedAnswerControl(val);
  150. this.isAnswerReady = true;
  151. this.show_tips = false;
  152. this.active_index_str = '';
  153. this.handleData();
  154. this.setUserAnswer();
  155. },
  156. immediate: true,
  157. deep: true
  158. }
  159. },
  160. mounted() {
  161. uni.$on('setOtherAudioPlaying', this.otherAudioPlaying);
  162. },
  163. onUnload() {
  164. uni.$off('setOtherAudioPlaying', this.otherAudioPlaying);
  165. },
  166. computed: {
  167. isViewAnalysis: function() {
  168. return isEnable(this.questionData.property.is_enable_analysis);
  169. }
  170. },
  171. methods: {
  172. // 处理选项列表数据
  173. handleData() {
  174. this.con_preview = [];
  175. this.answer_list = []; //初始化答案
  176. this.questionData.option_list.forEach((item) => {
  177. item.isPlaying = false;
  178. let con_arr = JSON.parse(JSON.stringify(item.content_view));
  179. let user_answer = [];
  180. let value = [];
  181. con_arr.forEach((con) => {
  182. user_answer.push({
  183. select_tone: null,
  184. select_letter: '',
  185. select_index: '',
  186. });
  187. if (this.questionData.property.answer_mode === 'label') {
  188. value.push(con + '');
  189. } else {
  190. value.push('');
  191. }
  192. });
  193. let obj = {
  194. item_con: con_arr,
  195. item_con_yuan: JSON.parse(JSON.stringify(con_arr)),
  196. mark: item.mark,
  197. user_answer,
  198. item_active_index: 0,
  199. active_letter: '',
  200. };
  201. this.con_preview.push(obj);
  202. this.answer_list.push({
  203. mark: item.mark,
  204. value: value
  205. });
  206. if (!item.audio_file_id) return false;
  207. GetFileStoreInfo({
  208. file_id: item.audio_file_id
  209. }).then((res) => {
  210. item.audio_file_url = res.file_url; //题目音频
  211. });
  212. });
  213. },
  214. //播放当前音频的时候暂停其他音频
  215. otherAudioPlaying(audio_file_id, playing) {
  216. this.questionData.option_list.forEach(p => {
  217. p.isPlaying = false;
  218. if (p.audio_file_id == audio_file_id) {
  219. p.isPlaying = true;
  220. }
  221. });
  222. this.$forceUpdate();
  223. },
  224. //选择字母
  225. handleSelectItemTone(mode, mark, i, indexc, indexi, itemi) {
  226. if (mode == 'select') {
  227. this.con_preview[i].item_active_index = indexc;
  228. this.active_index_str = `${i}-${indexc}`;
  229. } else {
  230. this.con_preview[i].item_active_index = indexc;
  231. this.con_preview[i].user_answer[indexc].select_index = indexi;
  232. this.active_index_str = `${i}-${indexc}-${indexi}`;
  233. this.active_letter = itemi; //选中的字母
  234. this.active_letter_index = indexi;
  235. this.select_item_index = i;
  236. }
  237. },
  238. isViewActive(item, value, i) {
  239. const activeAnswer = item.user_answer[item.item_active_index];
  240. if (!activeAnswer) {
  241. return '';
  242. }
  243. const isSelectMode = this.questionData.property.answer_mode === 'select' && activeAnswer.select_tone === value;
  244. const isLabelMode = this.questionData.property.answer_mode === 'label' &&
  245. activeAnswer.select_tone === value &&
  246. activeAnswer.select_letter === this.active_letter &&
  247. this.select_item_index === i;
  248. let className = isSelectMode || isLabelMode ? 'active' : '';
  249. return className;
  250. },
  251. //选择声调
  252. choosetone(item, value, i) {
  253. if (this.answer_control[this.questionData.question_id].isReadOnly) return;
  254. const activeClass = this.isViewActive(item, value, i);
  255. if ((!this.active_letter || this.select_item_index !== i) &&
  256. this.questionData.property.answer_mode === 'label') return;
  257. item.user_answer[item.item_active_index].select_tone = value;
  258. //标注声调
  259. if (this.questionData.property.answer_mode === 'label') {
  260. item.user_answer[item.item_active_index].select_letter = this.active_letter;
  261. this.active_index_str = `${i}-${item.item_active_index}-${this.active_letter_index}`;
  262. if (activeClass === 'active') {
  263. this.handleReplaceTone(this.active_letter + '');
  264. } else {
  265. this.handleReplaceTone(this.active_letter + value);
  266. }
  267. setTimeout(() => {
  268. let new_con = item.item_con_yuan[item.item_active_index].split(this.active_letter);
  269. item.item_con[item.item_active_index] = new_con[0] + this.final_con + new_con[1];
  270. this.$forceUpdate();
  271. }, 100);
  272. } else {
  273. this.active_index_str = `${i}-${item.item_active_index}`;
  274. if (activeClass === 'active') {
  275. this.handleReplaceTone(item.item_con_yuan[item.item_active_index] + '');
  276. } else {
  277. this.handleReplaceTone(item.item_con_yuan[item.item_active_index] + value);
  278. }
  279. setTimeout(() => {
  280. item.item_con[item.item_active_index] = this.final_con;
  281. this.$forceUpdate();
  282. }, 100);
  283. }
  284. if (activeClass === 'active') {
  285. item.user_answer[item.item_active_index].select_tone = '';
  286. }
  287. this.saveUserAnswer(item, this.questionData.property.answer_mode);
  288. },
  289. handleReplaceTone(e) {
  290. var that = this;
  291. this.$nextTick(() => {
  292. that.replaceTone(e);
  293. })
  294. },
  295. replaceTone(value) {
  296. this.resArr = [];
  297. if (value) {
  298. let reg = /\s+/g;
  299. let valueArr = value.split(reg);
  300. valueArr.forEach((item) => {
  301. this.handleValue(item);
  302. });
  303. let str = '';
  304. this.resArr.forEach((item) => {
  305. str += ' ';
  306. item.forEach((sItem) => {
  307. if (sItem.number && sItem.con) {
  308. let number = Number(sItem.number);
  309. let con = sItem.con;
  310. let word = this.addTone(number, con);
  311. str += word;
  312. } else if (sItem.number) {
  313. str += sItem.number;
  314. } else if (sItem.con) {
  315. str += ` ${sItem.con} `;
  316. }
  317. });
  318. });
  319. this.final_con = str.trim();
  320. }
  321. },
  322. handleValue(valItem) {
  323. let reg = /\d/;
  324. // let reg2 = /[A-Za-z]+\d/g;
  325. let reg2 = /[A-Za-zü]+\d/g;
  326. let numList = [];
  327. let valArr = valItem.split('');
  328. if (reg2.test(valItem)) {
  329. for (let i = 0; i < valArr.length; i++) {
  330. let item = valItem[i];
  331. if (reg.test(item)) {
  332. let numIndex = numList.length === 0 ? 0 : numList[numList.length - 1].index;
  333. let con = valItem.substring(numIndex, i);
  334. con = con.replace(/\d/g, '');
  335. let obj = {
  336. index: i,
  337. number: item,
  338. con,
  339. isTran: true,
  340. };
  341. numList.push(obj);
  342. }
  343. }
  344. } else {
  345. numList = [];
  346. }
  347. if (numList.length === 0) {
  348. this.resArr.push([{
  349. con: valItem
  350. }]);
  351. } else {
  352. this.resArr.push(numList);
  353. }
  354. },
  355. addTone(number, con) {
  356. let zmList = ['a', 'o', 'e', 'i', 'u', 'v', 'ü', 'A', 'O', 'E', 'I', 'U'];
  357. let cons = con;
  358. if (number) {
  359. for (let i = 0; i < zmList.length; i++) {
  360. let zm = zmList[i];
  361. if (con.indexOf(zm) > -1) {
  362. let zm2 = this.tone_data[i][number - 1];
  363. if (con.indexOf('iu') > -1) {
  364. zm2 = this.tone_data[4][number - 1];
  365. cons = con.replace('u', zm2);
  366. } else if (con.indexOf('ui') > -1) {
  367. zm2 = this.tone_data[3][number - 1];
  368. cons = con.replace('i', zm2);
  369. } else if (/yv|jv|qv|xv/.test(con)) {
  370. zm2 = tone_data[4][number - 1];
  371. cons = con.replace('v', zm2);
  372. } else if (/yü|jü|qü|xü/.test(con)) {
  373. zm2 = tone_data[4][number - 1];
  374. cons = con.replace('ü', zm2);
  375. } else {
  376. cons = con.replace(zm, zm2);
  377. }
  378. break;
  379. }
  380. }
  381. }
  382. return cons;
  383. },
  384. //切换选项保存答案
  385. saveUserAnswer: function(item, answer_mode) {
  386. var questionId = this.questionData.question_id;
  387. var _userAnswer = this.questionData.user_answer[questionId];
  388. var _index = _userAnswer.answer_list.findIndex(p => p.mark == item.mark);
  389. if (_index > -1) {
  390. _userAnswer.answer_list.splice(_index, 1);
  391. }
  392. var value = [];
  393. var is_fill_answer = false;
  394. item.item_con_yuan.forEach((p, i) => {
  395. var letArr = p.split('');
  396. var _user_answer = item.user_answer[i];
  397. if (answer_mode === 'label') {
  398. if (_user_answer.select_tone) {
  399. let {
  400. select_index,
  401. select_letter,
  402. select_tone
  403. } = item.user_answer[i];
  404. letArr.splice(select_index, 1, select_letter + select_tone);
  405. }
  406. value.push(letArr.join(''));
  407. } else {
  408. value.push(null === _user_answer.select_tone ? '' : _user_answer.select_tone);
  409. }
  410. is_fill_answer = true;
  411. })
  412. _userAnswer.answer_list.push({
  413. mark: item.mark,
  414. value: value
  415. })
  416. if (answer_mode === 'label') {
  417. this.questionData.option_list.forEach(p => {
  418. if (_userAnswer.answer_list.findIndex(x => x.mark == p.mark) == -1)
  419. _userAnswer.answer_list.push({
  420. mark: p.mark,
  421. value: p.content_view
  422. })
  423. })
  424. }
  425. this.questionData.user_answer[questionId].isEdit = true;
  426. this.questionData.user_answer[questionId].is_fill_answer =
  427. this.questionData.user_answer[questionId].is_fill_answer || is_fill_answer;
  428. this.questionData.user_answer[questionId].content = JSON.stringify(_userAnswer.answer_list);
  429. },
  430. //回显
  431. setUserAnswer: function() {
  432. var that = this;
  433. var callback = function() {
  434. var userAnswer = [];
  435. var questionId = that.questionData.question_id;
  436. var _ua = that.questionData.user_answer[questionId];
  437. if (_ua && _ua.answer_list && _ua.answer_list.length > 0) {
  438. userAnswer = _ua.answer_list;
  439. } else {
  440. _ua.answer_list = that.answer_list;
  441. _ua.content = JSON.stringify(that.answer_list);
  442. }
  443. let _answer_mode = that.questionData.property.answer_mode;
  444. that.con_preview.forEach((item, m) => {
  445. var rowEn = userAnswer.find(x => x.mark == item.mark);
  446. if (!rowEn) return false;
  447. if (_answer_mode === 'select') {
  448. item.item_con_yuan.forEach((letter, i, arr) => {
  449. var _val = rowEn.value[i];
  450. if (!_val) return false;
  451. item.user_answer[i].select_tone = rowEn.value[i];
  452. that.replaceTone(letter + _val);
  453. item.item_con[i] = that.final_con
  454. })
  455. } else {
  456. item.item_con.forEach((letter, i, arr) => {
  457. var _val = rowEn.value[i];
  458. if (!_val) return false;
  459. // var _ze = /[a-zA-Z]\d(?!a-zA-Z)/g; //匹配字母和声调,用此替换成带声调的字母
  460. var _ze = /[a-zA-Zü]\d(?!a-zA-Zü)/g;
  461. var lettertoneArr = _val.match(_ze) || [];
  462. lettertoneArr.forEach(p => {
  463. var _e = p.split('');
  464. let word = that.addTone(Number(_e[1]), _e[0]);
  465. _val = _val.replace(_ze, word);
  466. item.user_answer[i].select_tone = _e[1];
  467. item.user_answer[i].select_letter = _e[0];
  468. })
  469. item.item_con[i] = _val;
  470. })
  471. }
  472. setTimeout(function() {
  473. that.$forceUpdate();
  474. }, 200)
  475. })
  476. };
  477. this.$emit("getUserAnswer", this.questionData.question_id, callback);
  478. },
  479. /**
  480. * @param {标识} mark
  481. * @param {拼音的索引} indexc
  482. * @param {字母的索引} indexi
  483. * 判断小题题干及拼音或字母样式
  484. */
  485. computedIsJudgeRight(mark, indexc, indexi) {
  486. var cur = this.commonComputedAnswerControl(this.questionData.question_id);
  487. var answer_mode = this.questionData.property.answer_mode; //select【选择音调】,label【标注音调】
  488. if (!cur.isJudgeAnswer && !cur.isViewRightAnswer) {
  489. return '';
  490. }
  491. var rightAnswer = this.questionData.answer.answer_list;
  492. var cur_answer = rightAnswer.find(p => p.mark == mark);
  493. if (!cur_answer) return '';
  494. // cur.value
  495. var user_answer_list = this.questionData.user_answer[this.questionData.question_id].answer_list;
  496. var user = user_answer_list.find(p => p.mark == mark);
  497. if (!user || !user.value || user.value.length <= 0) return 'wrong';
  498. var isRight = true;
  499. if (cur_answer.value.length !== user.value.length) return 'wrong';
  500. cur_answer.value.forEach((m, i) => {
  501. if (indexc !== undefined) {
  502. if (m !== user.value[i] && i == indexc) {
  503. isRight = false;
  504. return false;
  505. }
  506. } else {
  507. if (m !== user.value[i]) {
  508. isRight = false;
  509. return false;
  510. }
  511. }
  512. });
  513. return isRight ? 'right' : 'wrong';
  514. },
  515. /**
  516. * @param {String} 标识
  517. * @param {Number} 声调索引
  518. * @param {String} 选择的拼音或者字母的索引
  519. * 判断标准答案显示样式
  520. */
  521. isRightAnswer(mark, j, active_index_str) {
  522. if (!active_index_str) return;
  523. var cur = this.commonComputedAnswerControl(this.questionData.question_id);
  524. if (!cur.isJudgeAnswer && !cur.isViewRightAnswer) {
  525. return '';
  526. }
  527. var indexArr = active_index_str.split('-');
  528. var rowIndex = indexArr[0];
  529. var pinyin_index = indexArr[1];
  530. var letter_index = -1;
  531. if (indexArr.length == 3) {
  532. letter_index = indexArr[2];
  533. }
  534. var rightAnswer = this.questionData.answer.answer_list;
  535. if (rightAnswer.findIndex(p => p.mark == mark) != rowIndex) return;
  536. var cur_answer = rightAnswer.find(p => p.mark == mark);
  537. if (!cur_answer) return '';
  538. var curPinYinTone = cur_answer.value[pinyin_index];
  539. if (this.questionData.property.answer_mode == 'label') {
  540. var tone = rightAnswer[rowIndex].value[pinyin_index].substr(Number(letter_index) + 1, 1);
  541. if (tone) {
  542. curPinYinTone = tone;
  543. }
  544. }
  545. return j + 1 == curPinYinTone ? 'answer-right' : '';
  546. },
  547. }
  548. }
  549. </script>
  550. <style lang="scss" scoped>
  551. .choosetone-area {
  552. .question_title {
  553. display: flex;
  554. flex-direction: row;
  555. margin-top: 70rpx;
  556. margin-bottom: 32rpx;
  557. .question_number,
  558. .question_stem {
  559. color: #34343A;
  560. }
  561. .question_number {
  562. margin-right: 10rpx;
  563. }
  564. }
  565. .description {
  566. padding: 24rpx 48rpx;
  567. border-radius: 40rpx;
  568. background-color: $uni-bg-color-grey;
  569. margin-top: 32rpx;
  570. font-size: $font-size-serial;
  571. }
  572. .option-area {
  573. display: flex;
  574. flex-direction: column;
  575. margin-top: 32rpx;
  576. row-gap: 32rpx;
  577. .option-box {
  578. display: flex;
  579. align-items: flex-start;
  580. justify-content: left;
  581. column-gap: 16rpx;
  582. .option-serial {
  583. width: 36rpx;
  584. margin-top: 16rpx;
  585. }
  586. .option-content-area {
  587. width: 100%;
  588. display: flex;
  589. flex-direction: column;
  590. row-gap: 16rpx;
  591. .option-content {
  592. background-color: $uni-bg-color-grey;
  593. border-radius: 40rpx;
  594. display: flex;
  595. align-items: center;
  596. justify-content: left;
  597. column-gap: 20rpx;
  598. padding: 16rpx 32rpx;
  599. &.right {
  600. background-color: $right-bc-color;
  601. }
  602. &.wrong {
  603. border: 1px solid $error-color;
  604. }
  605. &.active {
  606. color: #2f6fec;
  607. }
  608. .items-hz {
  609. margin-right: 8rpx;
  610. font-size: 32rpx;
  611. font-weight: 500;
  612. line-height: 48rpx;
  613. color: #000000;
  614. }
  615. .item-con,
  616. .items-con {
  617. font-family: 'League';
  618. color: #000000;
  619. &.wrong {
  620. color: $error-color;
  621. }
  622. &.active {
  623. color: #2f6fec;
  624. }
  625. }
  626. .items-con {
  627. margin-right: 6rpx;
  628. }
  629. }
  630. .option-tone {
  631. display: flex;
  632. justify-content: left;
  633. column-gap: 8rpx;
  634. .tone {
  635. width: 64rpx;
  636. height: 64rpx;
  637. border-radius: 32rpx;
  638. display: flex;
  639. justify-content: center;
  640. align-items: center;
  641. color: #9f9f9f;
  642. &.answer-right {
  643. color: $right-color !important;
  644. background-color: $right-bc-color !important;
  645. }
  646. &.active {
  647. background-color: #DFE9FD;
  648. color: #2f6fec;
  649. }
  650. }
  651. }
  652. }
  653. }
  654. }
  655. .answer-tips-box {
  656. position: absolute;
  657. top: 126rpx;
  658. right: 50rpx;
  659. display: flex;
  660. .answer-tips {
  661. width: 307px;
  662. margin-top: 32px;
  663. }
  664. .tips-btn {
  665. width: 68rpx;
  666. height: 68rpx;
  667. font-size: 0;
  668. background: #fff5e3;
  669. border: 1px solid rgba(0, 0, 0, 0.1);
  670. border-radius: 8px;
  671. display: flex;
  672. justify-content: center;
  673. align-items: center;
  674. &-active {
  675. background: #e3d5b3;
  676. }
  677. img {
  678. width: 40rpx;
  679. height: 40rpx;
  680. margin-top: -4px;
  681. }
  682. }
  683. }
  684. .reference {
  685. margin: 32rpx 0;
  686. background-color: #f9f8f9;
  687. padding: 24rpx;
  688. .reference-title {
  689. display: block;
  690. line-height: 64rpx;
  691. color: #4E5969;
  692. font-size: 28rpx;
  693. }
  694. .reference-answer {
  695. color: #1D2129;
  696. line-height: 48rpx;
  697. font-size: 14pt;
  698. }
  699. }
  700. }
  701. .audio-wrapper {
  702. margin: 0;
  703. }
  704. </style>