闫增涛
2024-04-09 253245731d2b0c5ea4994a9c4e17ad6b60136f2c
答题器提交功能优化
10个文件已修改
418 ■■■■ 已修改文件
assets/js/config.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 299 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.wxml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxml 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionOptions/index.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionOptions/index.wxml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionOptions/index.wxss 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionSchedule/index.wxml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
assets/js/config.js
@@ -1,13 +1,13 @@
// export const requestCtx = "http://182.92.203.7:3001"; // 请求地址
// export const appId = 27;
export const requestCtx = "https://jsek.bnuic.com" // 请求地址
export const appId = 3;
export const requestCtx = "http://182.92.203.7:3001"; // 请求地址
export const appId = 27;
// export const requestCtx = "https://jsek.bnuic.com"; // 请求地址
// export const appId = 3;
// export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/";
export const epubUrl = "https://jsek.bnuic.com/epubReadMobile/#/";
export const pdfUrl = "http://182.92.203.7:3007/pdfRead/"
export const pdfUrl = "http://182.92.203.7:3007/pdfRead/";
export const requestTimeOut = 300000; // 请求超时时间
export const tokenKey = "jsek-token";
export const userInfoKey = "website-front-userInfo"; // 用户信息key
export const userInfoKey = "website-front-userInfo"; // 用户信息key
export const appRefCode = "jingshieke";
export const goodsStore = `defaultGoodsStore${appId}`; // 默认商品库(书城)
export const publicStore = `defaultPublicStore${appId}`; // 默认资源开放仓储
@@ -22,7 +22,6 @@
export const reg_tel =
  /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; // 电话号正则
