当前位置:   article > 正文

uniapp实现微信小程序/H5答题卡_uniapp答题小程序

uniapp答题小程序

最近项目中使用到很多答题卡,实现了一个可以复用的答题卡组件。

项目使用HbuilderXuniapp,uview进行开发。

代码中有些地方判断写的没必要,懒得改了,xdm看不惯自己改吧 hhhhhhh ^_^。

HTML代码:微信小程序页面,如果要修改为H5,直接把view标签修改为div,

并把 :style="[getBackgroundColor(item)]",修改为:style="getBackgroundColor(item)"

  1. <template>
  2. <view style="background: #f9f9f9;min-height: 100%">
  3. <view v-if="!isFinal">
  4. <view class="questTypeBox">
  5. <view class="questionType">{{ questionType }}题</view>
  6. <view class="questionAmount">
  7. <view>
  8. <span style="color: #1e88e5">{{ current }}</span>
  9. |{{ list.length }}
  10. </view>
  11. </view>
  12. </view>
  13. <view class="questionBox">
  14. <template v-if="currentQuestion.isM" style="margin: 10px 0;">
  15. <view class="titleBox">
  16. <view class="titleMain"><view class="titleContent" v-html="materialList[currentQuestion.mid]"></view></view>
  17. </view>
  18. </template>
  19. <view class="titleBox">
  20. <view class="titleMain"><view class="titleContent" v-html="currentQuestion.title"></view></view>
  21. </view>
  22. <view class="answersBox">
  23. <view v-if="currentQuestion.type === 1">
  24. <u-radio-group :disabled="currentQuestion.stuAnswer == '' ? false : true" v-if="isAnswer" v-model="form.answer" placement="column" @change="handleSubmit">
  25. <u-radio :bgcolor="getBackgroundColor(item)" v-for="(item, index) in currentQuestion.formOptions || []" :key="index" :name="item.value" border>
  26. <span style="width: 100%;height: 100%;" :style="[getBackgroundColor(item)]" class="span_label" v-html="item.label"></span>
  27. </u-radio>
  28. </u-radio-group>
  29. </view>
  30. <template v-else-if="currentQuestion.type === 5">
  31. <u-radio-group :disabled="currentQuestion.stuAnswer == '' ? false : true" v-if="isAnswer" v-model="form.answer" placement="column" @change="handleSubmit">
  32. <u-radio name="1" label="正确" :bgcolor="getBackgroundColor(1)" border></u-radio>
  33. <u-radio name="0" label="错误" :bgcolor="getBackgroundColor(0)" border></u-radio>
  34. </u-radio-group>
  35. </template>
  36. <template v-else-if="currentQuestion.type === 2">
  37. <u-checkbox-group :disabled="currentQuestion.stuAnswer == '' ? false : true" v-model="form.answer" placement="column">
  38. <u-checkbox
  39. shape="circle"
  40. border
  41. v-for="(item, index) in currentQuestion.formOptions || []"
  42. :key="index"
  43. :name="item.value"
  44. :label="item.label"
  45. ></u-checkbox>
  46. </u-checkbox-group>
  47. <u-button style="width: 100%;height: 40px;font-size: 14px;font-weight: 500" round size="medium" type="primary" @click="handleSubmit">提交答案</u-button>
  48. </template>
  49. <template v-else-if="currentQuestion.type === 3">
  50. <u--textarea :disabled="currentQuestion.stuAnswer == '' ? false : true" v-if="isAnswer" v-model="form.answer" :rows="3" placeholder="请输入内容" />
  51. <u-button
  52. style="width: 100%;height: 40px;font-size: 14px;font-weight: 500;margin-top: 10px;margin-bottom: 50px;"
  53. round
  54. size="medium"
  55. type="primary"
  56. @click="handleSubmit"
  57. >
  58. 提交答案
  59. </u-button>
  60. </template>
  61. <template v-else-if="currentQuestion.type === 6">
  62. <u--textarea :disabled="currentQuestion.stuAnswer == '' ? false : true" v-if="isAnswer" v-model="form.answer" :rows="3" placeholder="请输入内容" />
  63. <u-button
  64. style="width: 100%;height: 40px;font-size: 14px;font-weight: 500;margin-top: 10px;margin-bottom: 50px;"
  65. round
  66. size="medium"
  67. type="primary"
  68. @click="handleSubmit"
  69. >
  70. 提交答案
  71. </u-button>
  72. </template>
  73. <template v-if="currentQuestion.type === 4">
  74. <u-radio-group :disabled="currentQuestion.stuAnswer == '' ? false : true" v-if="isAnswer" v-model="form.answer" placement="column" @change="handleSubmit">
  75. <u-radio name="1" label="正确" :style="[getBackgroundColor(1)]" border></u-radio>
  76. <u-radio name="0" label="错误" :style="[getBackgroundColor(0)]" border></u-radio>
  77. </u-radio-group>
  78. </template>
  79. <!-- 按钮区域 -->
  80. </view>
  81. </view>
  82. <view class="answerBox" v-if="tip">
  83. <view style="display: flex;flex: 1;" v-if="currentQuestion.type !== 3 && currentQuestion.type !== 6">
  84. <view class="answerIcon" v-if="currentQuestion.type === 1 || currentQuestion.type === 2">
  85. <img :src="statusIcon" style="position: absolute;left: 0;top: 0;height:20px" />
  86. </view>
  87. <view class="answerBoxAnswers">
  88. <view class="resultCompareText" v-if="currentQuestion.type === 1 || currentQuestion.type === 2">{{ resultText }}</view>
  89. <view style="display: flex;flex: 1">
  90. <view class="answerBoxAnswersList">
  91. <view class="answers">正确答案</view>
  92. <view class="answers">
  93. {{
  94. outputList(currentQuestion.rightAnswer) == 1
  95. ? '正确'
  96. : outputList(currentQuestion.rightAnswer) == 0
  97. ? '错误'
  98. : outputList(currentQuestion.rightAnswer)
  99. }}
  100. </view>
  101. </view>
  102. <view class="answerBoxAnswersList">
  103. <view class="answers">您的答案</view>
  104. <view class="answers">
  105. {{
  106. outputList(currentQuestion.stuAnswer) == 1
  107. ? '正确'
  108. : outputList(currentQuestion.stuAnswer) == 0
  109. ? '错误'
  110. : outputList(currentQuestion.stuAnswer)
  111. }}
  112. </view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <view v-if="currentQuestion.type === 3">
  118. <view class="answerBoxAnswers">
  119. <view style="display: flex;flex: 1">
  120. <view class="answerBoxAnswersList">
  121. <view class="answers">正确答案</view>
  122. <view
  123. style="white-space: pre-wrap;"
  124. class="answers"
  125. v-for="(answer, index) in currentQuestion.rightAnswer"
  126. :key="index"
  127. v-show="answer != ''"
  128. v-html="answer"
  129. ></view>
  130. </view>
  131. </view>
  132. </view>
  133. </view>
  134. <view v-if="currentQuestion.type === 6">
  135. <view class="answerBoxAnswers">
  136. <view style="display: flex;flex: 1">
  137. <view class="answerBoxAnswersList">
  138. <view class="answers">正确答案</view>
  139. <view class="answers" v-for="(answer, index) in currentQuestion.rightAnswer" :key="index" v-show="answer != ''">{{ answer }};</view>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="questionAnalysis" v-if="tip">
  146. <view class="analysisTitle">
  147. 答案解析
  148. <view class="analysis_AI" @click="toAi">
  149. <img src="https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/icon_4a6pvlsjrq8/%E6%9C%BA%E5%99%A8%E4%BA%BA.png" alt="" />
  150. AI智能解析
  151. </view>
  152. </view>
  153. <view style="white-space: pre-wrap;" class="analysisContent" v-html="currentQuestion.analysis"></view>
  154. </view>
  155. <view style="height: 20vh;width: 100%;"></view>
  156. <view class="bottomButton">
  157. <view class="buttonGroup">
  158. <view class="lButton" @click="lookAnswerClick()">
  159. <img src="https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A32%3A34checkAnswer.svg" />
  160. <p>查看答案</p>
  161. </view>
  162. <view class="lButton" @click="addCollection">
  163. <van-icon :name="collectIds.includes(currentQuestion.id) ? 'star' : 'star-o'" />
  164. <p>收藏</p>
  165. </view>
  166. <view class="lButton" @click="openAside">
  167. <img src="https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A32%3A57questionsCard.svg" />
  168. <p>答题卡</p>
  169. </view>
  170. <view class="lButton" @click="handlePreNextClick(-1)">
  171. <img src="https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A33%3A28up.svg" />
  172. <p>上一题</p>
  173. </view>
  174. <view class="rButtonBox">
  175. <view class="rButton" @click="handlePreNextClick(1)">{{ list.length === current ? '完成' : '下一题' }}</view>
  176. </view>
  177. </view>
  178. </view>
  179. <view class="aside" :class="{ openAside: answerPanel }">
  180. <view style="padding: 20px;border-radius: 5px;">
  181. <view style="display: flex;justify-content: space-between">
  182. <view class="card-title">答题卡</view>
  183. <view>
  184. <span class="titleDeText">
  185. 未做
  186. <i class="titleText"></i>
  187. </span>
  188. <span class="titleDeText">
  189. 已做
  190. <i class="titleText titleAnswered"></i>
  191. </span>
  192. <span class="titleDeText">
  193. 正确
  194. <i class="titleText titleRight"></i>
  195. </span>
  196. <span class="titleDeText">
  197. 错误
  198. <i class="titleText titleError"></i>
  199. </span>
  200. </view>
  201. </view>
  202. <view style="padding: 20px 0 10px 0;overflow-y:auto;min-height: 260px;max-height: 400px;">
  203. <view
  204. v-for="(item, index) in list"
  205. :key="index"
  206. :class="{
  207. 'picker-item': true,
  208. error: !answerEqual(item.stuAnswer, item.rightAnswer, item.type) && item.stuAnswer.length > 0,
  209. right: answerEqual(item.stuAnswer, item.rightAnswer, item.type) && item.stuAnswer.length > 0,
  210. normal: answerEqual(item.type, 3) && item.stuAnswer.length > 0
  211. }"
  212. @click="answerPanelClick(index)"
  213. >
  214. {{ index + 1 }}
  215. </view>
  216. </view>
  217. </view>
  218. </view>
  219. </view>
  220. <view class="accomplish" v-if="isFinal">
  221. <view class="detailBox">
  222. <img class="detailIcon" src="https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A32%3A10accomplish.png" />
  223. <view class="detailTitle">答题完成</view>
  224. <view class="detailTitle">{{ examName }}</view>
  225. <view class="detailTitle">正确率{{ (right / list.length).toFixed(2) * 100 }}%</view>
  226. <view class="detailButton detailButtonTop" @click="viewAnalysis">查看解析</view>
  227. <view class="detailButton detailButtonBottom" @click="goBack">返回列表</view>
  228. </view>
  229. </view>
  230. </view>
  231. </template>

 js代码:使用了lodash,需要先安装lodash   npm install lodash

