ソースを参照

修改判断题正确和错误的显示

xuqiaoying 3 年 前
コミット
1971bdc5d0

+ 6 - 6
common/request.js

@@ -4,21 +4,21 @@ import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
 //接口api   
-export const BASE_URL = 'https://api.xyyxt.net'   //release
+// export const BASE_URL = 'https://api.xyyxt.net'   //release
 // export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地
 // export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地
 
  //图片上传api
-export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
-// export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
+// export const BASE_IMG_URL = 'https://file.xyyxt.net/'     //release
+export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // web_view的
-export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release
-// export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
+// export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release
+export const WEBVIEW_URL = 'https://testm.xyyxt.net/'  //预发布
 // export const WEBVIEW_URL = 'http://120.79.166.78:18001/' // 测试环境
 // export const WEBVIEW_URL = 'http://api.xyyxt.net:6066/'  //预发布(弃用了)
 

+ 17 - 14
pages2/bank/questionBank.vue

@@ -227,11 +227,14 @@
                   class="lisSty"
                   @click="judgeSelect(index, bankIndex)"
                 >
+                <!-- right: bankType == 1 && (index == bank.ques || index == bank.ans),
+                      wrong: bankType == 1 && (index == bank.ques && bank.ques != bank.ans),
+                      user_choose: bankType == 2 && (index == bank.ques), -->
                   <text
                     :class="{
-                      right: bankType == 1 && (index == bank.ques || index == bank.ans),
-                      wrong: bankType == 1 && (index == bank.ques && bank.ques != bank.ans),
-                      user_choose: bankType == 2 && (index == bank.ques),
+                      right: bankType == 1 && ((index + 1) == bank.ques || (index + 1) == bank.ans),
+                      wrong: bankType == 1 && ((index - 1) == bank.ques && bank.ques == bank.ans),
+                      user_choose: bankType == 2 && (index == (bank.ques == 1 ? 0 : 1)),
                     }"
                     class="activeTI"
                   >
@@ -253,7 +256,7 @@
             <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view>我的答案:{{ ast[bank.ques] }}</view>
+                <view>我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -592,12 +595,12 @@
                       <text
                         :class="{
                           right:
-                            bankType == 1 && (childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex]),
+                            bankType == 1 && ((childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex]),
                           wrong:
-                            bankType == 1 && (childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex]),
-                          user_choose: bankType == 2 && (childindex == bank.ques[ansIndex]),
+                            bankType == 1 && ((childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (childindex == (bank.ques[ansIndex] == 1 ? 0 : 1)),
                         }"
                         class="activeTI"
                       >
@@ -619,7 +622,7 @@
                 <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
-                    <view>我的答案:{{ ast[bank.ques[ansIndex]] }}</view>
+                    <view>我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view>
                   </view>
                   <view class="pad_8 answerInfos">
                     <view class="answerTitle">答案解析</view>
@@ -888,7 +891,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       ans: [],
       ques: [],
       show: false,
@@ -1879,8 +1882,8 @@ export default {
       // if (this.questionList[bindex].ques) return;
       if (this.questionList[bindex].ques && this.bankType == 1) {
         return
-      }
-      this.$set(this.questionList[bindex], "ques", index + "");
+      }// 答案: 判断题1正确 0错误
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
       this.isDoOver();
       // 回答错误
       // if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
@@ -1919,7 +1922,7 @@ export default {
       if (this.questionList[bindex].ques[ansindex] && this.bankType == 1) {
         return
       }
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
       this.isDoOver();
     },
 

+ 20 - 11
pages2/bank/questionBankContinue.vue

@@ -218,10 +218,12 @@
                   :key="index"
                   class="lisSty"
                 >
+                <!-- right: index == bank.ques || index == bank.ans,
+                      wrong: index == bank.ques && bank.ques != bank.ans, -->
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -240,7 +242,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view>我的答案:{{ ast[bank.ques] || "" }}</view>
+                <view>我的答案:{{ ast[bank.ques == 1 ? 0 : 1] || "" }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -563,14 +565,20 @@
                       :key="childindex"
                       class="lisSty"
                     >
-                      <text
-                        :class="{
-                          right:
+                    <!-- right:
                             childindex == bank.ques[ansIndex] ||
                             childindex == bank.ans[ansIndex],
                           wrong:
                             childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bank.ques[ansIndex] != bank.ans[ansIndex], -->
+                      <text
+                        :class="{
+                          right:
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
+                          wrong:
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -591,7 +599,7 @@
                 <view v-if="bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
-                    <view>我的答案:{{ ast[bank.ques[ansIndex]] || "" }}</view>
+                    <view>我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] || "" }}</view>
                   </view>
                   <view class="pad_8 answerInfos">
                     <view class="answerTitle">答案解析</view>