export const reg_telphone = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/; //座机号正则
const config = {
  requestCtx,
@@ -39,6 +38,6 @@
  reg_telphone,
  epubUrl,
  pdfUrl,
  appId
  appId,
};
export default config;
packageBookService/pages/bookServices/detail/components/tree/index.js
@@ -1,5 +1,7 @@
const util = require("./components/util"); // 引入封装过的加载提示
import { loginInfo } from "../../../../../../assets/js/login";
import {
  loginInfo
} from "../../../../../../assets/js/login";
const app = getApp();
Component({
  // checked: false,
@@ -83,8 +85,7 @@
    handleList(tree) {
      for (let index = 0; index < tree.length; index++) {
        const item = tree[index];
        if (item.sysType == "CmsItem" && !item.checked) {
        }
        if (item.sysType == "CmsItem" && !item.checked) {}
        if (item.children && item.children.length > 0) {
          this.handleList(item.children);
        }
@@ -164,10 +165,9 @@
        ) {
          return wx.showToast({
            icon: "error",
            title:
              item.saleMethod[0].Price > 0
                ? "请先购买该资源"
                : "请先点击领取查看按钮",
            title: item.saleMethod[0].Price > 0 ?
              "请先购买该资源" :
              "请先点击领取查看按钮",
          });
        }
        wx.navigateTo({
@@ -383,13 +383,10 @@
        this.properties.treeList,
        citem.id
      );
      console.log(citem.checked, "citem.checked");
      if (!citem.checked) {
        //选中的时候添加id
        let sonPurchaseSaleMethodId = this.data.sonPurchaseSaleMethodId || [];
        console.log(this.properties.paymentPage, "this.properties.paymentPage");
        if (this.properties.paymentPage) {
          console.log(789987);
          sonPurchaseSaleMethodId = [];
          this.properties.paymentPage = false;
        }
@@ -437,13 +434,11 @@
        });
      } else {
        let query = {
          requests: [
            {
              saleMethodId: saleMethodId,
              storeEventId: null,
              // agentCode: '电子书'
            },
          ],
          requests: [{
            saleMethodId: saleMethodId,
            storeEventId: null,
            // agentCode: '电子书'
          }, ],
        };
        const addRes = await app.MG.store.addShoppingCart(query);
        console.log(addRes, "addRes");
@@ -461,4 +456,4 @@
  },
  catchtap() {},
});
});
packageBookService/pages/bookServices/examination/examination.js
@@ -1,4 +1,6 @@
import { getPublicImage } from "../../../../assets/js/middleGround/tool";
import {
  getPublicImage
} from "../../../../assets/js/middleGround/tool";
const app = getApp();
Page({
  /**
@@ -193,6 +195,12 @@
      },
    });
  },
  // 改变loading状态
  changeLoadingState() {
    this.setData({
      loading: true
    })
  },
  // 返回拦截
  beforeleave() {
    wx.showModal({
@@ -201,8 +209,7 @@
      confirmColor: "#ff6c00",
      cancelColor: "#949494",
      complete: (res) => {
        if (res.cancel) {
        }
        if (res.cancel) {}
        if (res.confirm) {
          this.setData({
            submitStatus: true,
@@ -456,6 +463,7 @@
      loading: true,
    });
    const child = this.selectComponent("#question-options");
    debugger
    if (
      this.data.answerType == "option" ||
      this.data.answerType == "errorQuestion" ||
@@ -505,16 +513,14 @@
        });
      }
      app.MG.identity.setUserKey({
        setKeyRequests: [
          {
            domain: "mockAnswerData",
            key: this.data.uuid,
            value: JSON.stringify({
              time: this.data.countdownTime,
              answerData: saveData,
            }),
          },
        ],
        setKeyRequests: [{
          domain: "mockAnswerData",
          key: this.data.uuid,
          value: JSON.stringify({
            time: this.data.countdownTime,
            answerData: saveData,
          }),
        }, ],
      });
      child.openTestReportDialog();
    }
@@ -633,16 +639,14 @@
      // 组卷模式
      // 清空答题记录
      await app.MG.identity.setUserKey({
        setKeyRequests: [
          {
            domain: "mockAnswerData",
            key: this.data.uuid,
            value: JSON.stringify({
              time: this.data.countdownTime,
              answerData: [],
            }),
          },
        ],
        setKeyRequests: [{
          domain: "mockAnswerData",
          key: this.data.uuid,
          value: JSON.stringify({
            time: this.data.countdownTime,
            answerData: [],
          }),
        }, ],
      });
      this.init();
    } else {
@@ -783,34 +787,26 @@
            // num: index, // 题号
            id: item.id,
            type: pathitem.name,
            stem:
              item.Embedded_QuestionBank_QuestionType == "completion"
                ? JSON.parse(item.Embedded_QuestionBank_Stem)
                    .stemTxt.replaceAll("<vacancy>", ",input,")
                    .split(",")
                : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
            stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
              JSON.parse(item.Embedded_QuestionBank_Stem)
              .stemTxt.replaceAll("<vacancy>", ",input,")
              .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
            answer: item.Embedded_QuestionBank_Answer, // 答案
            option: item.Embedded_QuestionBank_Option
              ? JSON.parse(item.Embedded_QuestionBank_Option)
              : "", // 选择题选项
            option: item.Embedded_QuestionBank_Option ?
              JSON.parse(item.Embedded_QuestionBank_Option) : "", // 选择题选项
            analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 解析
            questionType: item.Embedded_QuestionBank_QuestionType, // 题型
            optionStyle: item.Embedded_QuestionBank_OptionStyle, // 选项显示类型
            stemStyle: item.Embedded_QuestionBank_StemStyle, // 题干显示类型
            difficulty: item.Embedded_QuestionBank_Difficulty
              ? 4 - item.Embedded_QuestionBank_Difficulty
              : 0, // 难度等级
            userAnswer: oldObj
              ? oldObj.userAnswer
              : item.Embedded_QuestionBank_QuestionType == "completion" ||
                item.Embedded_QuestionBank_QuestionType == "multipleChoice"
              ? []
              : "",
            difficulty: item.Embedded_QuestionBank_Difficulty ?
              4 - item.Embedded_QuestionBank_Difficulty : 0, // 难度等级
            userAnswer: oldObj ?
              oldObj.userAnswer : item.Embedded_QuestionBank_QuestionType == "completion" ||
              item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
            isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.userAnswer) : false,
            isRight: oldObj ? oldObj.isRight : null,
            isComplete: oldObj ? oldObj.isComplete : false,
            isCollect:
              this.data.collectList.indexOf(item.id) > -1 ? true : false,
            isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false,
            isUnfold: "", // 控制解析的折叠面板是否展开
          };
          // 多选和填空答案肯为数组,要转换JSON格式
@@ -859,8 +855,8 @@
            questionObj.option.forEach((item) => {
              if (item.txt)
                item.txt = item.txt
                  .replace(/\<img/gi, '<img class="option-rich-img"')
                  .replace(/\<p/gi, '<p class="stem-rich-p"');
                .replace(/\<img/gi, '<img class="option-rich-img"')
                .replace(/\<p/gi, '<p class="stem-rich-p"');
            });
          }
          // 解析富文本处理
@@ -1047,13 +1043,11 @@
      // 记录错题
      app.MG.identity
        .setUserKey({
          setKeyRequests: [
            {
              domain: "errorData",
              key: this.data.rootCmsItemId,
              value: JSON.stringify(this.data.errorList),
            },
          ],
          setKeyRequests: [{
            domain: "errorData",
            key: this.data.rootCmsItemId,
            value: JSON.stringify(this.data.errorList),
          }, ],
        })
        .then((res) => {
          console.log(res);
@@ -1111,13 +1105,11 @@
    }
    app.MG.identity
      .setUserKey({
        setKeyRequests: [
          {
            domain: "collectData",
            key: this.data.rootCmsItemId,
            value: JSON.stringify(this.data.collectList),
          },
        ],
        setKeyRequests: [{
          domain: "collectData",
          key: this.data.rootCmsItemId,
          value: JSON.stringify(this.data.collectList),
        }, ],
      })
      .then((res) => {});
  },
@@ -1156,17 +1148,15 @@
  setAnswerInfo(data) {
    app.MG.identity
      .setUserKey({
        setKeyRequests: [
          {
            domain: "answerData",
            key: this.data.productLinkPath,
            value: JSON.stringify(data),
          },
        ],
        setKeyRequests: [{
          domain: "answerData",
          key: this.data.productLinkPath,
          value: JSON.stringify(data),
        }, ],
      })
      .then((res) => {});
  },
  // 获取答题数据
  // 获取旧答题数据
  getAnswerInfo(callback) {
    app.MG.identity
      .getUserKey({
@@ -1177,7 +1167,7 @@
        if (callback) callback(res);
      });
  },
  // 删除答题数据
  // 删除旧答题数据
  delAnswerInfo(callback) {
    app.MG.identity
      .delUserKey({
@@ -1230,8 +1220,7 @@
  async getCollectDataList() {
    let questionArr = [];
    this.setData({
      cardList: [
        {
      cardList: [{
          catalogName: "单选题",
          infoList: [],
        },
@@ -1285,28 +1274,21 @@
          const questionObj = {
            number: index + 1, // 题号
            id: item.id,
            stem:
              item.Embedded_QuestionBank_QuestionType == "completion"
                ? JSON.parse(item.Embedded_QuestionBank_Stem)
                    .stemTxt.replaceAll("<vacancy>", ",input,")
                    .split(",")
                : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
            stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
              JSON.parse(item.Embedded_QuestionBank_Stem)
              .stemTxt.replaceAll("<vacancy>", ",input,")
              .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
            answer: item.Embedded_QuestionBank_Answer, // 答案
            option: item.Embedded_QuestionBank_Option
              ? JSON.parse(item.Embedded_QuestionBank_Option)
              : "", // 选择题选项
            option: item.Embedded_QuestionBank_Option ?
              JSON.parse(item.Embedded_QuestionBank_Option) : "", // 选择题选项
            analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 解析
            questionType: item.Embedded_QuestionBank_QuestionType, // 题型
            optionStyle: item.Embedded_QuestionBank_OptionStyle, // 选项显示类型
            stemStyle: item.Embedded_QuestionBank_StemStyle, // 题干显示类型
            difficulty: item.Embedded_QuestionBank_Difficulty
              ? 4 - item.Embedded_QuestionBank_Difficulty
              : 0, // 难度等级
            userAnswer:
              item.Embedded_QuestionBank_QuestionType == "completion" ||
              item.Embedded_QuestionBank_QuestionType == "multipleChoice"
                ? []
                : "",
            difficulty: item.Embedded_QuestionBank_Difficulty ?
              4 - item.Embedded_QuestionBank_Difficulty : 0, // 难度等级
            userAnswer: item.Embedded_QuestionBank_QuestionType == "completion" ||
              item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
            isSubmit: false, // 查看解析
            isRight: null, // 是否正确
            isComplete: false,
@@ -1377,9 +1359,19 @@
            questionObj.option.forEach((item) => {
              if (item.txt)
                item.txt = item.txt
                  .replace(/\<img/gi, '<img class="option-rich-img"')
                  .replace(/\<p/gi, '<p class="stem-rich-p"');
                .replace(/\<img/gi, '<img class="option-rich-img"')
                .replace(/\<p/gi, '<p class="stem-rich-p"');
            });
          }
          // 解析富文本处理
          if (
            questionObj.analysisCon &&
            typeof questionObj.analysisCon == "string"
          ) {
            questionObj.analysisCon = questionObj.analysisCon.replace(
              /\<img/gi,
              '<img style="max-width: 300rpx !important;object-fit: contain;" class="stem-rich-img" '
            );
          }
          if (item.Embedded_QuestionBank_QuestionType == "judge") {
            questionObj.type = "判断题";
@@ -1467,8 +1459,7 @@
  // 获取错题集
  async getErrorDataList() {
    this.setData({
      cardList: [
        {
      cardList: [{
          catalogName: "单选题",
          infoList: [],
        },
@@ -1520,28 +1511,21 @@
        const questionObj = {
          number: index + 1, // 题号
          id: item.id,
          stem:
            item.Embedded_QuestionBank_QuestionType == "completion"
              ? JSON.parse(item.Embedded_QuestionBank_Stem)
                  .stemTxt.replaceAll("<vacancy>", ",input,")
                  .split(",")
              : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
          stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
            JSON.parse(item.Embedded_QuestionBank_Stem)
            .stemTxt.replaceAll("<vacancy>", ",input,")
            .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
          answer: item.Embedded_QuestionBank_Answer, // 答案
          option: item.Embedded_QuestionBank_Option
            ? JSON.parse(item.Embedded_QuestionBank_Option)
            : "", // 选择题选项
          option: item.Embedded_QuestionBank_Option ?
            JSON.parse(item.Embedded_QuestionBank_Option) : "", // 选择题选项
          analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 解析
          questionType: item.Embedded_QuestionBank_QuestionType, // 题型
          optionStyle: item.Embedded_QuestionBank_OptionStyle, // 选项显示类型
          stemStyle: item.Embedded_QuestionBank_StemStyle, // 题干显示类型
          difficulty: item.Embedded_QuestionBank_Difficulty
            ? 4 - item.Embedded_QuestionBank_Difficulty
            : 0, // 难度等级
          userAnswer:
            item.Embedded_QuestionBank_QuestionType == "completion" ||
            item.Embedded_QuestionBank_QuestionType == "multipleChoice"
              ? []
              : "",
          difficulty: item.Embedded_QuestionBank_Difficulty ?
            4 - item.Embedded_QuestionBank_Difficulty : 0, // 难度等级
          userAnswer: item.Embedded_QuestionBank_QuestionType == "completion" ||
            item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
          isSubmit: false, // 查看解析
          isRight: null, // 是否正确
          isComplete: false,
@@ -1614,9 +1598,19 @@
          questionObj.option.forEach((item) => {
            if (item.txt)
              item.txt = item.txt
                .replace(/\<img/gi, '<img class="option-rich-img"')
                .replace(/\<p/gi, '<p class="stem-rich-p"');
              .replace(/\<img/gi, '<img class="option-rich-img"')
              .replace(/\<p/gi, '<p class="stem-rich-p"');
          });
        }
        // 解析富文本处理
        if (
          questionObj.analysisCon &&
          typeof questionObj.analysisCon == "string"
        ) {
          questionObj.analysisCon = questionObj.analysisCon.replace(
            /\<img/gi,
            '<img style="max-width: 300rpx !important;object-fit: contain;" class="stem-rich-img" '
          );
        }
        if (item.Embedded_QuestionBank_QuestionType == "judge") {
          questionObj.type = "判断题";
@@ -1798,35 +1792,27 @@
            id: item.id,
            score: pathitem.infoList.find((infoItem) => infoItem.id == item.id)
              .score,
            stem:
              item.Embedded_QuestionBank_QuestionType == "completion"
                ? JSON.parse(item.Embedded_QuestionBank_Stem)
                    .stemTxt.replaceAll("<vacancy>", ",input,")
                    .split(",")
                : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
            stem: item.Embedded_QuestionBank_QuestionType == "completion" ?
              JSON.parse(item.Embedded_QuestionBank_Stem)
              .stemTxt.replaceAll("<vacancy>", ",input,")
              .split(",") : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干
            answer: item.Embedded_QuestionBank_Answer, // 答案
            option: item.Embedded_QuestionBank_Option
              ? JSON.parse(item.Embedded_QuestionBank_Option)
              : "", // 选择题选项
            option: item.Embedded_QuestionBank_Option ?
              JSON.parse(item.Embedded_QuestionBank_Option) : "", // 选择题选项
            analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 解析
            questionType: item.Embedded_QuestionBank_QuestionType, // 题型
            optionStyle: item.Embedded_QuestionBank_OptionStyle, // 选项显示类型
            stemStyle: item.Embedded_QuestionBank_StemStyle, // 题干显示类型
            difficulty: item.Embedded_QuestionBank_Difficulty
              ? 4 - item.Embedded_QuestionBank_Difficulty
              : 0, // 难度等级
            userAnswer: oldObj
              ? oldObj.answer
              : item.Embedded_QuestionBank_QuestionType == "completion" ||
                item.Embedded_QuestionBank_QuestionType == "multipleChoice"
              ? []
              : "",
            isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.userAnswer) : false,
            difficulty: item.Embedded_QuestionBank_Difficulty ?
              4 - item.Embedded_QuestionBank_Difficulty : 0, // 难度等级
            userAnswer: oldObj ?
              oldObj.answer : item.Embedded_QuestionBank_QuestionType == "completion" ||
              item.Embedded_QuestionBank_QuestionType == "multipleChoice" ? [] : "",
            isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.answer) : false,
            isRight: oldObj ? oldObj.isRight : null,
            // isComplete: oldObj ? oldObj.isComplete : false,
            isComplete: this.data.mockData.state == "3" ? true : false,
            isCollect:
              this.data.collectList.indexOf(item.id) > -1 ? true : false,
            isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false,
            isUnfold: "", // 控制解析的折叠面板是否展开
          };
          // 多选和填空答案肯为数组,要转换JSON格式
@@ -1957,26 +1943,22 @@
  // 记录购买组卷时间
  setMockInfo(data) {
    app.MG.identity.setUserKey({
      setKeyRequests: [
        {
          domain: "mockData",
          key: this.data.bookId + "",
          value: JSON.stringify(data),
        },
      ],
      setKeyRequests: [{
        domain: "mockData",
        key: this.data.bookId + "",
        value: JSON.stringify(data),
      }, ],
    });
  },
  // 记录组卷题目列表
  saveMockQuestionList(data) {
    app.MG.identity
      .setUserKey({
        setKeyRequests: [
          {
            domain: "mockQuestionData",
            key: this.data.uuid,
            value: JSON.stringify(data),
          },
        ],
        setKeyRequests: [{
          domain: "mockQuestionData",
          key: this.data.uuid,
          value: JSON.stringify(data),
        }, ],
      })
      .then((res) => {
        console.log("模考题目列表已记录");
@@ -2008,9 +1990,8 @@
          this.setData({
            currentIndex: JSON.parse(res[0].value).currentIndex,
            "mockData.time": JSON.parse(res[0].value).time,
            countdownTime: JSON.parse(res[0].value).time
              ? JSON.parse(res[0].value).time
              : this.data.mockData.sumTime,
            countdownTime: JSON.parse(res[0].value).time ?
              JSON.parse(res[0].value).time : this.data.mockData.sumTime,
            "mockData.answer": JSON.parse(res[0].value).answerData,
          });
          console.log(JSON.parse(res[0].value));
@@ -2054,17 +2035,15 @@
    //
    app.MG.identity
      .setUserKey({
        setKeyRequests: [
          {
            domain: "mockAnswerData",
            key: this.data.uuid,
            value: JSON.stringify({
              currentIndex: this.data.currentIndex,
              time: this.data.countdownTime,
              answerData: saveData,
            }),
          },
        ],
        setKeyRequests: [{
          domain: "mockAnswerData",
          key: this.data.uuid,
          value: JSON.stringify({
            currentIndex: this.data.currentIndex,
            time: this.data.countdownTime,
            answerData: saveData,
          }),
        }, ],
      })
      .then((res) => {
        this.setData({
@@ -2110,4 +2089,4 @@
    );
    return newContent;
  },
});
});
packageBookService/pages/bookServices/examination/examination.wxml
@@ -67,7 +67,11 @@
<!-- 底部区域-->
<view class="page-bottom" style="background-color:{{isNight ? '#202020' : ''}}">
<view
  class="page-bottom"
  style="background-color:{{isNight ? '#202020' : ''}}"
  wx:if="{{answerType == 'mock' ||  answerType == 'option' || (answerType == 'errorQuestion' && !loading) || (answerType == 'collectQuestion' && !loading) }}"
>
  <question-options
    id="question-options"
    isNight="{{isNight}}"
@@ -88,6 +92,7 @@
    bind:goQuestion="goQuestion"
    bind:changeBGColor="changeBGColor"
    bind:onChangeSlider="onChangeSlider"
    bind:changeLoadingState="changeLoadingState"
  ></question-options>
</view>
packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -140,14 +140,14 @@
                    style="display: flex; align-items: center; width: 100%"
                  ></rich-text>
                </view>
                <text
                <!-- <text
                  wx:if="{{submitStatus && (item.answer == contentItem.value && item.answer == item.userAnswer)}}"
                  >对</text
                >
                <text
                  wx:if="{{ submitStatus && (item.userAnswer == contentItem.value && item.userAnswer != item.answer)}}"
                  >错</text
                >
                > -->
              </view>
            </t-radio>
          </view>
@@ -259,7 +259,7 @@
        class="analysis"
        wx:if="{{item.isComplete && (item.questionType == 'singleChoice' || item.questionType == 'judge' || item.questionType == 'multipleChoice')}}"
      >
        <view class="analysis-answer">
        <view class="analysis-answer {{sliderValue >35 ? 'fl-cl' : '' }}">
          <view
            class="answer-correct answer-center"
            style="font-size: {{sliderValue || 32}}rpx;"
@@ -271,7 +271,7 @@
            ></rich-text>
          </view>
          <view
            class="answer-center marginL {{item.isRight ? 'answer-correct' : 'answer-error'}}"
            class="answer-center  {{item.isRight ? 'answer-correct' : 'answer-error'}}  {{sliderValue <= 35 ? 'marginL' : ''}}"
            wx:if="{{item.questionType !== 'shortAnswer'}}"
          >
            <text
@@ -290,7 +290,11 @@
          wx:if="{{item.analysisCon}}"
          style="color: {{isNight ? '#fff' : '#000'}};"
        >
          <text style="font-size: {{sliderValue || 32}}rpx;" class="answer-analysis">答案解析:</text>
          <text
            style="font-size: {{sliderValue || 32}}rpx;"
            class="answer-analysis"
            >答案解析:</text
          >
          <rich-text
            style="font-size: {{sliderValue || 32}}rpx;"
            nodes="{{item.analysisCon}}"
@@ -315,7 +319,7 @@
          <text
            wx:if="{{item.questionType == 'shortAnswer'}}"
            class="short-answer-fz"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
          >
            参考答案:
          </text>
@@ -338,7 +342,7 @@
        >
          <text
            class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}"
            style="font-size:{{sliderValue || 28}}rpx;"
            style="font-size:{{sliderValue || 32}}rpx;"
            >您的答案:</text
          >
          <view
@@ -350,7 +354,7 @@
        <view class="short-answer-mr" style="margin-bottom: 50rpx">
          <text
            class="short-answer-fz;"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;"
            style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
            >答案解析:</text
          >
          <rich-text
@@ -359,11 +363,6 @@
          ></rich-text>
        </view>
      </view>
    </swiper-item>
    <swiper-item
      wx:if="{{answerType !== 'collectQuestion' && questionList.length}}"
    >
      <text>没有更多了。。。</text>
    </swiper-item>
    <swiper-item wx:if="{{!questionList.length}}">
      <view class="noData">
packageBookService/pages/bookServices/examination/questionList/index.wxss
@@ -270,4 +270,9 @@
.answer-analysis {
  display: inline-block;
  width: 192rpx;
}
.fl-cl {
  display: flex;
  flex-direction: column;
}
packageBookService/pages/bookServices/examination/questionOptions/index.js
@@ -85,7 +85,7 @@
      if (
        newValue == 0 &&
        (this.properties.answerType == "option" ||
          this.properties.answerType == "mock")
          this.properties.answerType == "mock") && !this.properties.submitStatus
      ) {
        this.timeout();
      }
@@ -172,7 +172,9 @@
    onChangeSlider(e) {
      const value = e.detail.value;
      console.log(value);
      this.triggerEvent("onChangeSlider", { value });
      this.triggerEvent("onChangeSlider", {
        value
      });
    },
    // 设置遮罩层点击
    onSetUpChange(e) {
@@ -191,7 +193,9 @@
        frontColor: "#222",
      });
      this.triggerEvent("changeBGColor", { value });
      this.triggerEvent("changeBGColor", {
        value
      });
    },
    // 重做按钮
    resterBtn() {
@@ -244,7 +248,7 @@
        this.properties.answerType == "errorQuestion"
      ) {
        this.submitPaper();
        return wx.navigateBack();
        // wx.navigateBack();
      } else if (
        this.properties.answerType == "option" ||
        this.properties.answerType == "mock"
@@ -305,4 +309,4 @@
      this.submitPaper();
    },
  },
});
});
packageBookService/pages/bookServices/examination/questionOptions/index.wxml
@@ -67,11 +67,17 @@
      <view class="popup-title">答题卡</view>
    </view>
    <view class="question-explain">
      <view class="explain-answered">
      <view
        class="explain-answered"
        wx:if="{{answerType == 'collectQuestion' || answerType == 'errorQuestion' || (answerType == 'option' && !submitStatus) || (answerType == 'mock' && !submitStatus)}}"
      >
        <text class="answered explain-color-box"></text>
        <text>已答</text>
      </view>
      <view class="explain-un-answered">
      <view
        class="explain-un-answered"
        wx:if="{{answerType == 'collectQuestion' || answerType == 'errorQuestion' || (answerType == 'option' && !submitStatus) || (answerType == 'mock' && !submitStatus)}}"
      >
        <text class="un-answered explain-color-box"></text>
        <text>未答</text>
      </view>
packageBookService/pages/bookServices/examination/questionOptions/index.wxss
@@ -137,13 +137,13 @@
}
.error-box-color {
  background-color: #EE1818;
  color: #fff;
  background-color: #EE1818 !important;
  color: #fff !important;
}
.correct-box-color {
  background-color: #1FBC1F;
  color: #fff;
  background-color: #1FBC1F !important;
  color: #fff !important;
}
.un-answered {
packageBookService/pages/bookServices/examination/questionSchedule/index.wxml
@@ -21,7 +21,9 @@
      class="remainder"
      wx:if="{{!submitStatus && (answerType == 'option' || answerType == 'mock')}}"
      style="color:  {{isNight ? '#fff' : '#000'}};"
      >剩余时间 <text class="parimary-color">{{showTime}}</text></view
    >
      <text>剩余时间 </text>
      <text class="parimary-color">{{showTime}}</text></view
    >
  </view>
  <!-- 进度条 -->