项目中包含很多题型,可以根据自己的题型进行修改,每个题型都由对应的数字type表达:

1: '单项选择',2: '多项选择',3: '问答',4: '材料',5: '判断',6: '填空'。

关键信息:currentQuestion:当前题目信息,list:题目列表,collectionList:收藏列表

data中的数据:

  1. data() {
  2. const type = Number(this.$route == undefined ? 1 : this.$route.query.type);
  3. return {
  4. examquestionSource: {},
  5. tokenDetail: {},
  6. type,
  7. isEqual,
  8. form: {
  9. answer: [''],
  10. questionId: ''
  11. },
  12. radio: 3,
  13. tip: type === 2,
  14. list: [],
  15. current: 1,
  16. submitLoading: false,
  17. loading: false,
  18. examName: this.$route == undefined ? '' : this.$route.query.name,
  19. answerPanel: false,
  20. redoExam: false,
  21. showAnalysis: false,
  22. statusIcon: 'https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A33%3A25rightn.png',
  23. rightIcon: 'https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A33%3A25rightn.png',
  24. errorIcon: 'https://hgkj-image.oss-cn-shenzhen.aliyuncs.com/test/2023-08-25%2014%3A32%3A49errorn.png',
  25. resultText: '',
  26. rightText: '回答正确',
  27. errorText: '回答错误',
  28. isFinal: false,
  29. materialList: [],
  30. strategy: '',
  31. collectionList: [],
  32. collectIds: [],
  33. everyDay: '',
  34. selectRight: 0,
  35. right: 0,
  36. error: 0,
  37. submitList: [],
  38. // 错题
  39. errChild: [],
  40. paperId: '',
  41. collectList: [],
  42. imitateTest: uni.getStorageSync('imitateTest')
  43. // // 0 综合知识
  44. // // 1 案例分析
  45. };
  46. },

 计算属性 computed:

  1. computed: {
  2. currentQuestion() {
  3. return this.getCurrentQuestion();
  4. },
  5. questionType() {
  6. return {
  7. 1: '单项选择',
  8. 2: '多项选择',
  9. 3: '问答',
  10. 4: '材料',
  11. 5: '判断',
  12. 6: '填空'
  13. }[this.currentQuestion.type || 3];
  14. },
  15. isAnswer() {
  16. return this.type === 1;
  17. },
  18. getBackgroundColor() {
  19. return function(item = {}) {
  20. if (this.currentQuestion.type == 1) {
  21. if (this.tip && this.currentQuestion.rightAnswer === item.value && item.value === this.currentQuestion.stuAnswer)
  22. return {
  23. backgroundColor: 'rgb(168 255 173)'
  24. };
  25. else if (this.tip && this.currentQuestion.rightAnswer !== item.value && item.value === this.currentQuestion.stuAnswer)
  26. return {
  27. backgroundColor: '#ffbaba'
  28. };
  29. else if (this.tip && this.currentQuestion.rightAnswer == item.value)
  30. return {
  31. backgroundColor: 'rgb(168 255 173)'
  32. };
  33. else return {};
  34. }
  35. if (this.currentQuestion.type == 4) {
  36. if (this.tip && parseInt(this.currentQuestion.rightAnswer) === item)
  37. return {
  38. backgroundColor: 'rgb(168 255 173)'
  39. };
  40. else if (this.tip && this.currentQuestion.rightAnswer != item)
  41. return {
  42. backgroundColor: '#ffbaba'
  43. };
  44. else return {};
  45. }
  46. if (this.currentQuestion.type == 5) {
  47. let YorN = '';
  48. if (item == 0) {
  49. YorN = '错误';
  50. } else {
  51. YorN = '正确';
  52. }
  53. console.log(this.currentQuestion.rightAnswer[0] === YorN);
  54. if (this.tip && this.currentQuestion.rightAnswer[0] === YorN)
  55. return {
  56. backgroundColor: 'rgb(168 255 173)'
  57. };
  58. else if (this.tip && this.currentQuestion.rightAnswer[0] != YorN)
  59. return {
  60. backgroundColor: '#ffbaba'
  61. };
  62. else return {};
  63. }
  64. };
  65. },
  66. answerEqual() {
  67. return function(a, b, c) {
  68. if (c == 1) {
  69. return a[0] === b[0];
  70. } else if (typeof a === 'object' && typeof b === 'object') {
  71. return JSON.stringify(a) === JSON.stringify(b);
  72. }
  73. return a === b;
  74. };
  75. }
  76. },