@@ -822,7 +830,7 @@ export default {
       showpopups: false,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       bankList: [],
@@ -1404,13 +1412,14 @@ export default {
 
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
+      console.log('this.questionList[bindex]', this.questionList[bindex].ques, this.questionList[bindex])
       this.isDoOver();
     },
 
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
       this.isDoOver();
     },
 

+ 11 - 11
pages2/bank/questionBankExplainDetail.vue

@@ -223,8 +223,8 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -245,7 +245,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view v-if="!explain">我的答案:{{ ast[bank.ques] }}</view>
+                <view v-if="!explain">我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -566,11 +566,11 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -593,7 +593,7 @@
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
                     <view v-if="!explain"
-                      >我的答案:{{ ast[bank.ques[ansIndex]] }}</view
+                      >我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view
                     >
                   </view>
                   <view class="pad_8 answerInfos">
@@ -773,7 +773,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       bankList: [],
@@ -1477,12 +1477,12 @@ export default {
 
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
     },
 
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
     },
 
     openFooterTab() {

+ 11 - 11
pages2/bank/questionBankTest.vue

@@ -215,8 +215,8 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -238,7 +238,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view>我的答案:{{ ast[bank.ques] }}</view>
+                <view>我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -551,11 +551,11 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -577,7 +577,7 @@
                 <view v-if="bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
-                    <view>我的答案:{{ ast[bank.ques[ansIndex]] }}</view>
+                    <view>我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view>
                   </view>
                   <view class="pad_8 answerInfos">
                     <view class="answerTitle">答案解析:</view>
@@ -743,7 +743,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       bankList: [],
@@ -1000,7 +1000,7 @@ export default {
      */
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
     },
 
     /**
@@ -1011,7 +1011,7 @@ export default {
      */
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
     },
 
     openFooterTab() {

+ 13 - 13
pages2/class/questionBank.vue

@@ -187,9 +187,9 @@
                 >
                   <text
                     :class="{
-                      right: bankType == 1 && (index == bank.ques || index == bank.ans),
-                      wrong: bankType == 1 && (index == bank.ques && bank.ques != bank.ans),
-                      user_choose: bankType == 2 && (index == bank.ques),
+                      right: bankType == 1 && ((index + 1) == bank.ques || (index + 1)  == bank.ans),
+                      wrong: bankType == 1 && ((index - 1)  == bank.ques && bank.ques == bank.ans),
+                      user_choose: bankType == 2 && (index == (bank.ques == 1 ? 0 : 1)),
                     }"
                     class="activeTI"
                   >
@@ -204,7 +204,7 @@
             <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view>我的答案:{{ ast[bank.ques] }}</view>
+                <view>我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -503,12 +503,12 @@
                       <text
                         :class="{
                           right:
-                            bankType == 1 && (childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex]),
+                            bankType == 1 && ((childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1)  == bank.ans[ansIndex]),
                           wrong:
