xuqiaoying 3 tahun lalu
induk
melakukan
a0a185b8e8

+ 8 - 11
components/bank-exam/bankExam.vue

@@ -1231,17 +1231,14 @@ export default {
 		  this.$set(this.questionList[bindex], "ques", arr);
 		  this.isDoOver();
 		
-		//   let isWrong = this.questionList[bindex].ques.some(
-		//     (quesItem, quesIndex) => {
-		//       return (
-		//         this.questionList[bindex].ques[quesIndex] !=
-		//         this.questionList[bindex].ans[quesIndex]
-		//       );
-		//     }
-		//   );
-		  	let isWrong = this.questionList[bindex].ques.some((item, i) => {
-			return this.questionList[bindex].ans.indexOf(item) == -1;
-			})
+		  let isWrong = this.questionList[bindex].ques.some(
+		    (quesItem, quesIndex) => {
+		      return (
+		        this.questionList[bindex].ques[quesIndex] !=
+		        this.questionList[bindex].ans[quesIndex]
+		      );
+		    }
+		  );
 		  // 回答错误
 		  if (isWrong) {
 		    this.$api

+ 27 - 8
pages/course/index.vue

@@ -10,7 +10,8 @@
 				<view class="bg_color"></view>
 				<view class="check_ck">
 					<view class="checked">
-						<view class="check_title">{{selObj.eName}}:{{selObj.pName}}-{{selObj.bName}}</view>
+						<!-- {{selObj.pName}}-{{selObj.bName}} -->
+						<view class="check_title">{{selObj.eName}}:{{ selObj.aliasName }}</view>
 						<view class="again_ck" @click="openLeft()">
 							<view style="color: #007AFF;font-size: 32rpx;">重新选择</view>
 							<u-icon name="list" color="#007AFF" size="40"></u-icon>
@@ -67,11 +68,13 @@
 								<text class="margin30">课程</text>
 								<text class="blackFont">{{item.classHours || '-'}}</text> 学时</view>
 								<view>
-									<text class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+									<text v-if="item.standPrice" class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+									<text v-else class="priceTag free">免费</text>
 									<text v-if="item.linePrice" class="sale">¥ </text>
 									<text v-if="item.linePrice" class="price_line"> {{ item.linePrice }}</text>
 								</view>
 								
+								
 							</view>
 						</view>
 					</navigator>
@@ -88,11 +91,13 @@
 								<view class="titleTag" style="display: flex;justify-content: space-between;flex:1;">
 									<view style="flex:1;">{{item.goodsName}}</view>
 									
-									<view>
-										<text class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+									<view>										
+										<text v-if="item.standPrice" class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+										<text v-else class="priceTag free">免费</text>
 										<text v-if="item.linePrice" class="sale">¥ </text>
 										<text v-if="item.linePrice" class="price_line"> {{ item.linePrice }}</text>
 									</view>
+									
 								</view>
 							</view>
 							<view style="display: flex;justify-content: space-between;margin-top: 15rpx;" v-if="false">
@@ -102,7 +107,9 @@
 								<text class="blackFont">120</text>道题  
 								</view>
 								<view>
-									<text class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+									<text v-if="item.standPrice" class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+									<text v-else class="priceTag free">免费</text>
+									<!-- <text class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text> -->
 									<text v-if="item.linePrice" class="sale">¥ </text>
 									<text v-if="item.linePrice" class="price_line"> {{ item.linePrice }}</text>
 								</view>
@@ -123,21 +130,26 @@
 								<view class="titleTag" style="display: flex;justify-content: space-between;flex:1;">
 									<view style="flex:1;">{{item.goodsName}}</view>
 									
-									<view>
-										<text class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+									<view>									
+										<text v-if="item.standPrice" class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+										<text v-else class="priceTag free">免费</text>
 										<text v-if="item.linePrice" class="sale">¥ </text>
 										<text v-if="item.linePrice" class="price_line"> {{ item.linePrice }}</text>
 									</view>
+									
 								</view>
 							</view>
 							<!-- <view style="display: flex;justify-content: space-between;margin-top: 15rpx;" v-if="false">
 								<view class="noteTag">
 									<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
 									<view>
+										<text v-if="item.standPrice" class="priceTag">¥ {{item.standPrice.toFixed(2)}}</text>
+										<text v-else class="priceTag free">免费</text>
 										<view class="priceTag">¥ {{item.standPrice.toFixed(2)}}</view>
 										<text class="sale"> ¥ </text>
 										<text class="price_line"> {{ item.linePrice }}</text>
 									</view>
+									
 								</view>
 							</view> -->
 						</view>
@@ -153,7 +165,9 @@
 						<view class="tylsz" v-for="(item, index) in eList" :key="index" @click="item.id === 0 ? activeAll(1) : active1(item)" :class="item.id === selObj.eId ? 'activeStys':''">{{ item.educationName }}</view>
 					</view>
 					<view class="rzs"  >
-						<view class="tylszB" v-for="(item, index) in bList" :key="index" @click="item.id === 0 ? activeAll(2) : active2(item)" :class="item.id === selObj.bId ? 'activeStys2':''">{{ item.projectName }}-{{ item.businessName }}</view>
+						<!-- {{ item.projectName }}-{{ item.businessName }} -->
+						<view class="tylszB" v-for="(item, index) in bList" :key="index" @click="item.id === 0 ? activeAll(2) : active2(item)" 
+							:class="item.id === selObj.bId ? 'activeStys2':''">{{ item.aliasName }}</view>
 					</view>
 				</view>
 			</view>
@@ -264,6 +278,7 @@ export default {
 		},
 		subjectList(data) {
 			var self = this;
+			// /app/common/course/subject/list
 			this.$api.subjectList(data).then(res => {
 				if(res.data.code==200){
 					self.sList = res.data.rows
@@ -273,11 +288,13 @@ export default {
 			});
 		},
 		active2(item){
+			console.log('sfsdfg', item)
 			this.selObj.bId = item.id
 			this.show = false
 			this.selObj.pId = item.projectId
 			this.selObj.bName = item.businessName
 			this.selObj.pName = item.projectName
+			this.selObj.aliasName = item.aliasName
 			uni.setStorageSync('eduObj', JSON.stringify(this.selObj));
 			this.subjectList({businessId:item.id,projectId:item.projectId,educationId:this.selObj.eId})
 			this.mergeBusiness()
@@ -286,6 +303,7 @@ export default {
 		},
 		businessList(data) {
 			var self = this;
+			// /app/common/course/business/list
 			this.$api.businessList(data).then(res => {
 				if(res.data.code==200){
 					self.bList = res.data.rows
@@ -299,6 +317,7 @@ export default {
 		},
 		educationList() {
 			var self = this;
+			// /app/common/course/educationType/list
 			this.$api.educationTypeList().then(res => {
 				if(res.data.code==200){
 					self.eList = res.data.rows

+ 7 - 2
pages/index/index.vue

@@ -112,7 +112,8 @@
 								<view class="text">
 									<view class="desc">
 										<view class="left">
-											<text class="mon_t">¥ {{toFixed(item.standPrice)}}</text>
+											<text v-if="item.standPrice" class="mon_t">¥ {{toFixed(item.standPrice)}}</text>
+											<text v-else class="mon_t free">免费</text>
 											<!-- <text class="sale">/限时优惠</text> -->
 											<text v-if="item.linePrice" class="sale"> ¥ </text>
 											<text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
@@ -148,7 +149,8 @@
 								<view class="text">
 									<view class="desc">
 										<view class="left">
-											<text class="mon_t">¥ {{toFixed(item.standPrice)}}</text>
+											<text v-if="item.standPrice" class="mon_t">¥ {{toFixed(item.standPrice)}}</text>
+											<text v-else class="mon_t free">免费</text>
 											<!-- <text class="sale">/限时优惠</text> -->
 											<text v-if="item.linePrice" class="sale"> ¥ </text>
 											<text v-if="item.linePrice" class="price_line">&nbsp;{{ item.linePrice }}</text>
@@ -1031,6 +1033,9 @@ page {
 								color: #FC3F3F;
 								font-size: 36rpx;
                             }
+							.free {
+								font-size: 24rpx;
+							}
 							.sale {
 								color: #999999;
 								font-size: 24rpx;

+ 6 - 1
pages2/bank/detail.vue

@@ -11,9 +11,11 @@
 				<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
 					<view class="prices">
 						<!-- <text class="price_sym"></text> -->
-						<text class="price_word">¥ {{ goodsData.standPrice }}</text>
+						<text v-if="goodsData.standPrice" class="price_word">¥ {{ goodsData.standPrice }}</text>
+						<text v-else class="price_word free">免费</text>
 						<text v-if="goodsData.linePrice" class="sale"> ¥ </text>
 						<text v-if="goodsData.linePrice" class="price_line"> {{ goodsData.linePrice }}</text>
+						
 					</view>
 					<view class="noteTag">
 						<!-- 共 <text class="blackFont">{{ goodsData.chapterNum }} 张卷 {{goodsData || '-'}}</text> 道题 -->
@@ -461,6 +463,9 @@ page {
 		text-decoration:line-through;
 		font-weight: 400;
 	}
+	.free {
+		font-size: 32rpx;
+	}
 }
 .courseName {
 	white-space: nowrap;

+ 46 - 32
pages2/bank/questionBank.vue

@@ -67,10 +67,11 @@
                   <text
                     :class="{
                       right:
-                        item.optionsId == bank.ques ||
-                        item.optionsId == bank.ans,
+                        bankType == 1 && (item.optionsId == bank.ques ||
+                        item.optionsId == bank.ans),
                       wrong:
-                        item.optionsId == bank.ques && bank.ques != bank.ans,
+                        bankType == 1 && item.optionsId == bank.ques && bank.ques != bank.ans,
+                      user_choose: bankType == 2 && (item.optionsId == bank.ques),
                     }"
                     class="activeTI"
                   >
@@ -89,7 +90,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans - 1] }} </view>
                 <view>我的答案:{{ ast[bank.ques - 1] }}</view>
@@ -136,11 +137,12 @@
                   <text
                     :class="{
                       right:
-                        bank.ques.indexOf(item.optionsId) != -1 ||
-                        bank.ans.indexOf(item.optionsId) != -1,
+                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 ||
+                        bank.ans.indexOf(item.optionsId) != -1),
                       wrong:
-                        bank.ques.indexOf(item.optionsId) != -1 &&
-                        bank.ans.indexOf(item.optionsId) == -1,
+                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 &&
+                        bank.ans.indexOf(item.optionsId) == -1),
+                      user_choose: bankType == 2 && (bank.ques.indexOf(item.optionsId) != -1),
                     }"
                     class="activeTI"
                   >
@@ -166,7 +168,7 @@
                 >确认答案</view
               >
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>
                   正确答案:
@@ -224,8 +226,9 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      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),
                     }"
                     class="activeTI"
                   >
@@ -244,7 +247,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
                 <view>我的答案:{{ ast[bank.ques] }}</view>
@@ -307,7 +310,7 @@
                 <view
                   class="ans_submit answerInfos"
                   v-if="
-                    bank.ques && (bank.ques.imageList.length || bank.ques.text)
+                    bankType == 1 && bank.ques && (bank.ques.imageList.length || bank.ques.text)
                   "
                 >
                   <view class="answerTitle">我的答案:</view>
@@ -325,7 +328,7 @@
             </view>
 
             <view
-              v-if="bank.ques && (bank.ques.imageList.length || bank.ques.text)"
+              v-if="bankType == 1 && bank.ques && (bank.ques.imageList.length || bank.ques.text)"
             >
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析:</view>
@@ -399,11 +402,12 @@
                       <text
                         :class="{
                           right:
-                            option.optionsId == bank.ques[ansIndex] ||
-                            option.optionsId == bank.ans[ansIndex],
+                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] ||
+                            option.optionsId == bank.ans[ansIndex]),
                           wrong:
-                            option.optionsId == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] != bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (item.optionsId == bank.ques[ansIndex]),
                         }"
                         class="activeTI"
                       >
@@ -423,7 +427,7 @@
                   </view>
                 </view>
 
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
                     <view>我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view>
@@ -490,8 +494,9 @@
                     >
                       <text
                         :class="{
-                          right: right(bankIndex, ansIndex, option),
-                          wrong: wrong(bankIndex, ansIndex, option),
+                          right: bankType == 1 && right(bankIndex, ansIndex, option),
+                          wrong: bankType == 1 && wrong(bankIndex, ansIndex, option),
+                          user_choose: bankType == 2 && (questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1),
                         }"
                         class="activeTI"
                       >