监听数据变化 watch:

  1. watch: {
  2. form: {
  3. handler(old, news) {},
  4. deep: true
  5. },
  6. currentQuestion(value) {//题目信息
  7. if (value.type === 1) {
  8. if (value.stuAnswer.length > 0) {
  9. this.form.answer = value.stuAnswer;
  10. this.checkAnswer();
  11. } else {
  12. this.form.answer = '';
  13. }
  14. }
  15. if (value.type === 2) {
  16. if (value.stuAnswer.length > 0) {
  17. this.form.answer = value.stuAnswer;
  18. this.checkAnswer();
  19. } else this.form.answer = [];
  20. }
  21. if (value.type === 3) {
  22. this.form.answer = value.stuAnswer.length > 0 ? value.stuAnswer : '';
  23. if (value.stuAnswer.length > 0) this.checkAnswer();
  24. }
  25. if (value.type === 6) {
  26. this.form.answer = value.stuAnswer.length > 0 ? value.stuAnswer : '';
  27. if (value.stuAnswer.length > 0) this.checkAnswer();
  28. }
  29. if (value.type === 4) {
  30. // console.log(value);
  31. if (value.stuAnswer.length > 0) {
  32. this.form.answer = value.stuAnswer;
  33. this.checkAnswer();
  34. } else this.form.answer = '';
  35. }
  36. if (value.type === 5) {
  37. console.log(value);
  38. console.log(value.stuAnswer);
  39. if (value.stuAnswer.length > 0) {
  40. this.form.answer = value.stuAnswer;
  41. this.checkAnswer();
  42. } else this.form.answer = '';
  43. }
  44. }
  45. },

onLoad()生命周期:

根据自己的页面传参,在onLoad中获取,并根据options中的数据进行判断获取的是什么题目,例如:从每日一练、模拟考试、收藏、错题等跳转传参不同,获取的题目也不同。

  1. onLoad(options) {
  2. this.getList(1);
  3. this.getCollectionList();
  4. },