-                            bankType == 1 && (childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex]),
-                          user_choose: bankType == 2 && (childindex == bank.ques[ansIndex]),
+                            bankType == 1 && ((childindex - 1)  == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (childindex == (bank.ques[ansIndex] == 1 ? 0 : 1)),
                         }"
                         class="activeTI"
                       >
@@ -523,7 +523,7 @@
                 <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
-                    <view>我的答案:{{ ast[bank.ques[ansIndex]] }}</view>
+                    <view>我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view>
                   </view>
                   <view class="pad_8 answerInfos">
                     <view class="answerTitle">答案解析</view>
@@ -822,7 +822,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       ans: [],
       ques: [],
       show: false,
@@ -1987,7 +1987,7 @@ export default {
       if (this.questionList[bindex].ques && this.bankType == 1) {
         return
       }
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
       this.isDoOver();
     },
 
@@ -2002,7 +2002,7 @@ export default {
       if (this.questionList[bindex].ques[ansindex] && this.bankType == 1) {
         return
       }
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
       this.isDoOver();
     },
 

+ 11 - 11
pages2/subject/collectBank.vue

@@ -215,8 +215,8 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -237,7 +237,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view v-if="!explain">我的答案:{{ ast[bank.ques] }}</view>
+                <view v-if="!explain">我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -539,11 +539,11 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -565,7 +565,7 @@
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
                     <view v-if="!explain"
-                      >我的答案:{{ ast[bank.ques[ansIndex]] }}</view
+                      >我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view
                     >
                   </view>
                   <view class="pad_8 answerInfos">