@@ -510,7 +515,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>
                       正确答案:
@@ -577,11 +582,12 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            bankType == 1 && (childindex == bank.ques[ansIndex] ||
+                            childindex == bank.ans[ansIndex]),
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bankType == 1 && (childindex == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] != bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (childindex == bank.ques[ansIndex]),
                         }"
                         class="activeTI"
                       >
@@ -600,7 +606,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <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>
@@ -678,7 +684,7 @@
                     <view
                       class="ans_submit answerInfos"
                       v-if="
-                        bank.ques[ansIndex] &&
+                        bankType == 1 && bank.ques[ansIndex] &&
                         (bank.ques[ansIndex].imageList.length ||
                           bank.ques[ansIndex].text)
                       "
@@ -699,8 +705,8 @@
                 </view>
                 <view
                   v-if="
-                    bank.ques[ansIndex].imageList.length ||
-                    bank.ques[ansIndex].text
+                    bankType == 1 && (bank.ques[ansIndex].imageList.length ||
+                    bank.ques[ansIndex].text)
                   "
                 >
                   <view class="pad_8 answerInfos">
@@ -947,6 +953,7 @@ export default {
     } else {
       //进入页面
       await this.bankExam();
+      // 请求题目列表
       this.goodsQuestionList();
     }
   },