methods方法:

  1. toAi() {
  2. // 跳转文心一言,并携带题目。
  3. uni.navigateTo({
  4. url: `/pages/wenxin/index?question=${this.currentQuestion.title}`
  5. });
  6. },
  7. // 获取收藏列表
  8. async getCollectionList(id) {
  9. this.collectIds = [];
  10. this.collectionList = [];
  11. let res = await this.$request.request({
  12. url: `/student/collect`,
  13. method: 'GET'
  14. });
  15. let collectionList = res.data;
  16. for (let collect of collectionList) {
  17. if (collect.paperId == this.currentQuestion.paperId) {
  18. this.collectionList = collect.collectChildren;
  19. for (let question of collect.collectChildren) {
  20. this.collectIds.push(question.questionId);
  21. }
  22. }
  23. }
  24. },
  25. // 收藏
  26. async addCollection() {
  27. // 如果获取的收藏列表中包含点击的题目id,就取消收藏
  28. if (this.collectIds.includes(this.currentQuestion.id)) {
  29. await this.$request
  30. .request({
  31. url: `/student/collect?questionId=${this.currentQuestion.id}`,
  32. method: 'DELETE'
  33. })
  34. .then(res => {
  35. // 重新获取收藏列表
  36. this.getCollectionList();
  37. // 提示
  38. uni.showToast({
  39. title: '取消收藏',
  40. icon: 'none',
  41. duration: 1500
  42. });
  43. });
  44. } else {
  45. // 否则添加收藏
  46. await this.$request
  47. .request({
  48. url: `/student/collect`,
  49. method: 'POST',
  50. data: {
  51. questionId: this.currentQuestion.id,
  52. paperId: this.currentQuestion.paperId
  53. }
  54. })
  55. .then(res => {
  56. // 重新获取收藏列表
  57. this.getCollectionList();
  58. // 提示
  59. uni.showToast({
  60. title: '收藏成功',
  61. icon: 'none',
  62. duration: 1500
  63. });
  64. });
  65. }
  66. },
  67. // 下一题
  68. async handlePreNextClick(p) {
  69. if (this.list.length === this.current) {
  70. if (this.right + this.error == this.list.length) {
  71. // 提交答案
  72. this.isFinal = true;
  73. if (this.everyDay == true) {
  74. // 如果每日一练还要添加每日一练记录
  75. this.postDays();
  76. }
  77. } else {
  78. // 最后一道题
  79. uni.showToast({
  80. title: `当前最后一题,您还有${this.list.length - (this.right + this.error)}道题目未作答`,
  81. icon: 'none',
  82. duration: 1500
  83. });
  84. }
  85. }
  86. if (p === 1 && (!this.isAnswer || this.currentQuestion.type === 3)) {
  87. await this.submit();
  88. }
  89. if (this.isAnswer) {
  90. this.tip = false;
  91. }
  92. // 查看解析
  93. if (this.redoExam === true) this.tip = true;
  94. // current为题目序号
  95. this.current = Math.max(1, Math.min(this.current + p, this.list.length));
  96. this.checkAnswer();
  97. if (this.redoExam === false) this.tip = false;
  98. },
  99. // 添加每日一练记录
  100. postDays() {
  101. this.$request
  102. .request({
  103. url: `/student/dailyParactice?accuracy=${(this.selectRight / this.list.length).toFixed(2)}`,
  104. method: 'POST'
  105. })
  106. .then(res => {
  107. // console.log(res);
  108. // 显示返回结果
  109. uni.showToast({
  110. title: res.msg,
  111. icon: 'none',
  112. duration: 2000
  113. });
  114. // 等待一下之后跳转首页
  115. setTimeout(function() {
  116. uni.reLaunch({
  117. url: '/pages/chapters/index'
  118. });
  119. }, 2000);
  120. });
  121. },
  122. getCurrentQuestion() {
  123. const data = _.cloneDeep(this.list).find((_, i) => i === this.current - 1) || {};
  124. data.formOptions = Object.entries(data.options || {}).map(([key, value]) => ({
  125. label: key + '、' + value,
  126. value: key
  127. }));
  128. if (data.type === 1 && Array.isArray(data.rightAnswer) && data.rightAnswer.length > 0) {
  129. data.rightAnswer = data.rightAnswer[0];
  130. }
  131. return data;
  132. },
  133. // 答题记录
  134. async noteTitle(correct, userAnswer) {
  135. // 缓存中的course,在点击课程的时候会保存课程的信息在缓存中。
  136. if (uni.getStorageSync('course')) {
  137. var course = JSON.parse(uni.getStorageSync('course'));
  138. // 添加刷题记录到数据库
  139. await this.$request
  140. .request({
  141. url: `/student/pascal/count`,
  142. method: 'POST',
  143. data: {
  144. courseId: course.coursesId, //课程id
  145. courseName: course.paperName, //课程名称
  146. pascalId: this.currentQuestion.id, //试题ID
  147. answer: userAnswer, //用户作答
  148. isRigth: correct, //是否正确
  149. paperId: this.currentQuestion.paperId //套题id
  150. }
  151. })
  152. .then(res => {
  153. // console.log('答题记录', res);
  154. });
  155. }
  156. },
  157. handleSubmit() {
  158. let isRight = false;
  159. if (this.currentQuestion.type === 1 || this.currentQuestion.type === 2) {
  160. this.list[this.current - 1].stuAnswer = this.form.answer;
  161. if (this.currentQuestion.type === 2) this.form.answer = this.form.answer.sort((a, b) => a.charCodeAt() - b.charCodeAt());
  162. if (this.outputList(this.currentQuestion.rightAnswer, 'this.currentQuestion.rightAnswer') !== this.outputList(this.form.answer, 'this.form.answer')) {
  163. this.tip = true;
  164. this.statusIcon = this.errorIcon;
  165. this.resultText = this.errorText;
  166. this.currentQuestion.isRight = false;
  167. let answer = [];
  168. answer.push(this.currentQuestion.stuAnswer);
  169. this.noteTitle(0, JSON.stringify(answer));
  170. if (!this.submitList.includes(this.currentQuestion.id)) {
  171. this.submitList.push(this.currentQuestion.id);
  172. this.error++;
  173. }
  174. } else {
  175. this.resultText = this.rightText;
  176. this.statusIcon = this.rightIcon;
  177. this.currentQuestion.isRight = true;
  178. if (this.current !== this.list.length) {
  179. uni.showToast({
  180. title: '回答正确,正在跳转第' + (this.current + 1) + '题',
  181. icon: 'none',
  182. duration: 2000
  183. });
  184. }
  185. let answer = [];
  186. answer.push(this.currentQuestion.stuAnswer);
  187. this.noteTitle(1, JSON.stringify(answer));
  188. if (!this.submitList.includes(this.currentQuestion.id)) {
  189. this.submitList.push(this.currentQuestion.id);
  190. this.right++;
  191. }
  192. let _this = this;
  193. setTimeout(function() {
  194. _this.handlePreNextClick(1);
  195. }, 1000);
  196. }
  197. }
  198. if (this.currentQuestion.type === 3) {
  199. this.list[this.current - 1].stuAnswer = this.form.answer;
  200. this.tip = true;
  201. this.noteTitle(1, JSON.stringify(this.form.answer));
  202. }
  203. if (this.currentQuestion.type === 6) {
  204. this.list[this.current - 1].stuAnswer = this.form.answer;
  205. this.tip = true;
  206. this.noteTitle(1, JSON.stringify(this.form.answer));
  207. this.right++;
  208. }
  209. if (this.currentQuestion.type === 4) {
  210. this.list[this.current - 1].stuAnswer = this.form.answer;
  211. if (this.list[this.current - 1].stuAnswer === this.list[this.current - 1].rightAnswer) {
  212. uni.showToast({
  213. title: '回答正确,正在跳转第' + (this.current + 1) + '题',
  214. icon: 'none',
  215. duration: 2000
  216. });
  217. let _this = this;
  218. setTimeout(function() {
  219. _this.handlePreNextClick(1);
  220. }, 1000);
  221. }
  222. }
  223. if (this.currentQuestion.type === 5) {
  224. if (this.form.answer == 1) {
  225. this.list[this.current - 1].stuAnswer = '正确';
  226. // 正确
  227. this.tip = true;
  228. this.resultText = this.rightText;
  229. this.statusIcon = this.rightIcon;
  230. this.currentQuestion.isRight = true;
  231. } else if (this.form.answer == 0) {
  232. this.list[this.current - 1].stuAnswer = '错误';
  233. // 错误
  234. this.tip = true;
  235. this.statusIcon = this.errorIcon;
  236. this.resultText = this.errorText;
  237. this.currentQuestion.isRight = false;
  238. }
  239. if (this.list[this.current - 1].stuAnswer == this.list[this.current - 1].rightAnswer) {
  240. uni.showToast({
  241. title: '回答正确,正在跳转第' + (this.current + 1) + '题',
  242. icon: 'none',
  243. duration: 2000
  244. });
  245. setTimeout(() => {
  246. this.handlePreNextClick(1);
  247. }, 1000);
  248. this.noteTitle(1, JSON.stringify(this.form.answer));
  249. } else {
  250. this.noteTitle(0, JSON.stringify(this.form.answer));
  251. }
  252. }
  253. this.$forceUpdate();
  254. this.submit();
  255. uni.setStorageSync('questionList', this.list);
  256. },
  257. async submit() {
  258. const form = {
  259. ...this.form
  260. };
  261. if (this.currentQuestion.type === 2 && form.answer && form.answer.length) {
  262. // 答案排序
  263. form.answer = form.answer.sort((a, b) => a.charCodeAt() - b.charCodeAt());
  264. }
  265. this.submitLoading = true;
  266. // 显示答题完成界面
  267. if (this.list.length === this.current) {
  268. if (this.right + this.error == this.list.length) {
  269. this.isFinal = true;
  270. if (this.everyDay) {
  271. this.postDays();
  272. }
  273. } else {
  274. uni.showToast({
  275. title: `当前最后一题,您还有${this.list.length - (this.right + this.error)}道题目未作答`,
  276. icon: 'none',
  277. duration: 2000
  278. });
  279. }
  280. }
  281. },
  282. checkToken(res) {
  283. if (res.code == 500) {
  284. Dialog.confirm({
  285. title: '广东自考题库',
  286. message: '登录状态已过期,请重新登录'
  287. })
  288. .then(() => {
  289. // 页面跳转
  290. uni.navigateTo({
  291. url: '/pages/Login/index'
  292. });
  293. })
  294. .catch(() => {
  295. console.log('取消');
  296. });
  297. }
  298. },
  299. async getList(isFirstFetch) {
  300. if (this.everyDay) {
  301. let course = uni.getStorageSync('course');
  302. await this.$request
  303. .request({
  304. url: `/student/dailyParactice/days/questions?courseId=2`,
  305. method: 'GET'
  306. })
  307. .then(res => {
  308. this.examquestionSource = res.data;
  309. // 获取题目列表
  310. this.getquestionList();
  311. });
  312. } else if (this.errChild.length > 0) {
  313. this.examquestionSource = this.errChild;
  314. this.getquestionList();
  315. } else if (this.collectList.length > 0) {
  316. this.examquestionSource = this.collectList;
  317. this.getquestionList();
  318. } else if (uni.getStorageSync('questionList')) {
  319. this.examquestionSource = uni.getStorageSync('questionList');
  320. // 获取题目列表
  321. this.getquestionList();
  322. } else if (uni.getStorageSync('imitateTest')) {
  323. if (uni.getStorageSync('imitateTest') == 0) {
  324. // 获取机考选择题
  325. await this.$request
  326. .request({
  327. url: `/student/dailyParactice/get/testSgin`,
  328. method: 'GET'
  329. })
  330. .then(res => {
  331. this.examquestionSource = res.data;
  332. // 获取题目列表
  333. this.getquestionList();
  334. });
  335. } else {
  336. // 案例分析
  337. await this.$request
  338. .request({
  339. url: `/student/dailyParactice/get/case`,
  340. method: 'GET'
  341. })
  342. .then(res => {
  343. this.examquestionSource = res.data;
  344. // 获取题目列表
  345. this.getquestionList();
  346. });
  347. }
  348. } else {
  349. await this.$request
  350. .request({
  351. url: `/student/paper/question/list?paperId=${this.paperId}`,
  352. method: 'GET'
  353. })
  354. .then(res => {
  355. this.checkToken(res);
  356. this.examquestionSource = res.rows;
  357. // 获取题目列表
  358. this.getquestionList();
  359. });
  360. }
  361. },
  362. getquestionList() {
  363. this.list = this.handleQuestion(this.examquestionSource);
  364. if (this.strategy == 1) {
  365. this.$request
  366. .request({
  367. url: `/student/pascal/count/getPascale/record`,
  368. data: {
  369. paperId: this.paperId,
  370. strategy: this.strategy
  371. },
  372. method: 'GET'
  373. })
  374. .then(res => {
  375. for (let question of res.data) {
  376. for (let item of this.list) {
  377. if (item.id == question.pascalId) {
  378. if (typeof JSON.parse(question.answer) == 'string') {
  379. item.stuAnswer = JSON.parse(question.answer);
  380. } else {
  381. item.stuAnswer = JSON.parse(question.answer)[0];
  382. }
  383. }
  384. }
  385. }
  386. });
  387. } else if (this.strategy == 0) {
  388. // 点击取消清空用户答题记录
  389. this.$request
  390. .request({
  391. // paperType为1测试章节套题
  392. url: `/student/pascal/count/getPascale/record`,
  393. data: {
  394. paperId: this.paperId,
  395. strategy: this.strategy
  396. },
  397. method: 'GET'
  398. })
  399. .then(res => {
  400. // console.log('题目列表', this.list);
  401. // console.log('清空答题记录', res);
  402. });
  403. }
  404. },
  405. isJSON(str) {
  406. if (typeof str == 'string') {
  407. try {
  408. var obj = JSON.parse(str);
  409. if (typeof obj == 'object' && obj) {
  410. return true;
  411. } else {
  412. return false;
  413. }
  414. } catch (e) {
  415. console.log('error:' + str + '!!!' + e);
  416. return false;
  417. }
  418. }
  419. },
  420. // 对题目进行处理
  421. handleQuestion(singleList, mid = 0, isM = false) {
  422. let delist = [];
  423. for (let i = 0; i < singleList.length; i++) {
  424. if (singleList[i].options != '') {
  425. singleList[i].options = JSON.parse(singleList[i].options);
  426. }
  427. let examp = {
  428. analysis: singleList[i].analysis,
  429. analysisImgKey: '',
  430. analysisImgUrl: '',
  431. id: singleList[i].questionId,
  432. isAnswer: true,
  433. options: {
  434. A: singleList[i].options.A,
  435. B: singleList[i].options.B,
  436. C: singleList[i].options.C,
  437. D: singleList[i].options.D,
  438. E: singleList[i].options.E ? singleList[i].options.E : null,
  439. F: singleList[i].options.F ? singleList[i].options.F : null
  440. },
  441. questionImgKey: '',
  442. questionImgUrl: '',
  443. rightAnswer: this.isJSON(singleList[i].rightAnswer) ? JSON.parse(singleList[i].rightAnswer) : singleList[i].rightAnswer,
  444. stuAnswer: '',
  445. title: singleList[i].title,
  446. type: singleList[i].type,
  447. isM: false,
  448. mid: mid,
  449. paperId: singleList[i].paperId
  450. };
  451. console.log();
  452. if (!singleList[i].options.E) {
  453. delete examp.options.E;
  454. delete examp.options.F;
  455. }
  456. if (!singleList[i].options.F) {
  457. delete examp.options.F;
  458. }
  459. if (isM) examp.isM = true;
  460. delist.push(examp);
  461. }
  462. // console.log(delist);
  463. return delist;
  464. },
  465. openAside() {
  466. this.$forceUpdate();
  467. this.answerPanel = !this.answerPanel;
  468. },
  469. answerPanelClick(index) {
  470. this.current = index + 1;
  471. this.tip = false;
  472. // uniapp获取微信小程序窗口信息
  473. let getWindowInfo = uni.getWindowInfo();
  474. if (getWindowInfo.screenWidth <= 768) {
  475. this.openAside();
  476. }
  477. },
  478. outputList(list, source = 'default') {
  479. let outputStr = '';
  480. if (typeof list == 'string' || typeof list == 'number') return list;
  481. if (list != null)
  482. for (let i = 0; i < list.length; i++) {
  483. outputStr += list[i] + '';
  484. }
  485. return outputStr;
  486. },
  487. viewAnalysis() {
  488. this.isFinal = false;
  489. this.current = 1;
  490. this.redoExam = true;
  491. this.tip = true;
  492. },
  493. goBack() {
  494. this.$router.go(-1);
  495. },
  496. checkAnswer() {
  497. if (this.currentQuestion.type === 1 || this.currentQuestion.type === 2) {
  498. if (this.currentQuestion.type === 2) {
  499. if (this.form.answer == [] || this.form.answer.length === 0) return;
  500. // console.log(this.outputList(this.form.answer));
  501. this.form.answer = this.form.answer.sort((a, b) => a.charCodeAt() - b.charCodeAt());
  502. if (this.outputList(this.currentQuestion.rightAnswer) !== this.outputList(this.form.answer)) {
  503. if (this.form.answer == [] || this.form.answer.length === 0) return;
  504. this.tip = true;
  505. this.statusIcon = this.errorIcon;
  506. this.resultText = this.errorText;
  507. } else {
  508. this.tip = true;
  509. this.resultText = this.rightText;
  510. this.statusIcon = this.rightIcon;
  511. this.selectRight++;
  512. }
  513. }
  514. if (this.currentQuestion.type === 1) {
  515. if (this.form.answer == [] || this.form.answer.length === 0) return;
  516. if (this.form.answer == this.currentQuestion.rightAnswer) {
  517. this.tip = true;
  518. this.resultText = this.rightText;
  519. this.statusIcon = this.rightIcon;
  520. this.selectRight++;
  521. } else {
  522. this.tip = true;
  523. this.statusIcon = this.errorIcon;
  524. this.resultText = this.errorText;
  525. }
  526. }
  527. }
  528. if (this.currentQuestion.type === 3 || this.currentQuestion.type === 6) {
  529. this.tip = true;
  530. }
  531. if (this.currentQuestion.type === 4) {
  532. if (this.form.answer == [] || this.form.answer.length === 0) return;
  533. if (this.form.answer === this.currentQuestion.rightAnswer) {
  534. this.resultText = this.rightText;
  535. this.statusIcon = this.rightIcon;
  536. this.selectRight++;
  537. } else {
  538. this.tip = true;
  539. this.statusIcon = this.errorIcon;
  540. this.resultText = this.errorText;
  541. }
  542. }
  543. if (this.currentQuestion.type === 5) {
  544. if (this.form.answer == [] || this.form.answer.length === 0) return;
  545. if (this.form.answer === this.currentQuestion.rightAnswer) {
  546. this.resultText = this.rightText;
  547. this.statusIcon = this.rightIcon;
  548. this.selectRight++;
  549. } else {
  550. this.tip = true;
  551. this.statusIcon = this.errorIcon;
  552. this.resultText = this.errorText;
  553. }
  554. }
  555. this.$forceUpdate();
  556. },
  557. getAnswerPanelColor(item) {
  558. if (this.tip && this.currentQuestion.rightAnswer === item.value) return '#68ff72';
  559. else if (this.tip && this.currentQuestion.rightAnswer !== item.value) return '#ff5555';
  560. else return '';
  561. },
  562. lookAnswerClick() {
  563. this.tip = !this.tip;
  564. this.checkAnswer();
  565. }