@@ -713,7 +713,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       bankList: [],
@@ -987,12 +987,12 @@ export default {
 
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
     },
 
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
     },
 
     openFooterTab() {

+ 11 - 11
pages2/subject/collectTypeBank.vue

@@ -211,8 +211,8 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -233,7 +233,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view v-if="!explain">我的答案:{{ ast[bank.ques] }}</view>
+                <view v-if="!explain">我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -529,11 +529,11 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -555,7 +555,7 @@
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
                     <view v-if="!explain"
-                      >我的答案:{{ ast[bank.ques[ansIndex]] }}</view
+                      >我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view
                     >
                   </view>
                   <view class="pad_8 answerInfos">
@@ -699,7 +699,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       bankList: [],
@@ -978,12 +978,12 @@ export default {
 
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
     },
 
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
     },
 
     openFooterTab() {

+ 11 - 11
pages2/subject/wrongBank.vue

@@ -213,8 +213,8 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -235,7 +235,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view v-if="!explain">我的答案:{{ ast[bank.ques] }}</view>
+                <view v-if="!explain">我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -533,11 +533,11 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -559,7 +559,7 @@
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
                     <view v-if="!explain"
-                      >我的答案:{{ ast[bank.ques[ansIndex]] }}</view
+                      >我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view
                     >
                   </view>
                   <view class="pad_8 answerInfos">
@@ -710,7 +710,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       isFromReport: "", //来自答题报告
@@ -1141,7 +1141,7 @@ export default {
 
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
 
       // 回答错误
       if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
@@ -1158,7 +1158,7 @@ export default {
 
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
     },
 
     openFooterTab() {

+ 11 - 11
pages2/subject/wrongTypeBank.vue

@@ -211,8 +211,8 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      right: (index + 1) == bank.ques || (index + 1) == bank.ans,
+                      wrong: (index - 1) == bank.ques && bank.ques == bank.ans,
                     }"
                     class="activeTI"
                     >{{ ast[index] }}</text
@@ -233,7 +233,7 @@
             <view v-if="bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view v-if="!explain">我的答案:{{ ast[bank.ques] }}</view>
+                <view v-if="!explain">我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -532,11 +532,11 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            (childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex],
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            (childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex],
                         }"
                         class="activeTI"
                         >{{ ast[childindex] }}</text
@@ -558,7 +558,7 @@
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
                     <view v-if="!explain"
-                      >我的答案:{{ ast[bank.ques[ansIndex]] }}</view
+                      >我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view
                     >
                   </view>
                   <view class="pad_8 answerInfos">
@@ -708,7 +708,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       show: false,
       showDialog: false,
       bankList: [],
@@ -1015,7 +1015,7 @@ export default {
 
     judgeSelect(index, bindex) {
       if (this.questionList[bindex].ques) return;
-      this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", index == 0 ? '1' : '0');
 
       // 回答错误
       if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
@@ -1032,7 +1032,7 @@ export default {
 
     judgeSelectChild(ansindex, childindex, bindex) {
       if (this.questionList[bindex].ques[ansindex]) return;
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
     },
 
     openFooterTab() {

+ 16 - 13
pages5/examBank/index.vue

@@ -229,9 +229,9 @@
                 >
                   <text
                     :class="{
-                      right: bankType == 1 && (index == bank.ques || index == bank.ans),
-                      wrong: bankType == 1 && (index == bank.ques && bank.ques != bank.ans),
-                      user_choose: bankType == 2 && (index == bank.ques),
+                      right: bankType == 1 && ((index + 1) == bank.ques || (index + 1)  == bank.ans),
+                      wrong: bankType == 1 && ((index - 1)  == bank.ques && bank.ques == bank.ans),
+                      user_choose: bankType == 2 && (index == (bank.ques == 1 ? 0 : 1)),
                     }"
                     class="activeTI"
                   >
@@ -253,7 +253,7 @@
             <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
-                <view>我的答案:{{ ast[bank.ques] }}</view>
+                <view>我的答案:{{ ast[bank.ques == 1 ? 0 : 1] }}</view>
               </view>
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析</view>
@@ -592,12 +592,12 @@
                       <text
                         :class="{
                           right:
-                            bankType == 1 && (childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex]),
+                            bankType == 1 && ((childindex + 1) == bank.ques[ansIndex] ||
+                            (childindex + 1) == bank.ans[ansIndex]),
                           wrong:
-                            bankType == 1 && (childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex]),
-                          user_choose: bankType == 2 && (childindex == bank.ques[ansIndex]),
+                            bankType == 1 && ((childindex - 1) == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] == bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (childindex == (bank.ques[ansIndex] == 1 ? 0 : 1)),
                         }"
                         class="activeTI"
                       >
@@ -619,7 +619,7 @@
                 <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex]] }}</view>
-                    <view>我的答案:{{ ast[bank.ques[ansIndex]] }}</view>
+                    <view>我的答案:{{ ast[bank.ques[ansIndex] == 1 ? 0 : 1] }}</view>
                   </view>
                   <view class="pad_8 answerInfos">
                     <view class="answerTitle">答案解析</view>
@@ -883,7 +883,7 @@ export default {
       current: 0,
       questionList: [],
       ast: ["A", "B", "C", "D", "E", "F", "G"],
-      judge: ["错误", "正确"],
+      judge: ["正确", "错误"],
       ans: [],
       ques: [],
       show: false,
@@ -1846,7 +1846,10 @@ export default {
       if (this.questionList[bindex].ques && this.bankType == 1) {
         return
       }
-      this.$set(this.questionList[bindex], "ques", index + "");
+      // 答案: 判断题1正确 0错误
+      let value = index == 0 ? '1' : '0'
+      // this.$set(this.questionList[bindex], "ques", index + "");
+      this.$set(this.questionList[bindex], "ques", value)
       this.isDoOver();
     },
 
@@ -1861,7 +1864,7 @@ export default {
       if (this.questionList[bindex].ques[ansindex] && this.bankType == 1) {
         return
       }
-      this.$set(this.questionList[bindex].ques, ansindex, childindex + "");
+      this.$set(this.questionList[bindex].ques, ansindex, childindex == 0 ? '1' : '0');
       this.isDoOver();
     },