@@ -985,6 +992,7 @@ export default {
     },
     /**
      * 获取试卷类型2考试,1练习
+     * bank/exam + data
      */
     bankExam() {
       return new Promise((resolve) => {
@@ -1492,7 +1500,7 @@ export default {
       this.showDialog = false;
     },
     /**
-     * 请求题目列表
+     * 请求题目列表 app/common/bank/question/list
      */
     goodsQuestionList() {
       this.$api
@@ -1675,10 +1683,14 @@ export default {
     radioSelect(optionsId, bindex) {
       if (this.questionList[bindex].ques) return;
       this.$set(this.questionList[bindex], "ques", optionsId);
+      if ((bindex + 1) < this.questionList.length) {
+        this.current = bindex + 1
+      }
       this.isDoOver();
 
       // 回答错误
       if (this.questionList[bindex].ques != this.questionList[bindex].ans) {
+        // /exam/wwrong/record 
         this.$api
           .examWrongRecord({
             orderGoodsId: this.orderGoodsId,
@@ -1747,6 +1759,7 @@ export default {
      * @param {Object} 多选确认
      */
     checkboxSubmit(bindex) {
+      // console.log('')
       if (this.questionList[bindex].ques) return;
       let arr = [];
       this.questionList[bindex].jsonStr.forEach((item) => {
@@ -1880,6 +1893,7 @@ export default {
       this.show = true;
     },
     changeIndex(index) {
+      console.log('点击变化', index)
       this.current = index;
     },
 
@@ -2656,7 +2670,7 @@ export default {
   color: #666;
   font-size: 30rpx;
 
-  &.right {
+  &.right, &.user_choose {
     color: #fff;
     background: #36c75a;
   }

+ 7 - 9
pages2/bank/question_report.vue

@@ -13,20 +13,18 @@
 					<view>
 						<!-- 练习 -->
 						<template v-if="examData.doType == 1">
-							{{
-								((reportdata.rightQuestionNum /
+							<!-- ((reportdata.rightQuestionNum /
 									reportdata.doQuestionNum || 0).toFixed(0) *
-									100)
-									
+									100) -->
+							{{ (((reportdata.rightQuestionNum / reportdata.doQuestionNum )|| 0) * 100).toFixed(0)
 							}}%
 						</template>
 						<!-- 考试 -->
 						<template v-if="examData.doType == 2">
-							{{
-								((reportdata.rightQuestionNum /
+							<!-- ((reportdata.rightQuestionNum /
 									reportdata.totalQuestionNum || 0).toFixed(0) *
-									100)
-									
+									100) -->
+							{{ (((reportdata.rightQuestionNum / reportdata.totalQuestionNum )|| 0) * 100).toFixed(0)		
 							}}%
 						</template>
 					<!-- {{ (((reportdata.rightQuestionNum / (reportdata.rightQuestionNum + wrongRecordWrongNum)) || 0) * 100).toFixed(0)}}% -->
@@ -261,7 +259,7 @@ export default {
 		},
 		backBank() {
 			uni.navigateTo({
-				url: '/pages2/bank/questionBank?orderGoodsId='+orderGoodsId+'&id=' +this.nextExamId + '&goodsid=' + this.goodsId + '&moduleId=' + this.moduleId + '&chapterId=' + this.chapterId + ''
+				url: '/pages2/bank/questionBank?orderGoodsId='+this.orderGoodsId+'&id=' +this.nextExamId + '&goodsid=' + this.goodsId + '&moduleId=' + this.moduleId + '&chapterId=' + this.chapterId + ''
 			});
 			
 			// uni.navigateBack({

+ 47 - 30
pages2/class/questionBank.vue

@@ -59,10 +59,11 @@
                   <text
                     :class="{
                       right:
-                        item.optionsId == bank.ques ||
-                        item.optionsId == bank.ans,
+                        bankType == 1 && (item.optionsId == bank.ques ||
+                        item.optionsId == bank.ans),
                       wrong:
-                        item.optionsId == bank.ques && bank.ques != bank.ans,
+                        bankType == 1 && (item.optionsId == bank.ques && bank.ques != bank.ans),
+                      user_choose: bankType == 2 && (item.optionsId == bank.ques),
                     }"
                     class="activeTI"
                   >
@@ -72,7 +73,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans - 1] }}</view>
                 <view>我的答案:{{ ast[bank.ques - 1] }}</view>
@@ -117,11 +118,12 @@
                   <text
                     :class="{
                       right:
-                        bank.ques.indexOf(item.optionsId) != -1 ||
-                        bank.ans.indexOf(item.optionsId) != -1,
+                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 ||
+                        bank.ans.indexOf(item.optionsId) != -1),
                       wrong:
-                        bank.ques.indexOf(item.optionsId) != -1 &&
-                        bank.ans.indexOf(item.optionsId) == -1,
+                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 &&
+                        bank.ans.indexOf(item.optionsId) == -1),
+                      user_choose: bankType == 2 && (bank.ques.indexOf(item.optionsId) != -1),
                     }"
                     class="activeTI"
                   >
@@ -131,7 +133,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>
                   正确答案:
@@ -182,8 +184,9 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      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),
                     }"
                     class="activeTI"
                   >
@@ -195,7 +198,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
                 <view>我的答案:{{ ast[bank.ques] }}</view>
@@ -257,7 +260,7 @@
                 </view>
                 <view
                   class="ans_submit answerInfos"
-                  v-if="bank.ques.text || bank.ques.imageList.length"
+                  v-if="bankType == 1 && (bank.ques.text || bank.ques.imageList.length)"
                 >
                   <view class="answerTitle">我的答案:</view>
                   {{ bank.ques.text }}
@@ -273,7 +276,7 @@
               </view>
             </view>
             <view
-              v-if="bank.ques && (bank.ques.text || bank.ques.imageList.length)"
+              v-if="bankType == 1 && bank.ques && (bank.ques.text || bank.ques.imageList.length)"
             >
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析:</view>
@@ -339,11 +342,12 @@
                       <text
                         :class="{
                           right:
-                            option.optionsId == bank.ques[ansIndex] ||
-                            option.optionsId == bank.ans[ansIndex],
+                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] ||
+                            option.optionsId == bank.ans[ansIndex]),
                           wrong:
-                            option.optionsId == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] != bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (option.optionsId == bank.ques[ansIndex]),
                         }"
                         class="activeTI"
                       >
@@ -355,7 +359,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
                     <view>我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view>
@@ -415,8 +419,9 @@
                     >
                       <text
                         :class="{
-                          right: right(bankIndex, ansIndex, option),
-                          wrong: wrong(bankIndex, ansIndex, option),
+                          right: bankType == 1 && right(bankIndex, ansIndex, option),
+                          wrong: bankType == 1 && wrong(bankIndex, ansIndex, option),
+                          user_choose: bankType == 2 && (questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1),
                         }"
                         class="activeTI"
                       >
@@ -428,7 +433,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>
                       正确答案:
@@ -488,11 +493,12 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            bankType == 1 && (childindex == bank.ques[ansIndex] ||
+                            childindex == bank.ans[ansIndex]),
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bankType == 1 && (childindex == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] != bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (childindex == bank.ques[ansIndex]),
                         }"
                         class="activeTI"
                       >
@@ -504,7 +510,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <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>
@@ -580,7 +586,7 @@
                     </view>
                     <view
                       class="ans_submit answerInfos"
-                      v-if="bank.ques[ansIndex]"
+                      v-if="bankType == 1 && bank.ques[ansIndex]"
                     >
                       <view class="answerTitle">我的答案</view>
                       {{ bank.ques[ansIndex].text }}
@@ -596,7 +602,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answerInfos">
                     <view class="answerTitle">答案解析</view>
                     <view class="answerContent"
@@ -897,6 +903,7 @@ export default {
       }
     } else {
       await this.getGoodsDetail();
+      // 请求题目列表
       this.goodsQuestionList();
       this.bankExam();
     }
@@ -1816,8 +1823,12 @@ export default {
      * @param {Object} e单选点击
      */
     radioSelect(optionsId, bindex) {
+      console.log('单选', bindex, this.questionList[bindex])
       if (this.questionList[bindex].ques) return;
       this.$set(this.questionList[bindex], "ques", optionsId);
+      if ((bindex + 1) < this.questionList.length) {
+        this.current = bindex + 1
+      }
       this.isDoOver();
     },
 
@@ -1834,11 +1845,13 @@ export default {
      * @param {Object} 多选点击
      */
     checkboxSelect(optionsId, bindex, index) {
+      console.log('多选', bindex, index )
       this.$set(
         this.questionList[bindex].jsonStr[index],
         "checked",
         !this.questionList[bindex].jsonStr[index].checked
       );
+      console.log('this.questionList[bindex].jsonStr:', this.questionList[bindex].jsonStr[index])
     },
 
     /**
@@ -1865,6 +1878,7 @@ export default {
      * @param {Object} 多选确认
      */
     checkboxSubmit(bindex) {
+      console.log('this.questionList[bindex].jsonStr:', this.questionList[bindex].jsonStr)
       if (this.questionList[bindex].ques) return;
       let arr = [];
       this.questionList[bindex].jsonStr.forEach((item) => {
@@ -1929,6 +1943,7 @@ export default {
      * 判断题
      */
     judgeSelect(index, bindex) {
+      console.log('判断题',index, bindex )
       if (this.questionList[bindex].ques) return;
       this.$set(this.questionList[bindex], "ques", index + "");
       this.isDoOver();
@@ -1953,10 +1968,12 @@ export default {
       this.showDialog = false;
     },
     changeIndex(index) {
+      console.log('点击变化', index)
       this.current = index;
     },
 
     swiperChange(e) {
+      console.log('切换', e.detail.current, this.questionList.length)
       this.current = e.detail.current;
     },
 
@@ -2619,7 +2636,7 @@ export default {
   color: #666;
   font-size: 30rpx;
 
-  &.right {
+  &.right, &.user_choose {
     color: #fff;
     background: #36c75a;
   }

+ 0 - 1
pages2/exam/exam_appointment.vue

@@ -225,7 +225,6 @@ export default {
 			this.change(+this.paramCount)
 			return
 		}
-		
 		this.$api.getApplylist({ subscribeStatus: 1, exceedExamExpend: 2 }).then(res => {
 			if (res.data.code === 200) {
 				this.listData = res.data.rows;

+ 6 - 1
pages3/course/detail.vue

@@ -31,7 +31,9 @@
 					<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
 						<view class="prices">
 							<!-- <text class="price_sym">¥</text> -->
-							<text class="price_word">¥ {{ detail.standPrice }}</text>
+							<!-- <text class="price_word">¥ {{ detail.standPrice }}</text> -->
+							<text v-if="detail.standPrice" class="price_word">¥ {{ detail.standPrice }}</text>
+							<text v-else class="price_word free">免费</text>
 							<text v-if="detail.linePrice" class="sale"> ¥ </text>
 							<text v-if="detail.linePrice" class="price_line"> {{detail.linePrice }}</text>
 						</view>
@@ -671,6 +673,9 @@ export default {
 			text-decoration:line-through;
 			font-weight: 400;
 		}
+		.free {
+			font-size: 32rpx;
+		}
 	}
 	// tab
 	.tabs {

+ 95 - 42
pages3/live/detail.vue

@@ -26,12 +26,14 @@
         ></image>
       </view>
       <view v-else>
+        <!-- v-if="playVID" -->
         <view
           class="video_box"
           style="width: 100%; height: 421rpx"
-          v-if="playVID"
+          
         >
           <polyv-player
+            v-if="playVID"
             id="playerVideo"
             playerId="playerVideo"
             height="421rpx"
@@ -92,8 +94,8 @@
             <view v-if="courseTotal > 1" class="toggle_course" @click="changeCourses()">
               <image class="img" src="/pages3/static/imgs/toggle.png"></image>
               <view class="toggle_name">切换课程</view>
+              <view class="numbers">共{{ courseTotal }}门</view>
             </view>
-            <view v-if="courseTotal > 1" class="numbers">共{{ courseTotal }}门</view>
         </view>
         <!-- <u-row>
           <u-col span="10">
@@ -563,10 +565,19 @@
 					    <u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
             </view>
             <view class="coruse_num">共{{ courseTotal }}门</view>
+            <view class="menuSel">
+              <scroll-view class="sub_sliper" scroll-x="true" >
+                <view v-for="(item,index) in subList" :key="index" style="margin-right: 50rpx;display:inline-block">
+                  <view class="r_t1" :class="{'nactive': subIndex == index}" @click="cMenu(item, index)">
+                    {{item.subjectName}}
+                  </view>
+                </view>
+              </scroll-view>
+            </view>
 				</view>
 				<view class="check_con">
 					<scroll-view scroll-y="true" style="height: 700rpx;">
-						<view class="course_items"  v-for="(item, index) in courseList" :key="index">
+						<view class="course_items"  v-for="(item, index) in s_courseList" :key="index">
                 <view class="course_lefts">
                   <view class="course_title">{{ item.courseName }}</view>
                   <!-- <view class="course_pros">
@@ -723,6 +734,9 @@ export default {
       courseTotal: 0,
       options: {},
       reStart: false, // 是否显示模块/章/节
+      s_courseList: [], // 筛选后的
+      subList: [],
+      subIndex: 0,
     };
   },
   computed: {
@@ -757,33 +771,7 @@ export default {
 		// this.getbaseprofiletplists();    
   },
   onUnload() {
-    if (this.playSectionId > 0 && this.hasStart) {
-      //退出提交记录
-      this.postStudyRecord();
-    }
-    //清除正在播放的节ID
-		// this.$store.commit('setPlayObj',null)
-    this.$store.commit("setPlaySectionId", { playSectionId: 0 });
-    this.$store.commit("setPlayChannelId", { playChannelId: 0 });
-    this.$store.commit("setPlayVID", { playVID: null });
-    this.closePlv();
-    // console.log("onUnload");
-    //移除所有的事件监听器
-    uni.$off();
-    clearInterval(this.answerTimer);
-    if (this.timer) {
-      clearInterval(this.timer);
-    }
-    // console.log(this.lockTimer, "this.lockTimer");
-    if (this.lockTimer) {
-      clearInterval(this.lockTimer);
-      this.$api
-        .lockDelLock({
-          action: "jxjy",
-        })
-        .then((res) => {});
-    }
-    // websocket.sendMsg("delAction");
+    this.originUnload()
   },
   mounted() {
   },
@@ -800,9 +788,17 @@ export default {
           console.log('埋点')
         }
       })
+    },
+     // 点击课程目录
+    cMenu(item, index) {
+      this.subIndex = index
+      if (item.subjectId != 0) {
+        this.s_courseList = this.courseList.filter((e) => e.subjectId == item.subjectId)
+      } else {
+        this.s_courseList = this.courseList
+      }
     },
     courseCourseList() {
-      console.log('ahhhhhhh直播hhhhhh')
       this.courseList = []
       this.$api.courseCourseList({
         pageNum: 1,
@@ -814,10 +810,22 @@ export default {
         if (res.data.code == 200) {
           this.courseList.push.apply(this.courseList, res.data.rows)
           this.courseTotal = res.data.total || 0
+
+          this.s_courseList = this.courseList
+          let allItem = [{ subjectId: 0, subjectName: '所有'}]
+          let ids = []
+          const newArr = []
+          this.courseList.forEach(item => {
+            if (ids.indexOf(item.subjectId) == -1) {
+              ids.push(item.subjectId)
+              newArr.push(item)
+            }
+          })
+					this.subList = [...allItem, ...newArr]
+
           if(res.data.total > 1) {
             this.getUserWatchLast()
           } else if(res.data.total == 1) {
-            console.log('111->this.courseId', this.courseId)
             this.originOnShow()
             this.originOnMount()
           }
@@ -845,6 +853,7 @@ export default {
         }
       })
     },
+    // 原来onshow里面的内容
     originOnShow() {
       this.updateLiveLast(null)
       this.courseDetail();
@@ -867,7 +876,7 @@ export default {
         let playNextId = `moduleId${option.moduleId}chapterId${
           option.chapterId
         }sectionId${option.sectionId}${option.isRebuild ? "isRebuild" : ""}`;
-        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
+        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
         this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
         this.$store.commit("updatePlayNextId", playNextId);
         // console.log("this.playNoteVideo");
@@ -877,6 +886,7 @@ export default {
         this.studyRecordQueryLiveLast();
       }
     },
+    // 原来的mouted内容
     originOnMount() {
       uni.$on("changeSection", (oldSectionId) => {
         // console.log(this.playVID);
@@ -901,7 +911,11 @@ export default {
         this.photoConfig = false;
         this.photoIndex = 0;
         this.sectionItem = item;
+        this.moduleId = item.moduleId || null
+        this.chapterId = item.chapterId || null
         this.$store.commit("setPlayChannelId", { playChannelId: 0 });
+        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
+        console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
         //获取拍照历史
         this.getPhotoLastRecord();
         this.polyvLiveHistoryChatMsgList();
@@ -917,6 +931,10 @@ export default {
         //清除录播
           this.hasStart = false;
         this.$store.commit("setPlayVID", { playVID: null });
+
+        this.moduleId = item.moduleId
+        this.chapterId = item.chapterId
+        this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
         this.getPhotoLastRecord();
         this.playChannel(item);
         this.channelItem = item;
@@ -927,6 +945,36 @@ export default {
       });
       this.updateChapterOpen(true);
     },
+    // 原来onUnload里面的内容
+    originUnload() {
+      if (this.playSectionId > 0 && this.hasStart) {
+        //退出提交记录
+        this.postStudyRecord();
+      }
+      //清除正在播放的节ID
+      // this.$store.commit('setPlayObj',null)
+      this.$store.commit("setPlaySectionId", { playSectionId: 0 });
+      this.$store.commit("setPlayChannelId", { playChannelId: 0 });
+      this.$store.commit("setPlayVID", { playVID: null });
+      this.closePlv();
+      // console.log("onUnload");
+      //移除所有的事件监听器
+      uni.$off();
+      clearInterval(this.answerTimer);
+      if (this.timer) {
+        clearInterval(this.timer);
+      }
+      // console.log(this.lockTimer, "this.lockTimer");
+      if (this.lockTimer) {
+        clearInterval(this.lockTimer);
+        this.$api
+          .lockDelLock({
+            action: "jxjy",
+          })
+          .then((res) => {});
+      }
+      // websocket.sendMsg("delAction");
+    },
     changeCourses() {
       this.toggleCourseShow = true
     },
@@ -934,7 +982,10 @@ export default {
       this.toggleCourseShow = false
     },
     // 进入学习
-    jump(item, index) {
+    async jump(item, index) {
+      this.vid = ''
+      this.hasStart = true
+      await this.originUnload()
       this.courseId = item.courseId
       this.reStart = false
       this.toggleCourseShow = false
@@ -960,12 +1011,15 @@ export default {
 		 * 获取最后一次看的节
 		 */
 		studyRecordQueryLiveLast() {
+      // /study/record/queryLiveLast
 			this.$api.studyRecordQueryLiveLast({
 				orderGoodsId:this.orderGoodsId,
 				courseId:this.courseId
 			}).then(res => {
 				console.log(res,'couse')
 				if(res.data.data) {
+          this.moduleId = res.data.data.moduleId
+          this.chapterId = res.data.data.chapterId
 					if(res.data.data.sectionType == 1) { //录播
 					this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
 					this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
@@ -1459,7 +1513,6 @@ export default {
     async playVideo(item) {
       console.log(item);
       if (item.sectionType == 3) { // 回放的不播放
-        console.log('回放的不播放')
         return
       }
       if (this.timer) {
@@ -1476,10 +1529,11 @@ export default {
       }
       this.recordObj = null;
       this.recordObj = await this.getRecordLast();
+      console.log('this.recordObj:', this.recordObj)
       this.needSeek = true; //跳转到播放记录
       this.startStatus = true;
-      console.log('3333333333333')
-
+      // 提交学习记录
+      this.postStudyRecord(0)
       //获取节笔记
       this.getNoteList();
     },
@@ -1508,7 +1562,7 @@ export default {
         console.log("即将跳到笔记位置1");
         this.$u.toast("即将跳到笔记位置");
         this.$store.commit("setPlaySectionId", {
-          playSectionId: item.sectionId,
+          playSectionId: item.sectionId || item.menuId,
         });
         this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
         this.playNoteVideo(item);
@@ -1673,7 +1727,7 @@ export default {
       let data = {
         fromPlat: 1, //来源平台 1小程序 2网站	
         photo: self.ossAvatarUrl,
-        sectionId: parseInt(sectionId),
+        sectionId: sectionId || 0,
         goodsId: parseInt(self.goodsId),
         courseId: parseInt(self.courseId),
 				orderGoodsId: this.orderGoodsId,
@@ -1681,14 +1735,13 @@ export default {
           PlayDuration > 0 ? PlayDuration : self.studyDuration
         ),
         gradeId: parseInt(self.gradeId),
-        chapterId: parseInt(self.chapterId),
-        moduleId: parseInt(self.moduleId),
+        chapterId: this.chapterId || 0,
+        moduleId: this.moduleId || 0,
         videoCurrentTime: parseInt(
           currentTime > 0 ? currentTime : self.studyDuration
         ),
       };
       if (status > 0) {
-        console.log(sectionId, "sectionId");
         data.status = status;
       }
       console.log("提交接口", data);

+ 35 - 1
pages3/polyv/css/detail.scss

@@ -68,7 +68,7 @@
     height: 938rpx;
     padding: 56rpx 56rpx 0rpx;
     .check_head {
-      height: 140rpx;
+      height: 200rpx;
       border-bottom: 2rpx solid #F0F0F0;
     }
     .headers {
@@ -87,6 +87,40 @@
       font-size: 28rpx;
       color: #222222;
     }
+    .menuSel {
+      width: 100%;
+      height: 58rpx;
+      white-space:nowrap;
+      overflow: hidden;
+      margin-top: 40rpx;
+      .r_t1 {
+        font-size: 28rpx;
+        font-weight: 400;
+        color: #969696;
+      }
+      .sub_sliper {
+        width: 100%;
+        height: 100%;
+      }
+      .nactive {
+        font-size: 32rpx;
+        font-weight: bold;
+        color: #222222;
+        position: relative;
+        top: 0rpx;
+        left: 0rpx;
+        &::after {
+          content: '';
+          width: 32rpx;
+          height: 8rpx;
+          background: #498AFE;
+          border-radius: 180rpx;
+          position: absolute;
+          bottom: -15rpx;
+          left: 19rpx;
+        }
+      }
+    }
     .course_items {
       width: 100%;
       padding: 24rpx 0rpx 20rpx;

+ 39 - 10
pages3/polyv/detail.vue

@@ -549,10 +549,19 @@
 					    <u-icon name="close" color="#9C9C9C" size="40" @click="closePop()"></u-icon>
             </view>
             <view class="coruse_num">共{{ courseTotal }}门</view>
+            <view class="menuSel">
+              <scroll-view class="sub_sliper" scroll-x="true" >
+                <view v-for="(item,index) in subList" :key="index" style="margin-right: 50rpx;display:inline-block">
+                  <view class="r_t1" :class="{'nactive': subIndex == index}" @click="cMenu(item, index)">
+                    {{item.subjectName}}
+                  </view>
+                </view>
+              </scroll-view>
+            </view>
 				</view>
 				<view class="check_con">
 					<scroll-view scroll-y="true" style="height: 700rpx;">
-						<view class="course_items"  v-for="(item, index) in courseList" :key="index">
+						<view class="course_items"  v-for="(item, index) in s_courseList" :key="index">
                 <view class="course_lefts">
                   <view class="course_title">{{ item.courseName }}</view>
                   <view class="course_pros">
@@ -697,13 +706,15 @@ export default {
       courseList: [], // 课程列表
       courseTotal: 0,
       reStart: false, // 是否显示模块/章/节
+      s_courseList: [], // 筛选后的
+      subList: [],
+      subIndex: 0,
     };
   },
   computed: {
     ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
   },
   onLoad(option) {
-    console.log('onLoadonLoadonLoadonLoadonLoad-')
     this.courseId = Number(option.id) || '';
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || '';
@@ -720,18 +731,15 @@ export default {
     this.$store.getters.dictObj;
   },
   onShow() {
-    console.log('onShowonShowonShowv')
     if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
       return;
     }
     this.courseCourseList();
   },
   onUnload() {
-    console.log('onUnloadonUnloadonUnload')
     this.originUnload()
   },
   mounted() {
-    console.log('mountedmountedmountedmounted')
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
@@ -750,10 +758,19 @@ export default {
         }
       })
     },
+    // 点击课程目录
+    cMenu(item, index) {
+      this.subIndex = index
+      if (item.subjectId != 0) {
+        this.s_courseList = this.courseList.filter((e) => e.subjectId == item.subjectId)
+      } else {
+        this.s_courseList = this.courseList
+      }
+    },
     courseCourseList() {
-      console.log('ahhhhh视频hhhhhhhh')
       // /course/courseList查询商品下的课程列表
       this.courseList = []
+      this.menuList = []
       this.$api.courseCourseList({
         pageNum: 1,
         pageSize: 100,
@@ -763,7 +780,20 @@ export default {
       }).then((res) => {
         if (res.data.code == 200) {
           this.courseList.push.apply(this.courseList, res.data.rows)
+          this.s_courseList = this.courseList
           this.courseTotal = res.data.total || 0
+
+          let allItem = [{ subjectId: 0, subjectName: '所有'}]
+          let ids = []
+          const newArr = []
+          this.courseList.forEach(item => {
+            if (ids.indexOf(item.subjectId) == -1) {
+              ids.push(item.subjectId)
+              newArr.push(item)
+            }
+          })
+					this.subList = [...allItem, ...newArr]
+          
           if (res.data.rows.length) {
             this.courseBusiness(res.data.rows[0].businessId)
           }
@@ -848,7 +878,7 @@ export default {
     },
     // 原来的mouted内容
     originMounted() {
-      console.log('originMounted')
+      // console.log('originMounted')
       uni.$on("changeSection", (oldSectionId) => {
         console.log('originMounted->playVID:', this.playVID, oldSectionId);
           this.hasStart = false;
@@ -877,8 +907,7 @@ export default {
         
         this.$store.commit("setPlayChannelId", { playChannelId: 0 });
         this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId || item.menuId });
-        console.log('清除直播节点胡:', this.moduleId,this.chapterId, this.playSectionId )
-        // this.postStudyRecord(0)
+        console.log('清除直播节点胡:', this.moduleId, this.chapterId, this.playSectionId )
         //获取拍照历史
         this.getPhotoLastRecord();
         this.playVideo(item);
@@ -2210,7 +2239,7 @@ export default {
       }
       console.log("提交接口:", data,'sectionId:', sectionId,'chapterId:', self.chapterId,'moduleId:', self.moduleId, 'courseId:', this.courseId);
       this.$api.studyRecord(data).then((res) => {
-        console.log('提交接口的结果:', res)
+        // console.log('提交接口的结果:', res)
         if (res.data.code == 200) {
           if (status > 0) {
             let moduleId = this.moduleId || 0;

+ 38 - 31
pages5/examBank/index.vue

@@ -67,10 +67,11 @@
                   <text
                     :class="{
                       right:
-                        item.optionsId == bank.ques ||
-                        item.optionsId == bank.ans,
+                        bankType == 1 && (item.optionsId == bank.ques ||
+                        item.optionsId == bank.ans),
                       wrong:
-                        item.optionsId == bank.ques && bank.ques != bank.ans,
+                        bankType == 1 && item.optionsId == bank.ques && bank.ques != bank.ans,
+                      user_choose: bankType == 2 && (item.optionsId == bank.ques),
                     }"
                     class="activeTI"
                   >
@@ -89,7 +90,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans - 1] }} </view>
                 <view>我的答案:{{ ast[bank.ques - 1] }}</view>
@@ -136,11 +137,12 @@
                   <text
                     :class="{
                       right:
-                        bank.ques.indexOf(item.optionsId) != -1 ||
-                        bank.ans.indexOf(item.optionsId) != -1,
+                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 ||
+                        bank.ans.indexOf(item.optionsId) != -1),
                       wrong:
-                        bank.ques.indexOf(item.optionsId) != -1 &&
-                        bank.ans.indexOf(item.optionsId) == -1,
+                        bankType == 1 && (bank.ques.indexOf(item.optionsId) != -1 &&
+                        bank.ans.indexOf(item.optionsId) == -1),
+                      user_choose: bankType == 2 && (bank.ques.indexOf(item.optionsId) != -1),
                     }"
                     class="activeTI"
                   >
@@ -166,7 +168,7 @@
                 >确认答案</view
               >
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>
                   正确答案:
@@ -224,8 +226,9 @@
                 >
                   <text
                     :class="{
-                      right: index == bank.ques || index == bank.ans,
-                      wrong: index == bank.ques && bank.ques != bank.ans,
+                      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),
                     }"
                     class="activeTI"
                   >
@@ -244,7 +247,7 @@
                 </view>
               </view>
             </view>
-            <view v-if="bank.ques">
+            <view v-if="bankType == 1 && bank.ques">
               <view class="pad_8 answer">
                 <view>正确答案:{{ ast[bank.ans] }}</view>
                 <view>我的答案:{{ ast[bank.ques] }}</view>
@@ -307,7 +310,7 @@
                 <view
                   class="ans_submit answerInfos"
                   v-if="
-                    bank.ques && (bank.ques.imageList.length || bank.ques.text)
+                    bankType == 1 && bank.ques && (bank.ques.imageList.length || bank.ques.text)
                   "
                 >
                   <view class="answerTitle">我的答案:</view>
@@ -325,7 +328,7 @@
             </view>
 
             <view
-              v-if="bank.ques && (bank.ques.imageList.length || bank.ques.text)"
+              v-if="bankType == 1 && bank.ques && (bank.ques.imageList.length || bank.ques.text)"
             >
               <view class="pad_8 answerInfos">
                 <view class="answerTitle">答案解析:</view>
@@ -399,11 +402,12 @@
                       <text
                         :class="{
                           right:
-                            option.optionsId == bank.ques[ansIndex] ||
-                            option.optionsId == bank.ans[ansIndex],
+                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] ||
+                            option.optionsId == bank.ans[ansIndex]),
                           wrong:
-                            option.optionsId == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bankType == 1 && (option.optionsId == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] != bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (option.optionsId == bank.ques[ansIndex]),
                         }"
                         class="activeTI"
                       >
@@ -423,7 +427,7 @@
                   </view>
                 </view>
 
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>正确答案:{{ ast[bank.ans[ansIndex] - 1] }}</view>
                     <view>我的答案:{{ ast[bank.ques[ansIndex] - 1] }}</view>
@@ -490,8 +494,9 @@
                     >
                       <text
                         :class="{
-                          right: right(bankIndex, ansIndex, option),
-                          wrong: wrong(bankIndex, ansIndex, option),
+                          right: bankType == 1 && right(bankIndex, ansIndex, option),
+                          wrong: bankType == 1 && wrong(bankIndex, ansIndex, option),
+                          user_choose: bankType == 2 && (questionList[bankIndex].ques[ansIndex].indexOf(option.optionsId) != -1),
                         }"
                         class="activeTI"
                       >
@@ -510,7 +515,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <view v-if="bankType == 1 && bank.ques[ansIndex]">
                   <view class="pad_8 answer">
                     <view>
                       正确答案:
@@ -577,11 +582,12 @@
                       <text
                         :class="{
                           right:
-                            childindex == bank.ques[ansIndex] ||
-                            childindex == bank.ans[ansIndex],
+                            bankType == 1 && (childindex == bank.ques[ansIndex] ||
+                            childindex == bank.ans[ansIndex]),
                           wrong:
-                            childindex == bank.ques[ansIndex] &&
-                            bank.ques[ansIndex] != bank.ans[ansIndex],
+                            bankType == 1 && (childindex == bank.ques[ansIndex] &&
+                            bank.ques[ansIndex] != bank.ans[ansIndex]),
+                          user_choose: bankType == 2 && (childindex == bank.ques[ansIndex]),
                         }"
                         class="activeTI"
                       >
@@ -600,7 +606,7 @@
                     </view>
                   </view>
                 </view>
-                <view v-if="bank.ques[ansIndex]">
+                <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>
@@ -678,7 +684,7 @@
                     <view
                       class="ans_submit answerInfos"
                       v-if="
-                        bank.ques[ansIndex] &&
+                        bankType == 1 && bank.ques[ansIndex] &&
                         (bank.ques[ansIndex].imageList.length ||
                           bank.ques[ansIndex].text)
                       "
@@ -699,8 +705,8 @@
                 </view>
                 <view
                   v-if="
-                    bank.ques[ansIndex].imageList.length ||
-                    bank.ques[ansIndex].text
+                    bankType == 1 && (bank.ques[ansIndex].imageList.length ||
+                    bank.ques[ansIndex].text)
                   "
                 >
                   <view class="pad_8 answerInfos">
@@ -1507,6 +1513,7 @@ export default {
      * 请求题目列表
      */
     goodsQuestionList() {
+      // app/common/bank/question/list
       this.$api
         .goodsQuestionList({
           examId: this.examId,
@@ -2536,7 +2543,7 @@ export default {
   color: #666;
   font-size: 30rpx;
 
-  &.right {
+  &.right, &.user_choose {
     color: #fff;
     background: #36c75a;
   }

+ 1 - 0
pages5/examReport/index.vue

@@ -354,6 +354,7 @@ export default {
 		},
 		mockWrongRecordWrongNum() {
 			return new Promise(resolve => {
+				// /mock/wwrong/record/wrongNum/${data}
 				this.$api.mockWrongRecordWrongNum(this.recordId).then(res => {
 					this.wrongRecordWrongNum = res.data.data || 0;
 					resolve();