scss样式:

  1. <style lang="scss" scoped>
  2. $right: green;
  3. $error: red;
  4. $normal: #03a9f4ab;
  5. .span_label /deep/ p {
  6. display: inline;
  7. }
  8. .container {
  9. max-width: 1200px;
  10. margin: auto;
  11. /deep/ .el-checkbox {
  12. display: block;
  13. margin-bottom: 32px;
  14. }
  15. }
  16. .aside {
  17. width: 330px;
  18. display: flex;
  19. position: fixed;
  20. right: -330px;
  21. top: 154px;
  22. transition: right 0.3s ease;
  23. z-index: 1001;
  24. background-color: white;
  25. box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
  26. }
  27. .openAside {
  28. right: 0 !important;
  29. }
  30. .answer {
  31. display: flex;
  32. .main {
  33. flex: 1;
  34. }
  35. &__type {
  36. display: flex;
  37. justify-content: space-between;
  38. padding-right: 20px;
  39. color: #333;
  40. .text {
  41. font-weight: bold;
  42. font-size: 16px;
  43. margin-bottom: 16px;
  44. }
  45. .progress {
  46. color: #999;
  47. &__content {
  48. font-size: 14px;
  49. font-weight: bold;
  50. margin-bottom: 20px;
  51. }
  52. span {
  53. font-size: 16px;
  54. font-weight: bold;
  55. color: #1890ff;
  56. }
  57. }
  58. }
  59. &__content {
  60. margin-bottom: 20px;
  61. font-weight: bold;
  62. }
  63. &__form {
  64. }
  65. }
  66. .el-radio-group {
  67. .el-radio {
  68. display: block;
  69. margin-top: 10px;
  70. width: 100%;
  71. }
  72. }
  73. .el-radio.is-bordered + .el-radio.is-bordered {
  74. margin-left: 0;
  75. }
  76. .card-title {
  77. font-weight: bold;
  78. color: #0d0e10;
  79. text-align: left;
  80. padding-left: 10px;
  81. font-size: 14px;
  82. border-left: #1e88e5 3px solid;
  83. }
  84. .answer-type {
  85. color: #666;
  86. margin-top: 46px;
  87. padding-bottom: 14px;
  88. border-bottom: solid 1px #ebecf2;
  89. }
  90. .picker-item {
  91. cursor: pointer;
  92. width: 38px;
  93. height: 38px;
  94. line-height: 38px;
  95. text-align: center;
  96. border: 1px solid #dddddd;
  97. border-radius: 5px;
  98. background: #ffffff;
  99. -webkit-user-select: none;
  100. -moz-user-select: none;
  101. -ms-user-select: none;
  102. user-select: none;
  103. float: left;
  104. margin: 4px 6px;
  105. position: relative;
  106. overflow: hidden;
  107. &.error {
  108. background: $error;
  109. color: #fff;
  110. }
  111. &.right {
  112. background: $right;
  113. color: #fff;
  114. }
  115. &.normal {
  116. background: $normal;
  117. color: #fff;
  118. }
  119. }
  120. .bottom {
  121. display: flex;
  122. justify-content: space-between;
  123. margin-top: 40px;
  124. }
  125. .tip-box {
  126. margin-top: 32px;
  127. padding: 16px;
  128. box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
  129. border-radius: 6px;
  130. position: relative;
  131. .title {
  132. color: #333;
  133. font-weight: bold;
  134. }
  135. .desc {
  136. margin-top: 16px;
  137. color: #7f7f7f;
  138. span {
  139. color: #333;
  140. font-weight: bold;
  141. }
  142. }
  143. .arrow {
  144. position: absolute;
  145. display: block;
  146. width: 0;
  147. height: 0;
  148. border-color: transparent;
  149. border-style: solid;
  150. top: -6px;
  151. left: 32px;
  152. margin-right: 3px;
  153. border-top-color: #ebeef5;
  154. border-bottom-width: 0;
  155. &::after {
  156. content: ' ';
  157. position: absolute;
  158. display: block;
  159. width: 0;
  160. height: 0;
  161. border-color: transparent;
  162. border-style: solid;
  163. border-width: 6px;
  164. top: 1px;
  165. margin-left: -6px;
  166. border-top-width: 0;
  167. border-bottom-color: #fff;
  168. }
  169. }
  170. }
  171. .bread {
  172. padding: 20px 0;
  173. }
  174. .answer-container {
  175. background: initial;
  176. }
  177. .titleText {
  178. position: relative;
  179. display: inline-block;
  180. border: 1px solid #bfbfbf;
  181. width: 12px;
  182. height: 12px;
  183. text-indent: 0;
  184. margin-left: 3px;
  185. top: 2px;
  186. }
  187. .titleRight {
  188. background: $right;
  189. }
  190. .titleError {
  191. background: $error;
  192. }
  193. .titleAnswered {
  194. border: 1px solid #5a82ff;
  195. background: #5a82ff;
  196. }
  197. .titleDeText {
  198. font-size: 12px;
  199. color: #9cb2cd;
  200. text-indent: 0;
  201. margin-left: 5px;
  202. }
  203. .openAfix {
  204. font-size: 16px;
  205. margin-top: 20px;
  206. color: white;
  207. border-radius: 5px;
  208. width: 18px;
  209. height: 120px;
  210. display: none;
  211. background: #1e88e5;
  212. padding: 14px;
  213. justify-content: center;
  214. align-items: center;
  215. }
  216. @media screen and (max-width: 786px) {
  217. .bread {
  218. padding: 20px;
  219. }
  220. .openAfix {
  221. display: flex;
  222. }
  223. }
  224. .questTypeBox {
  225. height: 41px;
  226. line-height: 41px;
  227. padding: 0 14px;
  228. display: -webkit-box;
  229. display: -webkit-flex;
  230. display: flex;
  231. -webkit-box-orient: horizontal;
  232. -webkit-box-direction: normal;
  233. -webkit-flex-direction: row;
  234. flex-direction: row;
  235. -webkit-box-pack: justify;
  236. -webkit-justify-content: space-between;
  237. justify-content: space-between;
  238. }
  239. .questionType {
  240. font-size: 13px;
  241. color: #666;
  242. }
  243. .questionAmount {
  244. font-size: 12px;
  245. color: #999;
  246. }
  247. .questionBox {
  248. background: #fff;
  249. padding: 14px;
  250. }
  251. .titleBox {
  252. color: #333;
  253. padding-bottom: 14px;
  254. }
  255. .titleMain {
  256. height: auto;
  257. }
  258. .titleContent {
  259. margin-bottom: 10px;
  260. font-size: 15px;
  261. }
  262. .titleImg {
  263. width: 100%;
  264. max-height: 200px;
  265. object-fit: contain;
  266. object-position: left;
  267. }
  268. .answerBox {
  269. padding: 14px 16px;
  270. background-color: #fff;
  271. display: -webkit-box;
  272. display: -webkit-flex;
  273. display: flex;
  274. }
  275. .answerIcon {
  276. width: 20px;
  277. margin-right: 10px;
  278. position: relative;
  279. }
  280. .answerIcon img {
  281. width: 100%;
  282. margin-top: 2px;
  283. }
  284. .answerBoxText {
  285. flex: 1;
  286. }
  287. .answerBoxContent {
  288. font-weight: 500;
  289. font-size: 14px;
  290. color: #666;
  291. line-height: 22px;
  292. margin-bottom: 9px;
  293. }
  294. .answerBoxAnswers {
  295. flex: 1;
  296. }
  297. .resultCompareText {
  298. font-weight: 500;
  299. font-size: 14px;
  300. color: #666;
  301. line-height: 22px;
  302. margin-bottom: 9px;
  303. }
  304. .answerBoxAnswersList {
  305. flex: 1;
  306. }
  307. .answers {
  308. font-size: 14px;
  309. line-height: 22px;
  310. color: #666;
  311. }
  312. .questionAnalysis {
  313. padding: 14px;
  314. background-color: #fff;
  315. margin-top: 10px;
  316. }
  317. .analysisTitle {
  318. display: flex;
  319. justify-content: space-between;
  320. align-items: center;
  321. font-size: 14px;
  322. color: #666;
  323. line-height: 22px;
  324. font-weight: 700;
  325. .analysis_AI {
  326. display: flex;
  327. align-items: center;
  328. img {
  329. width: 25px;
  330. height: 25px;
  331. }
  332. }
  333. }
  334. .analysisContent {
  335. padding: 6px 0 12px;
  336. border-bottom: 1px dashed #ddd;
  337. margin-bottom: 11px;
  338. }
  339. .bottomButton {
  340. position: fixed;
  341. bottom: 0;
  342. left: 0;
  343. height: 50px;
  344. width: 100%;
  345. display: -webkit-box;
  346. display: -webkit-flex;
  347. display: flex;
  348. background: #fff;
  349. z-index: 1000;
  350. }
  351. .buttonGroup {
  352. -webkit-box-flex: 1;
  353. -webkit-flex: 1;
  354. flex: 1;
  355. display: -webkit-box;
  356. display: -webkit-flex;
  357. display: flex;
  358. }
  359. .rButtonBox {
  360. -webkit-box-flex: 1;
  361. -webkit-flex: 1;
  362. flex: 1;
  363. -webkit-flex-wrap: wrap;
  364. flex-wrap: wrap;
  365. display: flex;
  366. align-items: center;
  367. padding-right: 14px;
  368. }
  369. .lButton {
  370. flex: 1;
  371. -webkit-flex-wrap: wrap;
  372. flex-wrap: wrap;
  373. display: -webkit-box;
  374. display: -webkit-flex;
  375. display: flex;
  376. -webkit-box-pack: center;
  377. -webkit-justify-content: center;
  378. justify-content: center;
  379. justify-items: center;
  380. -webkit-box-align: center;
  381. -webkit-align-items: center;
  382. align-items: center;
  383. -webkit-align-content: center;
  384. align-content: center;
  385. }
  386. .lButton img {
  387. width: 18px;
  388. height: 18px;
  389. text-align: center;
  390. }
  391. .lButton p {
  392. text-align: center;
  393. width: 100%;
  394. font-size: 11px;
  395. color: #666;
  396. line-height: 15px;
  397. }
  398. .rButton {
  399. height: 33px;
  400. width: 122px;
  401. border-radius: 74px;
  402. background-color: #0096ff;
  403. color: #fff;
  404. text-align: center;
  405. line-height: 33px;
  406. cursor: pointer;
  407. }
  408. .accomplish {
  409. padding-top: 45px;
  410. background: linear-gradient(#0096ff, rgb(159, 207, 241), rgba(254, 159, 16, 0) 90%);
  411. height: calc(100vh - 45px);
  412. }
  413. .detailBox {
  414. text-align: center;
  415. height: calc(100vh - 200px);
  416. border-radius: 10px;
  417. background-color: #fff;
  418. padding-top: 67px;
  419. margin: 0 20px;
  420. }
  421. .detailIcon {
  422. width: 99px;
  423. height: 99px;
  424. overflow: visible;
  425. opacity: 1;
  426. transition: opacity 0.5s ease-in-out 0s;
  427. background-color: transparent;
  428. margin: 0 auto 24px;
  429. }
  430. .detailTitle {
  431. width: 300px;
  432. margin: 0 auto;
  433. font-size: 16px;
  434. line-height: 20px;
  435. font-weight: 500;
  436. margin-bottom: 20px;
  437. }
  438. .detailButton {
  439. text-align: center;
  440. width: 290px;
  441. height: 37px;
  442. border-radius: 74px;
  443. font-size: 14px;
  444. }
  445. .detailButtonTop {
  446. line-height: 37px;
  447. background-color: #0096ff;
  448. color: #fff;
  449. margin: 0 auto 24px;
  450. }
  451. .detailButtonBottom {
  452. border: 1px solid #0096ff;
  453. color: #20a3fd;
  454. line-height: 35px;
  455. margin: 0 auto;
  456. }
  457. </style>
  458. <style lang="scss">
  459. .u-radio {
  460. min-height: 41px;
  461. width: 100%;
  462. padding: 0 7px;
  463. box-sizing: border-box;
  464. background: #f6f6f6;
  465. margin-bottom: 14px;
  466. border-radius: 4px;
  467. font-size: 14px;
  468. }
  469. .u-radio__label {
  470. font-size: 14px !important;
  471. white-space: normal;
  472. padding: 7px;
  473. }
  474. .u-checkbox {
  475. width: 100%;
  476. min-height: 41px;
  477. padding: 0 7px;
  478. box-sizing: border-box;
  479. background: #f6f6f6;
  480. margin-bottom: 14px;
  481. border-radius: 4px;
  482. border: initial;
  483. display: flex;
  484. align-items: center;
  485. height: initial;
  486. }
  487. .u-checkbox__label {
  488. white-space: normal;
  489. padding: 7px;
  490. font-size: 14px !important;
  491. }
  492. .u-checkbox .is-checked {
  493. background-color: #e5f1ff;
  494. }
  495. </style>

答题卡作答之后不可以继续作答

选择题:

                         

材料题:

                      

答题卡:

                        

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/AllinToyou/article/detail/505608
推荐阅读
相关标签
  

闽ICP备14008679号