he2802 4 tahun lalu
induk
melakukan
fb8d86b2c2
56 mengubah file dengan 4761 tambahan dan 1187 penghapusan
  1. 18 1
      common/httpList/base.js
  2. 25 1
      common/httpList/course.js
  3. 8 0
      common/httpList/goods.js
  4. 10 0
      common/httpList/grade.js
  5. 29 12
      common/methodTool.js
  6. 1 1
      common/request.js
  7. 8 5
      common/signature.js
  8. 140 11
      components/course/courseChapter.vue
  9. 9 6
      components/course/courseModule.vue
  10. 56 14
      components/course/courseSection.vue
  11. 11 0
      pages.json
  12. 3 3
      pages/course/index.vue
  13. 250 31
      pages/index/index.vue
  14. 31 0
      pages/webview/index.vue
  15. 4 4
      pages2/appointment/appointment_success.vue
  16. 2 2
      pages2/appointment/kporder.vue
  17. 2 2
      pages2/appointment/order.vue
  18. 2 2
      pages2/bank/detail.vue
  19. 56 37
      pages2/bank/my_question.vue
  20. 117 46
      pages2/bank/questionBank.vue
  21. 77 33
      pages2/bank/questionBankAllExplain.vue
  22. 102 43
      pages2/bank/questionBankContinue.vue
  23. 63 29
      pages2/bank/questionBankExplain.vue
  24. 82 35
      pages2/bank/questionBankExplainDetail.vue
  25. 91 34
      pages2/bank/questionBankTest.vue
  26. 78 34
      pages2/bank/questionBankWrongExplain.vue
  27. 4 2
      pages2/bank/question_detail.vue
  28. 60 28
      pages2/bank/question_record.vue
  29. 11 7
      pages2/bank/question_report.vue
  30. 277 100
      pages2/class/questionBank.vue
  31. 2 2
      pages2/class/question_report.vue
  32. 11 9
      pages2/exam/exam_appointment.vue
  33. 6 6
      pages2/exam/exam_result.vue
  34. 876 77
      pages2/invoice/index.vue
  35. 41 13
      pages2/learn/my_learn.vue
  36. 127 20
      pages2/msg/detail.vue
  37. 1 1
      pages2/msg/index.vue
  38. 4 3
      pages2/order/confirm_list.vue
  39. 3 3
      pages2/order/confirm_success.vue
  40. 176 78
      pages2/order/index.vue
  41. 10 10
      pages2/plan/create.vue
  42. 11 5
      pages2/plan/edit.vue
  43. 133 6
      pages2/plan/index.vue
  44. 353 1
      pages2/register/register.vue
  45. 56 19
      pages2/subject/collectBank.vue
  46. 57 19
      pages2/subject/collectTypeBank.vue
  47. 67 26
      pages2/subject/wrongBank.vue
  48. 57 19
      pages2/subject/wrongTypeBank.vue
  49. 436 268
      pages2/verify/input.vue
  50. 13 2
      pages2/verify/input2.vue
  51. 293 45
      pages2/wd/class.vue
  52. 27 5
      pages2/wd/course.vue
  53. 7 4
      pages2/wd/info.vue
  54. 15 5
      pages3/course/detail.vue
  55. 351 17
      pages3/polyv/detail.vue
  56. 1 1
      pages3/static/polyv-sdk/components/polyv/polyv.wxss

+ 18 - 1
common/httpList/base.js

@@ -22,6 +22,23 @@ export default {
 			method: 'get',
 			data: data
 		})
-	}
+	},
+	
+	advertisingHomeLocation(data) {
+		return myRequest({
+			url: '/app/common/base/advertising/homeLocation',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
+	advertisingList(data) {
+		return myRequest({
+			url: '/app/common/base/advertising/list',
+			method: 'get',
+			data: data,
+			noToken: true
+		})
+	},
 	
 }

+ 25 - 1
common/httpList/course.js

@@ -97,6 +97,30 @@ export default {
 			url: '/course/'+data,
 			method: 'get'
 		})
-	}
+	},
+	courseBusiness(data) {
+		return myRequest({
+			url: '/app/common/course/business/'+data,
+			method: 'get',
+			noToken:true
+		})
+	},
+	
+	courseHandouts(data) {
+		return myRequest({
+			url: '/course/handouts/'+data,
+			method: 'get'
+		})
+	},
+	
+	courseGoodsRebuildStatus(data) {
+		return myRequest({
+			url: '/course/goodsRebuildStatus',
+			method: 'get',
+			data:data
+		})
+	},
+	
+	
 	
 }

+ 8 - 0
common/httpList/goods.js

@@ -203,6 +203,14 @@ export default {
 		})
 	},
 	
+	bankRecordDoNum(data) {
+		return myRequest({
+			url: '/bank/record/doNum',
+			data:data,
+			method: 'GET',
+		})
+	},
+	
 	wrongRecordTypeList(data) {
 		return myRequest({
 			url: '/exam/wwrong/record/type_list',

+ 10 - 0
common/httpList/grade.js

@@ -14,6 +14,16 @@ export default {
 			url: '/grade/grade/'+data,
 			method: 'get'
 		})
+	},
+	
+	changeGrade(data) {
+		return myRequest({
+			url: '/grade/grade/changeGrade',
+			method: 'post',
+			data:data
+		})
 	}
 	
+	
+	
 }

+ 29 - 12
common/methodTool.js

@@ -38,7 +38,7 @@ export default {
 	splitImgHost(url, scale = false, width = 250) {
 		if (!url) {
 			return ''
-		} else if (url.indexOf("http") != -1 || url.indexOf("https") != -1) {
+		} else if (url.indexOf("http") != -1 || url.indexOf("https") != -1 || url.indexOf("wxfile") != -1) {
 
 		} else {
 			url = baseUrls.BASE_IMG_URL + url
@@ -146,7 +146,7 @@ export default {
 	uploadFile(options, int) {
 		return new Promise((resolve, reject) => {
 			var self = this;
-			if (options.indexOf('//tmp') === -1) {
+			if (options.indexOf('//tmp') === -1 && options.indexOf('//temp') === -1) {
 				resolve(options)
 				return
 			}
@@ -260,14 +260,31 @@ export default {
 	                    },1000)
 	            },
 	secondToDate(result){
-	            	var h = Math.floor(result / 3600) < 10 ? '0'+Math.floor(result / 3600) : Math.floor(result / 3600);
-				    var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
-				    var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
-				        if(h==0){
-				        	result = m + ":" + s;
-				        }else{
-				        	result = h+':'+m + ":" + s
-				        }
-				    return result;
-	 }
+		var h = Math.floor(result / 3600) < 10 ? '0'+Math.floor(result / 3600) : Math.floor(result / 3600);
+		var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+		var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+			if(h==0){
+				result = m + ":" + s;
+			}else{
+				result = h+':'+m + ":" + s
+			}
+		return result;
+	 },
+	 /**
+      * 
+      * @param {int} result 
+      * @returns {string}
+      * @remard 单位S转小时分钟秒
+      */
+     secondToTime(result,Diszing = true) {
+         var h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600);
+         var m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60));
+         var s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60));
+         if (h == 0 && Diszing) {
+             result = m + ":" + s;
+         } else {
+             result = h + ':' + m + ":" + s
+         }
+         return result;
+     },
 }

+ 1 - 1
common/request.js

@@ -10,7 +10,7 @@ export const BASE_URL = 'http://42.192.164.187:19005'    //test
 
  //图片上传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-dev.xyyxt.net/'  //test
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading) {

+ 8 - 5
common/signature.js

@@ -36,11 +36,14 @@ class Handwriting {
 		this.ctx = uni.createCanvasContext(this.canvasName)
 		var query = uni.createSelectorQuery();
 		query.select('.handCenter').boundingClientRect(rect => {
-			if (rect.width) {
-				this.canvasWidth = rect.width;
-			}
-			if (rect.height) {
-				this.canvasHeight = rect.height;
+			if(rect) {
+				
+				if (rect.width) {
+					this.canvasWidth = rect.width;
+				}
+				if (rect.height) {
+					this.canvasHeight = rect.height;
+				}
 			}
 		}).exec();
 		this.selectSlideValue(this.slideValue);

+ 140 - 11
components/course/courseChapter.vue

@@ -6,21 +6,26 @@
 		<text style="margin-left: 30rpx;">{{menuItem.name}}</text>
 		</view>
 		<view v-if="!down">
-			<view v-for="(itemM,indexM) in list" >
+			<view v-for="(itemM,indexM) in list" :key="indexM">
 				<view v-if="itemM.type!=2">
-					<courseSection :courseId="courseId"  :goodsId="goodsId" :isBuy="isBuy" :nextMenuItem="findNextSection(indexM)" :isRebuild="isRebuild" :gradeId="gradeId" :menuItem="itemM" :levelId="levelId+'-'+itemM.sectionId"></courseSection>
+					<courseSection :courseId="courseId" @playEnd="refreshList($event)" :goodsId="goodsId" :isBuy="isBuy" :nextMenuItem="findNextSection(indexM)" :isRebuild="isRebuild" :gradeId="gradeId" :menuItem="itemM" :levelId="levelId+'-'+itemM.sectionId"></courseSection>
 					<u-line v-if="indexM<list.length-1"></u-line>
 				</view>
 				<view v-if="itemM.type==2">
 					<u-line ></u-line>
-					<view class="examBox"  @click="toDo(itemM.typeId,goodsId,itemM.moduleId,itemM.chapterId)">
+					<view class="examBox"  @click="toDo(itemM.typeId,goodsId,itemM.moduleId,itemM.chapterId,itemM,indexM)">
 						<view class="exam">
 							<view class="eTag">{{itemM.doType==1?'练习':'考试'}}</view>
 							<view style="margin-left: 15rpx;">{{itemM.name}}</view>
 						</view>
 						<view v-if="isRebuild||itemM.rebuild>0" class="tagRe">待重修</view>
 						<view v-else>
-							<view v-if="itemM.learning==1" class="tagGreen">已做完</view>
+							<view :class="{tagGreen:itemM.learning == 1,tagRe:itemM.learning == 0 || itemM.rebuild>0}">
+								<text v-if="itemM.rebuild > 0">待重测</text>
+								<text v-else-if="itemM.learning == 1">合格</text>
+								<text v-else-if="itemM.learning == 0">不合格</text>
+							
+							</view>
 						</view>
 						
 					</view>
@@ -37,6 +42,10 @@ import courseSection from '@/components/course/courseSection.vue';
 export default {
 	name: 'courseChapter',
 	props: {
+		learningOrder:{ //是否设置学习顺序 0 设置 1不设置
+			type:Number,
+			default:1
+		},
 		menuItem: {
 			type: Object,
 			default: {}
@@ -73,18 +82,36 @@ export default {
 		return {
 			down:true,
 			list:[],
-			examList:{}
-			
-	
+			examList:{},
+			canLearn:false, //是否全部视频看完才可以练习、测试
 		};
 	},
 	onLoad() {},
 	created() {
-		
 	},
 	mounted() {
+		
+	},
+	onPageShow() {
+		this.refreshList({isRebuild:this.isRebuild});
 	},
 	methods: {
+		refreshList(isRebuild) {
+			console.log(9999)
+			let moduleId = this.menuItem.moduleId?this.menuItem.moduleId:0
+			if(this.isRebuild){
+				this.getReSectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
+			}else{
+				this.getBuySectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
+//				this.getMenuExamList(item.id,item.courseId,moduleId)
+			}
+			
+			
+			this.$emit('playEnd',{isRebuild:isRebuild.isRebuild})
+			console.log(10000)
+			// let moduleId = this.menuItem.moduleId?this.menuItem.moduleId:0
+			// this.getBuySectionList(this.menuItem.id,this.menuItem.courseId,moduleId)
+		},
 		findNextSection(index){
 			for(let i=index+1;i<this.list.length;i++){
 				return this.list[i];
@@ -94,10 +121,76 @@ export default {
 		/**
 		 * 去做题
 		 */
-		async toDo(id,goodsId =0,moduleId = 0, chapterId = 0) {
+		async toDo(id,goodsId =0,moduleId = 0, chapterId = 0,item,index) {
+			
+			console.log(this.learningOrder)
+			if(this.learningOrder == 0) {
+				if(this.canLearn) {
+					
+					let num = await this.bankRecordDoNum(item.typeId)
+					//有次数限制
+					if(item.answerNum - num > 0 && item.answerNum > 0) {
+						// this.$set(this.list[index],'doNum',(item.doNum+1))
+						console.log(this.list[index])
+						uni.navigateTo({
+							url:'/pages2/class/questionBank?courseId='+this.courseId+'&gradeId='+this.gradeId+'&isFromVideo=1&id='+id+'&goodsid='+goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+''
+						})
+					//没有答题次数限制
+					} else if(item.answerNum == 0) {
+						uni.navigateTo({
+							url:'/pages2/class/questionBank?courseId='+this.courseId+'&gradeId='+this.gradeId+'&isFromVideo=1&id='+id+'&goodsid='+goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+''
+						}) 
+					} else {
+						uni.showToast({
+							icon:'none',
+							title:'该试卷只能答题'+item.answerNum+'次'
+						})
+						
+						return;
+					}
+				} else {
+					uni.showToast({
+						icon:'none',
+						title:'请学完视频课程再进行练习和测试'
+					})
+				}
+			} else {
+				let num = await this.bankRecordDoNum(item.typeId)
+				//有次数限制
+				if(item.answerNum - item.doNum > 0 && item.answerNum > 0) {
+					// this.$set(this.list[index],'doNum',(item.doNum+1))
+					console.log(this.list[index])
+					uni.navigateTo({
+						url:'/pages2/class/questionBank?courseId='+this.courseId+'&gradeId='+this.gradeId+'&isFromVideo=1&id='+id+'&goodsid='+goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+''
+					})
+				//没有答题次数限制
+				} else if(item.answerNum == 0) {
+						uni.navigateTo({
+							url:'/pages2/class/questionBank?courseId='+this.courseId+'&gradeId='+this.gradeId+'&isFromVideo=1&id='+id+'&goodsid='+goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+''
+						})
+				} else {
+					uni.showToast({
+						icon:'none',
+						title:'该试卷只能答题'+item.answerNum+'次'
+					})
+					
+					return;
+				}
+			}
 			
-			uni.navigateTo({
-				url:'/pages2/class/questionBank?courseId='+this.courseId+'&gradeId='+this.gradeId+'&isFromVideo=1&id='+id+'&goodsid='+goodsId+'&moduleId='+moduleId+'&chapterId='+chapterId+''
+		},
+		bankRecordDoNum(examId) {
+			return new Promise(resolve => {
+				this.$api.bankRecordDoNum({
+					goodsId:this.goodsId,
+					gradeId:this.gradeId,
+					chapterId:this.menuItem.id,
+					courseId:this.courseId,
+					moduleId:0,
+					examId:examId,
+				}).then(res => {
+					resolve(res.data.data)
+				})
 			})
 		},
 		openChapter(item){
@@ -139,6 +232,19 @@ export default {
 							item.tryListen = true
 						}	
 					}
+					
+					let newArr = res.data.data.filter(item => {
+						console.log(item)
+						return item.type != 2;
+					})
+					this.canLearn = newArr.every(item => {
+						console.log(item)
+						if(item.learning == 1) {
+							return true;
+						} else {
+							return false;
+						}
+					})
 					self.list = res.data.data
 				}
 			});
@@ -156,6 +262,18 @@ export default {
 							item.tryListen = true
 						}	
 					}
+					let newArr = res.data.data.filter(item => {
+						console.log(item)
+						return item.type != 2;
+					})
+					this.canLearn = newArr.every(item => {
+						console.log(item)
+						if(item.learning == 1) {
+							return true;
+						} else {
+							return false;
+						}
+					})
 					self.list = res.data.data
 				}
 			});
@@ -173,6 +291,17 @@ export default {
 							item.tryListen = true
 						}	
 					}
+					let newArr = res.data.data.filter(item => {
+						return item.type != 2;
+					})
+					this.canLearn = newArr.every(item => {
+						console.log(item)
+						if(item.learning == 1) {
+							return true;
+						} else {
+							return false;
+						}
+					})
 					self.list = res.data.data
 				}
 			});

+ 9 - 6
components/course/courseModule.vue

@@ -6,8 +6,8 @@
 		<text style="margin-left: 10rpx;">{{menuItem.name}}</text>
 		</view>
 		<view v-if="!down">
-			<view v-for="(itemM,indexM) in list" >
-				<courseChapter :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" :isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId"></courseChapter>
+			<view v-for="(itemM,indexM) in list" :key="indexM">
+				<courseChapter @toDo="toDo($event)" :courseId="courseId" :learningOrder="learningOrder" :goodsId="goodsId" :isBuy="isBuy" :gradeId="gradeId" :isRebuild="isRebuild"  :menuItem="itemM" :levelId="levelId+'-'+itemM.chapterId"></courseChapter>
 				<u-line v-if="indexM<list.length-1"></u-line>
 			</view>
 		</view>
@@ -19,9 +19,9 @@ import courseChapter from '@/components/course/courseChapter.vue';
 export default {
 	name: 'courseModule',
 	props: {
-		learningOrder:{ //是否设置学习顺序 1 设置 0不设置
-			type:String,
-			defaule:'0'
+		learningOrder:{ //是否设置学习顺序 0 设置 1不设置
+			type:Number,
+			defaule:1
 		},
 		menuItem: {
 			type: Object,
@@ -58,7 +58,7 @@ export default {
 	data() {
 		return {
 			 down:true,
-			 list:[]
+			 list:[],
 		};
 	},
 	onLoad() {},
@@ -69,6 +69,9 @@ export default {
 		
 	},
 	methods: {
+		toDo(item) {
+			this.$emit('toDo',item)
+		},
 		openModule(item){
 			this.down = !this.down
 			if(!this.down&&this.list.length==0){

+ 56 - 14
components/course/courseSection.vue

@@ -9,22 +9,22 @@
 					<view v-if="menuItem.sectionType==1" :class="playSectionId==newId?'color1':''">{{menuItem.name}}</view>
 					<view v-if="menuItem.sectionType==2" :class="playSectionId==newId?'color2':''">{{menuItem.name}}</view>
 					<view v-if="menuItem.sectionType==3" :class="playSectionId==newId?'color3':''">{{menuItem.name}}</view>
-					<!-- <view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.liveStartTime">
+					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType==2 && menuItem.liveStartTime">
 						<view v-if="menuItem.liveStartTime>nowTime">
 							<text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
 							<text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false).substr(11,9)}}</text>
 						</view>
-						<view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
+						<!-- <view v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
 							<text>直播中</text>
 						</view>
 						<view v-if="menuItem.liveEndTime<nowTime">
 							<text>回放</text>
-						</view>
-					</view> -->
+						</view> -->
+					</view>
 				</view>
 				<view v-if="menuItem.sectionType==null">{{menuItem.name}}</view>
 			</view>
-			<view style="font-size: 20rpx;color: #FF3B30;"  v-if="menuItem.liveStartTime">
+			<view style="font-size: 20rpx;color: #FF3B30;"  v-if="menuItem.liveStartTime && menuItem.sectionType != 3">
 				<view class="tagWillPlay" v-if="menuItem.liveStartTime>nowTime">
 					<text>待开播</text>
 				</view>
@@ -35,7 +35,7 @@
 					<text>已结束</text>
 				</view>
 			</view>
-			<view v-if="isRebuild||menuItem.rebuild>0" class="tagRe">待重修</view>
+			<view v-if="(isRebuild||menuItem.rebuild>0)" class="tagRe">待重修</view>
 			<view v-else>
 				<view v-if="menuItem.learning==1" class="tagGreen">已看完</view>
 			</view>
@@ -86,6 +86,11 @@ export default {
 			default: {}
 		},
 	},
+	watch:{
+		menuItem(val) {
+			console.log(val,'val')
+		}
+	},
 	data() {
 		return {
 			nowTime:0,
@@ -99,11 +104,19 @@ export default {
 	mounted() {
 		this.nowTime = Number(new  Date().getTime()/1000).toFixed(0)
 		this.newId= this.menuItem.sectionId>0?this.menuItem.sectionId:this.menuItem.menuId
-		
-		uni.$on('playNext', () => {
+		console.log(this.isRebuild)
+		console.log(this.nextMenuItem,'nextMenuItem')
+		console.log(this.menuItem,'this.menuItem')
+		let moduleId = this.menuItem.moduleId || 0;
+		let chapterId = this.menuItem.chapterId || 0;
+		let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
+		let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild?'isRebuild':''}`;
+		uni.$off('playNext'+playNextId) //绑定前先移除之前的事件
+		uni.$once('playNext'+playNextId, (data) => {
 			//到时会触发每个节的监听事件,只允许当前节的接收
 			let self = this
-			if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId)){
+			
+			if(this.nextMenuItem.recordingUrl&&this.isRebuild&&(this.newId==this.playSectionId) && data.fromRebuild){  // fromRebuild 来自重修目录的点击才弹出播放下一节
 				//重修存在下一节
 				uni.showModal({
 				    title: '提示',
@@ -119,10 +132,26 @@ export default {
 							ids[2] = nextId 
 							uni.$emit('levelId', ids.join('-'))
 							uni.$emit('getSection', self.nextMenuItem)
+							self.$emit('playEnd',{isRebuild:self.isRebuild})
+							// uni.$off('playend')
+							// uni.$on('playend',res => {
+							// 	console.log('playend2')
+							// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
+							// })
 							
-				        }
+				        } else {
+							let nextId= self.nextMenuItem.sectionId>0?self.nextMenuItem.sectionId:self.nextMenuItem.menuId
+							//设置播放的节ID
+							self.$store.commit('setPlaySectionId', {playSectionId  :nextId});
+							self.$store.commit('setPlayVID', {playVID  :self.nextMenuItem.recordingUrl});
+							let ids = self.levelId.split('-');
+							ids[2] = nextId 
+							self.$emit('playEnd',{isRebuild:self.isRebuild})
+						}
 				    }
 				});
+			} else {
+				this.$emit('playEnd',{isRebuild:this.isRebuild})
 			}
 		});
 	},
@@ -158,7 +187,14 @@ export default {
 				this.$store.commit('setPlayVID', {playVID  :this.menuItem.recordingUrl});
 				uni.$emit('levelId', this.levelId)
 				uni.$emit('getSection', this.menuItem)
-				
+				uni.$emit('isRebuild',this.isRebuild)
+				console.log(this.menuItem,'menuItem')
+				// uni.$off('playend')
+				// uni.$on('playend',res => {
+				// 	console.log('playend2')
+				// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
+				// })
+				console.log(999)
 			}
 			if(this.menuItem.sectionType==2){
 				//直播
@@ -181,6 +217,14 @@ export default {
 				this.$store.commit('setPlayChannelId', {playChannelId  :this.menuItem.liveUrl});
 				uni.$emit('levelId', this.levelId)
 				uni.$emit('getChannel', this.menuItem)
+				uni.$emit('isRebuild',this.isRebuild)
+				console.log(this.menuItem,'menuItem')
+				// uni.$off('playend')
+				// uni.$on('playend',res => {
+				// 	console.log('playend1')
+				// 	this.$emit('playEnd',{isRebuild:this.isRebuild})
+				// })
+				console.log(888)
 
 			}
 			
@@ -263,9 +307,7 @@ export default {
 	.t_content{
 		margin-left: 10rpx;
 		color: #666666;
-		white-space:nowrap;
-		overflow:hidden;
-		text-overflow:ellipsis; 
+		flex:1;
 	}
 	.tagColor3{
 		border: 2rpx solid #FF9500;

+ 11 - 0
pages.json

@@ -68,6 +68,17 @@
 					"bounce": "none"
 				}
 			}
+		},
+		{
+			"path": "pages/webview/index",
+			"style": {
+				"navigationBarTitleText": "网页",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
 		}
 	],
 	"subPackages": [{

+ 3 - 3
pages/course/index.vue

@@ -41,14 +41,14 @@
 					<navigator  hover-class="none" :url="'/pages3/course/detail?id='+item.goodsId" v-for="(item,index) in list1" :key="index" >
 						<view class="itemBox">
 							<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
-							<view style="display: flex;margin-top: 13rpx;">
+							<view style="display: flex;margin-top: 13rpx;align-items: center;">
 								<view class="yearTag" v-if="item.year">{{item.year}}</view>
 								<view class="titleTag">{{item.goodsName}}</view>
 							</view>
 							<view style="display: flex;justify-content: space-between;margin-top: 13rpx;">
 								<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
 								共 <text class="blackFont">{{item.courseNum}}</text> 
-								<text class="margin30"></text>
+								<text class="margin30">课程</text>
 								<text class="blackFont">{{item.classHours}}</text> 学时</view>
 								<view class="priceTag">¥ {{item.standPrice.toFixed(2)}}</view>
 							</view>
@@ -62,7 +62,7 @@
 					<navigator  hover-class="none" :url="'/pages2/bank/detail?id='+item.goodsId" v-for="(item,index) in list2" :key="index" >
 						<view class="itemBox">
 							<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
-							<view style="display: flex;margin-top: 13rpx;">
+							<view style="display: flex;margin-top: 13rpx;align-items: center;">
 								<view class="yearTag" v-if="item.year">{{item.year}}</view>
 								<view class="titleTag" style="display: flex;justify-content: space-between;flex:1;">
 									<view>{{item.goodsName}}</view>

+ 250 - 31
pages/index/index.vue

@@ -1,11 +1,25 @@
 <template>
 	<view class="index">
-		<u-navbar :is-back="false" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
+		<u-navbar class="navbar" :is-back="false" :border-bottom="false"  title-color="#333333" back-icon-color="#ffffff">
 			<view class="slot-wrap">
 				<image  src="/static/logo2.png"></image>
 			</view>
 		</u-navbar>
-		<u-swiper height="320" border-radius="0" :list="list" @change="e => current = e.current" :autoplay="false"></u-swiper>
+		<view class="swiper">
+			<swiper :indicator-dots="false" indicator-color="#fff" indicator-active-color="#007AFF" :style="{'height':swiperHeight+'rpx'}" @change="swiperChange" :interval="interval" :duration="duration"  :autoplay="autoplay" :circular="true">
+				<!-- <swiper-item v-for="(swiper,index) in list" :key="index" @click="swiperClick(swiper)">
+					<image @load="imageLoad" :src="$method.splitImgHost(swiper.adverUrl, true)" mode="widthFix"></image>
+				</swiper-item> -->
+				<swiper-item >
+					<image @load="imageLoad" src="http://file.xyyxt.net/oss/images/file/20220111.jpg" mode="widthFix"></image>
+				</swiper-item>
+				
+				
+			</swiper>
+			<view class="dots">
+				<view class="dot" :class="{'active':index == current}" v-for="(swiper,index) in list" :key="index"></view>
+			</view>
+		</view>
 		<view class="content">
 			<view class="notice" v-if="infoNums">
 				<view class="notice__content">
@@ -83,7 +97,7 @@
 				<navigator  hover-class="none" class="item" v-for="(item,index) in list1" :key="index" :url="'/pages3/course/detail?id='+item.goodsId">
 					<view class="img">
 						<image :src="$method.splitImgHost(item.coverUrl, true)"></image>
-						<view class="time">{{item.year?item.year:''}}</view>
+						<view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
 					</view>
 					<view class="text">
 						<view class="title">{{item.goodsName}}</view>
@@ -92,7 +106,7 @@
 								{{item.classHours}}
 								<text>学时</text>
 							</view>
-							<view class="right">¥ {{item.standPrice}}</view>
+							<view class="right">¥ {{toFixed(item.standPrice)}}</view>
 						</view>
 					</view>
 					
@@ -102,7 +116,7 @@
 			 	<navigator  hover-class="none" class="item" v-for="(item,index) in list2" :key="index" :url="'/pages2/bank/detail?id='+item.goodsId">
 					<view class="img">
 						<image :src="$method.splitImgHost(item.coverUrl, true)"></image>
-						<view class="time">{{item.year?item.year:''}}</view>
+						<view class="time" v-if="item.year">{{item.year?item.year:''}}</view>
 					</view>
 					<view class="text">
 						<view class="title">{{item.goodsName}}</view>
@@ -111,7 +125,7 @@
 								{{item.classHours}}
 								<text>学时</text>
 							</view>
-							<view class="right">¥ {{item.standPrice}}</view>
+							<view class="right">¥ {{toFixed(item.standPrice)}}</view>
 						</view>
 					</view>
 					
@@ -128,9 +142,7 @@ export default {
 	data() {
 		return {
 			infoNums:0,
-			list:[
-				'https://file.xyyxt.net/oss/images/file/20220111.jpg',
-			],
+			list:[],
 			tabCurrent:0,
 			date:['日','一','二','三','四','五','六'],
 			date_num: [],
@@ -139,6 +151,7 @@ export default {
 			autoplay: true,
 			interval: 2000,
 			duration: 500,
+			swiperHeight:0,
 			menu: [{
 					name: '推荐课程',
 				}, {
@@ -176,6 +189,7 @@ export default {
 		this.init()
 		this.courseList();
 		this.bankList();
+		this.getAdvertising()
 	},
 	onShow() {
 		if (uni.getStorageSync('updateHome')|| !this.isOld){
@@ -184,7 +198,7 @@ export default {
 			uni.removeStorageSync('updateHome'); //消费首页刷新事件
 		}
 		
-		if(this.isLogin){
+		if(this.$method.isLogin()){
 			this.$store.state.allowLoading = false;
 			this.$api.getinfoAttached().then(res => {
 				if(res.data.code ===200){
@@ -206,6 +220,79 @@ export default {
 		};
 	},
 	methods: {
+		toFixed(number) {
+			if(number > 0) {
+				return number.toFixed(2)
+			} else {
+				return '0.00'
+			}
+		},
+		/**
+		 * @param {Object} swiper 
+		 * 点击轮播图
+		 */
+		swiperClick(swiper) {
+			if(swiper.jumpType == 1) { //无跳转
+				return;
+			} else if(swiper.jumpType == 2) { //url
+				let url = encodeURIComponent(swiper.jumpUrl)
+				uni.navigateTo({
+					url:'/pages/webview/index?url='+swiper.jumpUrl
+				})
+			} else if(swiper.jumpType == 3) { //内部接口
+				uni.navigateTo({
+					url:swiper.jumpUrl
+				})
+			} else if(swiper.jumpType == 4) { //外部接口
+				uni.navigateToMiniProgram({
+				  appId: swiper.remarks,
+				  path: swiper.jumpUrl,
+				  extraData: {
+				    
+				  },
+				  success(res) {
+				    // 打开成功
+				  },
+				  fail(err) {
+					  console.log(err)
+					 //  uni.showToast({
+					 //  	title:'无效的appId,'+err.errMsg,
+						// icon:'none'
+					 //  })
+				  }
+				})
+			}
+		},
+		/**
+		 * banner图片加载完成
+		 */
+		imageLoad(e) {
+			let winW = 750;
+			let imgW = e.detail.width;
+			let imgH = e.detail.height;
+			this.swiperHeight = 750 * imgH / imgW;
+		},
+		async getAdvertising() {
+			await this.advertisingHomeLocation();
+			await this.advertisingList();
+		},
+		
+		advertisingHomeLocation() {
+			return new Promise(resolve => {
+				this.$api.advertisingHomeLocation().then(res => {
+					this.interval = res.data.data.intervalTime * 1000
+					resolve()
+				})
+			})
+		},
+		advertisingList() {
+			return new Promise(resolve => {
+				this.$api.advertisingList().then(res => {
+					this.list = res.data.rows;
+					resolve()
+				})
+			})
+		},
 		jumpPage(){
 			this.$navTo.togo('/pages2/msg/index')
 		},
@@ -233,12 +320,115 @@ export default {
 				}
 			});
 		},
-		jumpGoodsDetail(item){
+		/**
+		 * @param {Object} item 
+		 * 跳转课程详情
+		 */
+		async jumpGoodsDetail(item){
+			let currentTime = this.$method.getZeroTime();
+			
+			if(currentTime < item.studyStartTime || currentTime > item.studyEndTime) {
+				uni.showToast({
+					title:'不在学习有效期,不可以学习了哦',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
+				uni.showToast({
+					title:'不在班级有效期,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.learningStatus == 2) {
+				uni.showToast({
+					title:'开放学习时间待定,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.classStatus == 0 ) {
+				uni.showToast({
+					title:'尚未开班,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
+				uni.showToast({
+					title:'不在开放学习时间,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > currentTime) &&  (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
+				
+				uni.showModal({
+					title:'提示',
+					content:'班级已过期,需要重新选班',
+					showCancel:false,
+					success:() => {
+						uni.navigateTo({
+							url:"/pages2/wd/class"
+						})
+					}
+				})
+				return;
+			}
+			
+			let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
+			
+			if(rebuildStatus == 0) {
+				this.$navTo.togo('/pages2/learn/details', {
+					gradeId:item.gradeId,
+					goodsId: item.goodsId
+				})
+				return;
+			}
+			
+			if(item.courseNum == 1 ) {
+				
+				this.$api.courseCourseList({
+					pageNum:1,
+					pageSize:1,
+					goodsId:item.goodsId,
+					gradeId:item.gradeId
+				}).then(res => {
+					if(res.data.code == 200) {
+						uni.navigateTo({
+							url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
+						})
+					}
+				});
+				return;
+			}
+			
+			
 			this.$navTo.togo('/pages2/wd/course', {
 				id: item.goodsId,
 				gid:item.gradeId
 			});
 		},
+		/**
+		 * @param {Object} goodsId 商品id
+		 * 查询商品重修状态
+		 */
+		courseGoodsRebuildStatus(goodsId,gradeId) {
+			return new Promise(resolve => {
+				this.$api.courseGoodsRebuildStatus({
+					goodsId:goodsId,
+					gradeId:gradeId
+				}).then(res => {
+					resolve(res.data.data)
+				})
+			})
+		},
 		preveItem() {
 			if (this.goodsIndex > 0) {
 				this.goodsIndex = this.goodsIndex - 1;
@@ -335,7 +525,7 @@ export default {
 		userPlanSeven() {
 			let self = this;
 			this.$api.userPlanSeven().then(result => {
-				if (result.data.data.length>0) {
+				if (result.data.data && result.data.data.length>0) {
 					
 					self.workList = result.data.data
 					self.planGoodsList = self.workList[0].goodsVos;
@@ -376,6 +566,9 @@ export default {
 				}
 			});
 		},
+		swiperChange(e) {
+			this.current = e.detail.current;
+		},
 		tab(e) {
 			this.tabCurrent = e;
 		},
@@ -411,34 +604,60 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-	
+
 .index {
-	.slot-wrap {
-		width:100%;
-		display: flex;
-		align-items: center;
-		justify-content: flex-end;
+	.navbar {
+		/deep/ .u-navbar-inner {
+			margin-right:0!important;
+		}
 		
-		image {
-			margin-right:98rpx;
-			width: 178rpx;
-			height: 31rpx;
+		.slot-wrap {
+			width:100%;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			image {
+				width: 178rpx;
+				height: 31rpx;
+			}
 		}
 	}
 	
+	
 	.swiper {
 		width:100%;
-		image {
-			width:100%;
-		}
+		position: relative;
 		
-		.indicator__dot {
-			background: rgba(255, 255, 255, 1);
+		.dots {
+			position:absolute;
+			left:0;
+			bottom:8rpx;
+			width:100%;
+			display: flex;
+			justify-content: center;
 			
-			&.indicator__dot--active {
-				background: rgba(0, 122, 255, 1);
+			.dot {
+				width: 8rpx;
+				height: 8rpx;
+				background: #FFFFFF;
+				border-radius: 50%;
+				margin:0 4rpx;
+				transition: all 0.3s;
+				
+				&.active {
+					width: 24rpx;
+					height: 8rpx;
+					background: #007AFF;
+					border-radius: 4rpx;
+				}
 			}
 		}
+		image {
+			width:100%;
+		}
+		
+
 	}
 	
 	.content {
@@ -516,11 +735,11 @@ export default {
 						position:relative;
 						
 						&.red {
-							color:red;
+							color:#FF3B30;
 						}
 						
 						&.green {
-							color:green;
+							color:#36C75A;
 						}
 						
 						&.blue {

+ 31 - 0
pages/webview/index.vue

@@ -0,0 +1,31 @@
+<template>
+	<view class="webview">
+		<web-view :webview-styles="webviewStyles" :src="url"></web-view>
+	</view>
+</template>
+
+<script>
+export default {
+	components: {},
+	data() {
+		return {
+			url:'',
+			webviewStyles: {
+				progress: {
+					color: '#007AFF'
+				}
+			}
+		};
+	},
+	onLoad(option) {
+		this.url = decodeURIComponent(option.url);
+	},
+	methods: {
+		
+	},
+};
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 4 - 4
pages2/appointment/appointment_success.vue

@@ -100,16 +100,16 @@ export default {
 			this.$api.getApplylist({ subscribeId: this.subscribeId }).then(res => {
 				if (res.data.code === 200 && res.data.rows.length) {
 					if(res.data.rows[0].applySiteStartTime){
-						res.data.rows[0].applySiteStartTime = res.data.rows[0].applySiteStartTime.replace("-",":")
+						res.data.rows[0].applySiteStartTime = res.data.rows[0].applySiteStartTime
 					}
 					if(res.data.rows[0].applySiteEndTime){
-						res.data.rows[0].applySiteEndTime = res.data.rows[0].applySiteEndTime.replace("-",":")
+						res.data.rows[0].applySiteEndTime = res.data.rows[0].applySiteEndTime
 					}
 					if(res.data.rows[0].applySiteStartTrainTime){
-						res.data.rows[0].applySiteStartTrainTime = res.data.rows[0].applySiteStartTrainTime.replace("-",":")
+						res.data.rows[0].applySiteStartTrainTime = res.data.rows[0].applySiteStartTrainTime
 					}
 					if(res.data.rows[0].applySiteEndTrainTime){
-						res.data.rows[0].applySiteEndTrainTime = res.data.rows[0].applySiteEndTrainTime.replace("-",":")
+						res.data.rows[0].applySiteEndTrainTime = res.data.rows[0].applySiteEndTrainTime
 					}
 					this.listData = res.data.rows[0];
 				}

+ 2 - 2
pages2/appointment/kporder.vue

@@ -141,8 +141,8 @@ export default {
 						startTimeC: items.startTime,
 						endTimeC: items.endTime,
 						dataTime: self.$method.timestampToTime(item.examTime),
-						startTime: items.startTime.replace('-', ':'),
-						endTime: items.endTime.replace('-', ':'),
+						startTime: items.startTime,
+						endTime: items.endTime,
 						num: items.num,
 						registration: items.registration,
 						checked: false,

+ 2 - 2
pages2/appointment/order.vue

@@ -122,8 +122,8 @@ export default {
 						startTimeC: items.startTime,
 						endTimeC: items.endTime,
 						dataTime: self.$method.timestampToTime(item.examTime),
-						startTime: items.startTime.replace('-', ':'),
-						endTime: items.endTime.replace('-', ':'),
+						startTime: items.startTime,
+						endTime: items.endTime,
 						num: items.num,
 						registration: items.registration,
 						checked: false,

+ 2 - 2
pages2/bank/detail.vue

@@ -22,7 +22,7 @@
 			<u-line color="#D6D6DB" />
 		</view>
 		<view class="intro" v-if="current == 0">
-			<view class="content" style="padding:10rpx;"><rich-text :nodes="goodsData.mobileDetailHtml"></rich-text></view>
+			<view v-if="goodsData.mobileDetailHtml" class="content" style="padding:10rpx;"><rich-text :nodes="goodsData.mobileDetailHtml"></rich-text></view>
 		</view>
 		<view class="title-list" v-if="current == 1">
 			<view class="content">
@@ -332,7 +332,7 @@ page {
 			}
 
 			.article {
-				height: 80rpx;
+				min-height: 80rpx;
 				display: flex;
 				align-items: center;
 				margin-left: 64rpx;

+ 56 - 37
pages2/bank/my_question.vue

@@ -1,34 +1,30 @@
 <template>
 	<view style="padding: 30rpx;">
-		<view v-for="(item, index) in list" :key="index"  style="margin-bottom: 30rpx;">
-			<navigator  hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId">
-			<!-- <navigator  hover-class="none" url="/pages2/bank/detail"> -->
-				<view class="class_item">
-					<image class="img" :src="$method.splitImgHost(item.coverUrl, true)"></image>
-					<view style="color: #333333;font-weight: bold;font-size: 32rpx;">
-						{{item.goodsName}}
-					</view>
-					<view class=".content_box">
-						<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
-						学习有效期:<text class="content"> {{$method.timestampToTime(item.studyStartTime)}} - {{$method.timestampToTime(item.studyEndTime)}} </text>
-					</view>
-					
+		<view v-for="(item, index) in list" :key="index"  style="margin-bottom: 30rpx;" @click="studyIn(item,index)">
+			<view class="class_item">
+				<image class="img" :src="$method.splitImgHost(item.coverUrl, true)"></image>
+				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">
+					{{item.goodsName}}
+				</view>
+				<view class=".content_box">
+					<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
+					学习有效期:<text class="content"> {{$method.timestampToTime(item.studyStartTime)}} - {{$method.timestampToTime(item.studyEndTime)}} </text>
 				</view>
-			<!-- </navigator> -->
-				<view class="bottomBox">
-					<view style="color: #999999;font-size: 24rpx;">刷题进度:{{item.doNum}}/{{item.totalNum}}</view>
-					<view class="box_progress">
-						<view style="width: 60%;">
-							<u-line-progress :show-percent="false" height="22" active-color="#007AFF" :percent="(item.doNum/item.totalNum)*100"></u-line-progress>
-						</view>
-						<view>
-							<!-- <navigator  hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId"> -->
-								<view class="btn">进入刷题</view>
-							<!-- </navigator> -->
-						</view>
+				
+			</view>
+			<view class="bottomBox">
+				<view style="color: #999999;font-size: 24rpx;">刷题进度:{{item.doNum}}/{{item.totalNum}}</view>
+				<view class="box_progress">
+					<view style="width: 60%;">
+						<u-line-progress :show-percent="false" height="22" active-color="#007AFF" :percent="(item.doNum/item.totalNum)*100"></u-line-progress>
+					</view>
+					<view>
+						<!-- <navigator  hover-class="none" :url="'/pages2/bank/question_detail?id='+item.goodsId"> -->
+							<view class="btn">进入刷题</view>
+						<!-- </navigator> -->
 					</view>
 				</view>
-			</navigator>
+			</view>
 			
 		</view>
 		<view v-if="list.length==0">
@@ -42,29 +38,52 @@
 	export default {
 		data() {
 			return {
-				list:[]
-				
+				list:[],
+				param:{
+					pageNum: 1,
+					pageSize: 10
+				},
+				total:0,
+				itemIndex:'',
 			}
 		},
 		onLoad(option) {
 			this.listGoodsUserQuestion();
 		},
 		onShow(){
-			
+			if(this.itemIndex !== '') {
+				this.refreshByIndex();
+			}
+		},
+		
+		onReachBottom() {
+			if (this.list.length < this.total) {
+				this.param.pageNum++;
+				this.listGoodsUserQuestion();
+			}
 		},
 		methods: {
 			listGoodsUserQuestion() {
-				this.$api.listGoodsUserQuestion({
-					
-				}).then(res => {
-					this.list = res.data.rows;
+				this.$api.listGoodsUserQuestion(this.param).then(res => {
+					this.list = [...this.list,...res.data.rows];
+					this.total = res.data.total;
 				})
 			},
-			studyIn(){
-				this.$navTo.togo('/pages2/verify/input');
+			studyIn(item,index){
+				this.itemIndex = index;
+				uni.navigateTo({
+					url:'/pages2/bank/question_detail?id='+item.goodsId
+				})
 			},
-			appointment(){
-				this.$navTo.togo('/pages2/appointment/index');
+			
+			refreshByIndex() {
+				console.log('refreshByIndex')
+				this.$api.listGoodsUserQuestion({
+					pageNum:this.itemIndex+1,
+					pageSize:1,
+				}).then(res => {
+					this.$set(this.list,this.itemIndex,res.data.rows[0])
+				})
 			}
 		},
 		

+ 117 - 46
pages2/bank/questionBank.vue

@@ -17,7 +17,6 @@
 								<text>{{ bankIndex + 1 }}/{{ questionList.length }}</text>
 							</view>
 							<view style="color: #666;font-size: 28rpx;">{{ countdown(lastTime) }}</view>
-							<view class="leftLetters"></view>
 						</view>
 						<view class="titles"><rich-text :nodes="bank.content"></rich-text></view>
 					</view>
@@ -102,7 +101,9 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index, bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view>
 							<view v-if="bank.ques">
@@ -110,7 +111,9 @@
 									<text :class="{ right: index == bank.ques || index == bank.ans, wrong: index == bank.ques && bank.ques != bank.ans }" class="activeTI">
 										{{ ast[index] }}
 									</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view>
 						</view>
@@ -178,6 +181,11 @@
 							
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles"><rich-text :nodes="ansItem.content"></rich-text></view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view
@@ -187,7 +195,9 @@
 											@click="radioSelectChild(option.optionsId, ansIndex, bankIndex)"
 										>
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
@@ -201,7 +211,9 @@
 											>
 												{{ ast[childIndex] }}
 											</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 								</view>
@@ -220,6 +232,11 @@
 
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles"><rich-text :nodes="ansItem.content"></rich-text></view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view
@@ -229,7 +246,9 @@
 											@click="checkboxSelectChild(bankIndex, ansIndex, childindex)"
 										>
 											<view :class="{ checked: option.checked }" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex, ansIndex)">确认答案</view>
@@ -238,7 +257,9 @@
 											<text :class="{ right: right(bankIndex, ansIndex, option), wrong: wrong(bankIndex, ansIndex, option) }" class="activeTI">
 												{{ ast[childindex] }}
 											</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 								</view>
@@ -262,11 +283,18 @@
 
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles"><rich-text :nodes="ansItem.content"></rich-text></view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex, childindex, bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
@@ -280,7 +308,9 @@
 											>
 												{{ ast[childindex] }}
 											</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view>
 								</view>
@@ -299,6 +329,11 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox_title">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
 									<view><rich-text :nodes="ansItem.content"></rich-text></view>
 								</view>
 								<view class="pad_8 titBox_title">
@@ -784,11 +819,11 @@ export default {
 						if(checkboxScore) {
 							
 							item.ans.forEach((ans,quesIndex) => {
-								//漏选扣一部分
+								//漏选只能得部分分数
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -801,10 +836,11 @@ export default {
 							item.scoreResult = 0;
 							doWrongQuestionIds.push(item.questionId)
 						} else { //部分分
-							number++;
+							// number++;
+							doWrongQuestionIds.push(item.questionId)
 							item.scoreResult = checkboxScore;
 							score += checkboxScore;
-							rightQuestionIds.push(item.questionId)
+							// rightQuestionIds.push(item.questionId)
 						}
 					}
 					allScore += item.score;
@@ -828,12 +864,16 @@ export default {
 						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 4) {
+					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
-					if (item.ques) {
+					allScore += item.score;
+					if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});
@@ -900,6 +940,7 @@ export default {
 				let number = 0;
 				let score = 0;
 				let doQuestionNum = 0;
+				let doQuestionIds = []; //做过的题目id
 				this.questionList.forEach((item, index) => {
 					if (item.type == 1) {
 						if (item.ques == item.ans) {
@@ -909,6 +950,7 @@ export default {
 
 						if (item.ques) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 2) {
 						let isRight =
@@ -946,7 +988,7 @@ export default {
 									if(item.ques) {
 										
 										if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-											checkboxScore -= item.partScore;
+											checkboxScore = item.partScore;
 										}
 									} else {
 										checkboxScore = 0;
@@ -958,12 +1000,13 @@ export default {
 							if(checkboxScore <= 0) { //0分
 							
 							} else { //部分分
-								number++;
+								// number++;
 								score += checkboxScore;
 							}
 						}
 						if (item.ques && item.ques.length) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 3) {
 						if (item.ques == item.ans) {
@@ -973,14 +1016,17 @@ export default {
 
 						if (item.ques) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item == 4) {
 						if (item.ques.length) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 5) {
-						if (item.ques) {
+						if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					}
 				});
@@ -990,6 +1036,7 @@ export default {
 						examId: this.id,
 						goodsId: this.goodsId,
 						recordId: this.recordId,
+						doQuestionIds:doQuestionIds.join(','),
 						rightQuestionNum: number,
 						moduleExamId:this.moduleId || 0,
 						chapterExamId:this.chapterId || 0,
@@ -1098,7 +1145,7 @@ export default {
 					res.data.data.forEach((item, index) => {
 						if (typeof item.jsonStr == 'string') {
 							item.jsonStr = JSON.parse(item.jsonStr);
-
+							console.log(index)
 							if (item.type == 2) {
 								//多选
 								item.jsonStr.forEach(str => {
@@ -1109,6 +1156,8 @@ export default {
 									arr[i] = '' + a;
 								});
 								item.ans = arr;
+								item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+								item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								return;
 							} else if (item.type == 5) {
 								//简答题
@@ -1121,6 +1170,8 @@ export default {
 									text: '',
 									imageList: []
 								}
+								item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+								item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							} else if (item.type == 4) {
 								//案例题
 								console.log(item.jsonStr);
@@ -1130,6 +1181,7 @@ export default {
 								item.jsonStr.forEach((json, index) => {
 									if (json.type == 1) {
 										ansArr[index] = json.answerQuestion;
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									} else if (json.type == 2) {
 										json.optionsList.forEach(str => {
 											str.optionsId = '' + str.optionsId;
@@ -1139,8 +1191,10 @@ export default {
 											arr[i] = '' + a;
 										});
 										ansArr[index] = arr;
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									} else if (json.type == 3) {
 										ansArr[index] = json.answerQuestion;
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									} else if (json.type == 5) {
 										ansArr[index] = {
 											text: json.answerQuestion,
@@ -1150,18 +1204,25 @@ export default {
 											text: '',
 											imageList: []
 										};
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									}
 								});
 
+								item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+								item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								item.ans = ansArr;
 								return;
 							}
-
+							console.log(item.analysisContent)
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							item.ans = item.answerQuestion;
 						}
 					});
+					
 
 					this.questionList = res.data.data;
+					console.log(this.questionList)
 					this.lastCount = this.questionList.length;
 					this.examRecord();
 					this.getCollectInfo(this.current);
@@ -1485,7 +1546,7 @@ export default {
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -1498,10 +1559,11 @@ export default {
 							item.scoreResult = 0;
 							doWrongQuestionIds.push(item.questionId)
 						} else { //部分分
-							number++;
+							// number++;
+							doWrongQuestionIds.push(item.questionId)
 							item.scoreResult = checkboxScore;
 							score += checkboxScore;
-							rightQuestionIds.push(item.questionId)
+							// rightQuestionIds.push(item.questionId)
 						}
 					}
 					allScore += item.score;
@@ -1525,12 +1587,16 @@ export default {
 						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 4) {
+					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
-					if (item.ques) {
+					allScore += item.score;
+					if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});
@@ -1849,8 +1915,8 @@ export default {
 					//多选
 				} else if (item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item, i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item, i) => {
+						return item == this.questionList[index].ques[i];
 					});
 					//判断
 				} else if (item.type == 3) {
@@ -1901,8 +1967,8 @@ export default {
 					//多选
 				} else if (item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item, index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item, i) => {
+						return item != this.questionList[index].ques[i];
 					});
 					//判断
 				} else if (item.type == 3) {
@@ -1937,6 +2003,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 
 	.flex_auto {
 		flex: 1;
@@ -1957,12 +2024,12 @@ export default {
 
 	&.right {
 		color: #fff;
-		background: green;
+		background: #36C75A;
 	}
 
 	&.wrong {
 		color: #fff;
-		background: red;
+		background: #FF3B30;
 	}
 
 	&.checked {
@@ -1972,6 +2039,10 @@ export default {
 }
 
 .submit_checkbox {
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
 	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
@@ -2083,7 +2154,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color: #fff;
-					background: red;
+					background: #FF3B30;
 					border-radius: 50%;
 				}
 
@@ -2119,25 +2190,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -2272,13 +2343,13 @@ export default {
 	&.isRight {
 		border: 1rpx solid #eeeeee;
 		color: #fff;
-		background: green;
+		background: #36C75A;
 	}
 
 	&.isWrong {
 		border: 1rpx solid #eeeeee;
 		color: #fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 77 - 33
pages2/bank/questionBankAllExplain.vue

@@ -88,13 +88,14 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">{{ item }}</view>
 								</view>
 							</view>
 							<view  v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">{{ item }}</view>
+									
 								</view>
 							</view> 
 						</view>
@@ -150,19 +151,30 @@
 						<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 								</view>
@@ -182,19 +194,30 @@
 							
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 								</view>
@@ -218,19 +241,30 @@
 							
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view>
 								</view>
@@ -252,6 +286,11 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox_title">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
@@ -409,9 +448,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						console.log(item == this.questionList[index].ans[i])
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -461,8 +499,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,i) => {
-						return item != this.questionList[index].ans[i];
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -499,6 +537,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -520,12 +559,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -535,7 +574,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -643,7 +686,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -679,25 +722,26 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
+	
 }
 .popupView {
 	height: 100%;
@@ -834,13 +878,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 102 - 43
pages2/bank/questionBankContinue.vue

@@ -93,7 +93,10 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
@@ -171,19 +174,29 @@
 						<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -203,13 +216,20 @@
 							
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -218,7 +238,9 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -242,19 +264,28 @@
 							
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -276,7 +307,12 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox_title">
-									<view>
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
+									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 								</view>
@@ -560,7 +596,7 @@ export default {
 					//简答题
 					if(hasSpecail) {
 						
-						if (item.ques && (item.ques.text.length || item.ques.imageList.length)) {
+						if (item.ques && (item.ques.text || item.ques.imageList.length)) {
 							count++;
 						}
 					}
@@ -647,6 +683,7 @@ export default {
 				let number = 0;
 				let score = 0;
 				let doQuestionNum = 0;
+				let doQuestionIds = []; //做过的题目id
 				this.questionList.length && this.questionList.forEach((item,index) => {
 					if(item.type == 1) {
 						if(item.ques == item.ans) { 
@@ -655,6 +692,7 @@ export default {
 						}
 						if (item.ques) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if(item.type == 2) {
 						let isRight = item.ques && item.ques.every((quesItem,quesIndex) => {
@@ -667,6 +705,7 @@ export default {
 						}
 						if (item.ques && item.ques.length) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if(item.type == 3) {
 						if(item.ques == item.ans) {
@@ -675,14 +714,17 @@ export default {
 						}
 						if (item.ques) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item == 4) {
 						if (item.ques.length) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					} else if (item.type == 5) {
-						if (item.ques) {
+						if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 							doQuestionNum++;
+							doQuestionIds.push(item.questionId)
 						}
 					}
 				})
@@ -691,6 +733,7 @@ export default {
 					moduleExamId:this.moduleId || 0,
 					chapterExamId:this.chapterId || 0,
 					examId:this.id,
+					doQuestionIds:doQuestionIds.join(''),
 					goodsId:this.goodsId,
 					recordId: this.recordId,
 					rightQuestionNum:number,
@@ -794,7 +837,7 @@ export default {
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -807,10 +850,11 @@ export default {
 							item.scoreResult = 0;
 							doWrongQuestionIds.push(item.questionId)
 						} else { //部分分
-							number++;
+							// number++;
+							doWrongQuestionIds.push(item.questionId)
 							item.scoreResult = checkboxScore;
 							score += checkboxScore;
-							rightQuestionIds.push(item.questionId)
+							// rightQuestionIds.push(item.questionId)
 						}
 					}
 					allScore += item.score;
@@ -832,12 +876,16 @@ export default {
 						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 4) {
+					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
-					if (item.ques) {
+					allScore += item.score;
+					if (item.ques && (item.ques.imageList.length || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			})
@@ -1042,7 +1090,7 @@ export default {
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -1055,10 +1103,11 @@ export default {
 							item.scoreResult = 0;
 							doWrongQuestionIds.push(item.questionId)
 						} else { //部分分
-							number++;
+							// number++;
+							doWrongQuestionIds.push(item.questionId)
 							item.scoreResult = checkboxScore;
 							score += checkboxScore;
-							rightQuestionIds.push(item.questionId)
+							// rightQuestionIds.push(item.questionId)
 						}
 					}
 					allScore += item.score;
@@ -1084,10 +1133,12 @@ export default {
 				} else if (item.type == 4) {
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
-					if (item.ques) {
+					if (item.ques && (item.ques.imageList || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});
@@ -1339,9 +1390,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						console.log(item == this.questionList[index].ans[i])
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -1391,8 +1441,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,i) => {
-						return item != this.questionList[index].ans[i];
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -1429,6 +1479,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -1450,12 +1501,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -1465,7 +1516,15 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1577,7 +1636,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1613,25 +1672,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -1768,13 +1827,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 63 - 29
pages2/bank/questionBankExplain.vue

@@ -73,7 +73,9 @@
 							<view>
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view> 
 						</view>
@@ -120,13 +122,20 @@
 						<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view>
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -145,13 +154,21 @@
 							
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view>
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -172,13 +189,21 @@
 							
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view>
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 								</view>
@@ -199,6 +224,11 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
@@ -424,9 +454,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						console.log(item == this.questionList[index].ans[i])
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -476,8 +505,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,i) => {
-						return item != this.questionList[index].ans[i];
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -514,6 +543,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -535,12 +565,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -550,7 +580,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -658,7 +692,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -694,25 +728,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -849,13 +883,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 82 - 35
pages2/bank/questionBankExplainDetail.vue

@@ -95,13 +95,18 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view> 
 						</view>
@@ -173,19 +178,30 @@
 						<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -205,13 +221,21 @@
 							
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -220,7 +244,10 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -244,19 +271,30 @@
 							
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -278,7 +316,12 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox_title">
-									<view>
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
+									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 								</view>
@@ -957,7 +1000,7 @@ export default {
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -1288,9 +1331,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						console.log(item == this.questionList[index].ans[i])
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -1340,8 +1382,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,i) => {
-						return item != this.questionList[index].ans[i];
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -1383,6 +1425,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -1404,12 +1447,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -1419,7 +1462,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1527,7 +1574,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1563,25 +1610,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -1718,13 +1765,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 91 - 34
pages2/bank/questionBankTest.vue

@@ -92,13 +92,20 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view> 
 						</view>
@@ -164,19 +171,31 @@
 						<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -196,13 +215,21 @@
 							
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -211,7 +238,10 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -235,19 +265,30 @@
 							
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -270,6 +311,11 @@
 							<template v-if="ansItem.type == 5">
 								
 								<view class="pad_8 titBox_title">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
@@ -427,12 +473,14 @@ export default {
 								arr[i] = ''+a;
 							})
 							item.ans = arr;
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 							return;
 						} else if(item.type == 5) { //简答题
 							item.ansText = {
 								text: '',
 								imageList: []
 							}
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 							
 						} else if(item.type == 4) { //案例题
 							console.log(item.jsonStr)
@@ -442,6 +490,7 @@ export default {
 							item.jsonStr.forEach((json,index) => {
 								if(json.type == 1) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 2) {
 									json.optionsList.forEach(str => {
 										str.optionsId = ''+str.optionsId;
@@ -450,9 +499,11 @@ export default {
 									arr.forEach((a,i) => {
 										arr[i] = ''+a;
 									})
-									ansArr[index] = arr
+									ansArr[index] = arr;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 3) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 5) {
 									ansArr[index] = {
 										text: '',
@@ -462,6 +513,7 @@ export default {
 										text: '',
 										imageList: []
 									}
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								}
 							})
 							
@@ -469,7 +521,7 @@ export default {
 							return;
 							
 						}
-						
+						item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 						item.ans = item.answerQuestion
 					}
 					
@@ -886,8 +938,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -937,8 +989,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -970,6 +1022,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -991,12 +1044,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -1006,7 +1059,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1118,7 +1175,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1154,25 +1211,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -1300,13 +1357,13 @@ export default {
 	&.isRight {
 		border:0;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:0;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 	
 	&.disabled {

+ 78 - 34
pages2/bank/questionBankWrongExplain.vue

@@ -90,13 +90,18 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view  v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view> 
 						</view>
@@ -146,19 +151,29 @@
 						<view v-for="(ansItem,ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 								</view>
@@ -176,19 +191,30 @@
 							
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -212,19 +238,29 @@
 							
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -246,7 +282,12 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox_title">
-									<view>
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
+									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 								</view>
@@ -422,9 +463,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						console.log(item == this.questionList[index].ans[i])
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -474,8 +514,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,i) => {
-						return item != this.questionList[index].ans[i];
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -533,12 +573,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -548,7 +588,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -657,7 +701,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -693,25 +737,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -848,13 +892,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 4 - 2
pages2/bank/question_detail.vue

@@ -94,7 +94,7 @@
 						</view>
 						<view v-if="item1.showList">
 							<view class="article active" style="margin-left:64rpx;" v-for="(article, index2) in item1.list" :key="index2">
-								<view class="flex_auto">{{ item1.name }}</view>
+								<view class="flex_auto">{{ article.examName }}</view>
 								<view class="btn" @click="toDo(article.examId, goodsData.goodsId, 0, item1.majorId)" v-if="article.recordStatus == -1">做题</view>
 								<view class="btn" @click="continueDo(article.recordId,article.examId, goodsData.goodsId, 0, item1.majorId)" v-if="article.recordStatus == 0 && article.doType == 1">继续</view>
 								<view class="btn" @click="doRepeat(article.recordId,article.examId, goodsData.goodsId, item1.majorId,0)" v-if="article.recordStatus == 1 || (article.recordStatus == 0 && article.doType == 2)">重做</view>
@@ -129,7 +129,9 @@ export default {
 			}
 		};
 	},
-	onUnload() {},
+	onUnload() {
+		
+	},
 	computed: { ...mapGetters(['userInfo']) },
 	onLoad(option) {
 		this.id = option.id;

+ 60 - 28
pages2/bank/question_record.vue

@@ -26,7 +26,7 @@
 					</view>
 				</view>
 				<view class="btns">
-					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.examId, record.goodsId, record.moduleExamId, record.chapterExamId)">重做</view>
+					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.examId, record.goodsId, record.moduleExamId, record.chapterExamId,index)">重做</view>
 					<navigator
 						:url="
 							'/pages2/bank/questionBankExplain?id=' +
@@ -43,23 +43,8 @@
 						<view class="btn" v-if="record.status == 1">解析</view>
 					</navigator>
 					<navigator  hover-class="none" :url="'/pages2/bank/question_report?goodsId='+record.goodsId+'&chapterId='+record.chapterExamId+'&moduleId='+record.moduleExamId+'&examId='+record.examId+'&id=' + record.recordId"><view class="btn" v-if="record.status == 1">报告</view></navigator>
-					<navigator
-						:url="
-							'/pages2/bank/questionBankContinue?recordId=' +
-								record.recordId +
-								'&id=' +
-								record.examId +
-								'&goodsid=' +
-								record.goodsId +
-								'&moduleId=' +
-								record.moduleExamId +
-								'&chapterId=' +
-								record.chapterExamId +
-								''
-						"
-					>
-						<view class="btn continue" v-if="record.status == 0 && record.historyExamJson">继续答题</view>
-					</navigator>
+
+					<view class="btn continue" @click="doContinue(record,index)" v-if="record.status == 0 && record.historyExamJson">继续答题</view>
 				</view>
 			</view>
 		</view>
@@ -101,9 +86,11 @@ export default {
 				pageNum: 1,
 				pageSize: 10
 			},
+			isRepeat:false,
 			total: 0,
 			activeIndex: 0,
 			typeIndex:0,
+			itemIndex:''
 		};
 	},
 	onLoad(option) {
@@ -129,9 +116,34 @@ export default {
 		}
 	},
 	onShow() {
+		if(this.isRepeat) {
+			this.addRecord();
+		} else {
+			if(this.itemIndex !== '') {
+				this.refreshByIndex();
+			}
+		}
 		
 	},
 	methods: {
+		addRecord() {
+			this.$api.examRecordList({
+				pageNum: 1,
+				pageSize: 1
+			}).then(res => {
+				this.recordList.unshift(res.data.rows[0])
+			});
+			this.isRepeat = false;
+		},
+		refreshByIndex() {
+			this.$api.examRecordList({
+				pageNum: this.itemIndex+1,
+				pageSize: 1
+			}).then(res => {
+				this.$set(this.recordList,this.itemIndex,res.data.rows[0])
+				this.itemIndex = ''
+			});
+		},
 		getExamRecordList() {
 			if (this.param.pageNum == 1) {
 				this.recordList = [];
@@ -141,11 +153,32 @@ export default {
 				this.total = res.data.total;
 			});
 		},
+		/**
+		 * 继续做题
+		 */
+		doContinue(record,index) {
+			this.itemIndex = index;
+			this.isRepeat = false;
+			uni.navigateTo({
+				url:'/pages2/bank/questionBankContinue?recordId=' +
+						record.recordId +
+						'&id=' +
+						record.examId +
+						'&goodsid=' +
+						record.goodsId +
+						'&moduleId=' +
+						record.moduleExamId +
+						'&chapterId=' +
+						record.chapterExamId
+			})
+		},
 		/**
 		 * 去做题
 		 */
-		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0) {
+		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0,index) {
 			// await this.getDetail(goodsId);
+			this.itemIndex = '';
+			this.isRepeat = true;
 			let count = await this.examRecordCount(id,goodsId);
 			let answerNum = await this.getExamDetail(id);
 			//超过答题次数
@@ -280,22 +313,21 @@ page {
 .record {
 	margin-top: 80rpx;
 	padding: 16rpx 8rpx;
-	-moz-column-count: 2; /* Firefox */
-	-webkit-column-count: 2; /* Safari 和 Chrome */
-	column-count: 2;
-	-moz-column-gap: 16rpx;
-	-webkit-column-gap: 16rpx;
-	column-gap: 16rpx;
+	display: flex;
+	flex-wrap: wrap;
 	.item {
 		margin-bottom: 16rpx;
-		-moz-page-break-inside: avoid;
-		-webkit-column-break-inside: avoid;
-		break-inside: avoid;
+		width:359rpx;
 		background: #ffffff;
 		border-radius: 16rpx;
 		padding: 65rpx 20rpx 22rpx;
 		position: relative;
 		overflow: hidden;
+		
+		&:nth-of-type(2n) {
+			margin-left:16rpx;
+			
+		}
 
 		.note {
 			color: #fff;

+ 11 - 7
pages2/bank/question_report.vue

@@ -30,11 +30,12 @@
 			</view>
 			<view class="dis_fst" v-if="!hideBtns">
 				<navigator
+					 v-if="wrongRecordWrongNum != 0"
 					:url="
 						'/pages2/bank/questionBankWrongExplain?recordId=' + reportdata.recordId+'&id='+examData.examId
 					"
 				>
-					<view class="btnACs" v-if="wrongRecordWrongNum != 0">错题解析</view>
+					<view class="btnACs">错题解析</view>
 				</navigator>
 				<navigator
 					:url="
@@ -70,7 +71,7 @@
 						<canvas canvas-id="Canvas2"></canvas>
 					</view>
 					
-					<view class="item" v-show="reportdata.score">
+					<view class="item" v-show="reportdata.score != -1">
 						<view class="title">试卷得分
 							<text>(含简答和案例题)</text>
 						</view>
@@ -182,7 +183,7 @@ export default {
 							context2.draw();
 						}
 						
-						if(this.reportdata.score) {
+						if(this.reportdata.score != -1) {
 							var context3 = uni.createCanvasContext('Canvas3');
 							this.context3 = context3;
 							context3.setStrokeStyle('#EEEEEE');
@@ -259,7 +260,10 @@ export default {
 				return;
 			}
 
-			uni.navigateTo({
+			var pages = getCurrentPages();
+			var prepage = pages[pages.length - 2]; //上一个页面
+			prepage.$vm.isRepeat = true;
+			uni.redirectTo({
 				url: '/pages2/bank/questionBank?id=' + id + '&goodsid=' + goodsId + '&moduleId=' + moduleId + '&chapterId=' + chapterId + ''
 			});
 		},
@@ -277,7 +281,7 @@ export default {
 		examWrongRecordWrongNum() {
 			return new Promise(resolve => {
 				this.$api.examWrongRecordWrongNum(this.recordId).then(res => {
-					this.wrongRecordWrongNum = res.data.data;
+					this.wrongRecordWrongNum = res.data.data || 0;
 					resolve();
 				});
 			});
@@ -448,11 +452,11 @@ page {
 					color: #e12626;
 
 					&.red {
-						color: red;
+						color: #FF3B30;
 					}
 
 					&.green {
-						color: green;
+						color: #36C75A;
 					}
 				}
 			}

+ 277 - 100
pages2/class/questionBank.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="questionBank">
-		<uni-nav-bar @clickLeft="clickLeft" left-icon="back" :statusBar="true" title="试卷"></uni-nav-bar>
+		<uni-nav-bar class="navbar" @clickLeft="clickLeft" left-icon="back" :statusBar="true" title="试卷"></uni-nav-bar>
 		<swiper class="swiper" :current="current" @change="swiperChange" :interval="interval">
 			<swiper-item v-for="(bank, bankIndex) in questionList" :key="bankIndex">
 				<view class="pageContent">
@@ -62,7 +62,7 @@
 									<view class="flex_auto">{{ item.content }}</view>
 								</view>
 							</view>
-							<view v-if="!bank.ques" class="submit_checkbox" :class="{disabled:isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmit(bankIndex)">确认答案</view>
+							<view v-if="!bank.ques" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmit(bankIndex)">确认答案</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in bank.jsonStr" :key="index" class="lisSty">
 									<text
@@ -101,7 +101,10 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index, bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
@@ -109,7 +112,9 @@
 									<text :class="{ right: index == bank.ques || index == bank.ans, wrong: index == bank.ques && bank.ques != bank.ans }" class="activeTI">
 										{{ ast[index] }}
 									</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view>
 						</view>
@@ -150,7 +155,7 @@
 								</view>
 							</view>
 						</view>
-						<view v-if="bank.ques">
+						<view v-if="bank.ques && (bank.ques.text || bank.ques.imageList.length)">
 							<view class="pad_8 answerInfos">
 								<view class="answerTitle">答案解析:</view>
 								<view class="answerContent"><rich-text :nodes="bank.analysisContent"></rich-text></view>
@@ -174,6 +179,11 @@
 						<view v-for="(ansItem, ansIndex) in bank.jsonStr" v-if="bank.current == ansIndex" :key="ansIndex">
 							<template v-if="ansItem.type == 1">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>单选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
@@ -185,7 +195,10 @@
 											@click="radioSelectChild(option.optionsId, ansIndex, bankIndex)"
 										>
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
@@ -199,7 +212,10 @@
 											>
 												{{ ast[childIndex] }}
 											</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 								</view>
@@ -217,6 +233,11 @@
 
 							<template v-if="ansItem.type == 2">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>多选</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
@@ -228,16 +249,22 @@
 											@click="checkboxSelectChild(bankIndex, ansIndex, childindex)"
 										>
 											<view :class="{ checked: option.checked }" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
-									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:isCheckboxChecked(bank.jsonStr)}" @click="checkboxSubmitChild(bankIndex, ansIndex)">确认答案</view>
+									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex, ansIndex)">确认答案</view>
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{ right: right(bankIndex, ansIndex, option), wrong: wrong(bankIndex, ansIndex, option) }" class="activeTI">
 												{{ ast[childindex] }}
 											</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 								</view>
@@ -261,13 +288,21 @@
 
 							<template v-if="ansItem.type == 3">
 								<view class="pad_8 titBox">
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>判断</text>
+										</view>
+									</view>
 									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex, childindex, bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
@@ -281,7 +316,9 @@
 											>
 												{{ ast[childindex] }}
 											</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view>
 								</view>
@@ -300,7 +337,12 @@
 							<!-- 简答题 -->
 							<template v-if="ansItem.type == 5">
 								<view class="pad_8 titBox_title">
-									<view>
+									<view class="leftLetters">
+										<view class="btnType">
+											<text>简答</text>
+										</view>
+									</view>
+									<view class="titles">
 										<rich-text :nodes="ansItem.content"></rich-text>
 									</view>
 								</view>
@@ -391,6 +433,12 @@
 			<view class="text">左右滑动切换上下题</view>
 			<view class="btn" @click="hideDialog">我知道了</view>
 		</view>
+		
+		<view class="dialog-arrow" v-if="showArrow">
+			<image class="pointer" src="/static/arrow-left.png" mode=""></image>
+			<view class="text">您当前正在测试, 若想退出请点击左上角返回按钮。</view>
+			<view class="btn" @click="showArrow = false">我知道了</view>
+		</view>
 
 		<view class="dialog_wrap" v-if="testOver">
 			<view class="bg"></view>
@@ -508,6 +556,7 @@ export default {
 			lastCount: 0, //剩余没有回答的题目数
 			chapterId: 0,
 			moduleId: 0,
+			showArrow:false, //退出提示
 			isFromVideo:'',
 			gradeId:'',
 			courseId:0,
@@ -547,6 +596,7 @@ export default {
 			for (var k in globalData.bankData) {
 				this[k] = globalData.bankData[k];
 			}
+			this.showArrow = true;
 			
 			//需要拍没拍过直接弹出摄像头
 			if(this.needPhoto && !this.isTakePhoto) {
@@ -581,6 +631,11 @@ export default {
 			clearInterval(this.timer)
 			return;
 		}
+		
+		if(this.needPhoto && !this.isTakePhoto) {
+			return;
+		} 
+		
 		//考试试卷 阻止ios手势返回,自动跳回答题页
 		if (this.needBack) {
 			let app = getApp();
@@ -780,6 +835,14 @@ export default {
 		 * 点击后退按钮
 		 */
 		clickLeft() {
+			//需要拍照没有拍直接返回
+			if(this.needPhoto && !this.isTakePhoto) {
+				this.isSubmit = true;
+				uni.navigateBack({
+					delta:1
+				})
+				return;
+			}
 			if (this.bankType == 1) {
 				let ansCount = this.questionOverNum(); //已答题数
 				this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
@@ -900,9 +963,16 @@ export default {
 			uni.navigateBack({
 				delta: 1
 			});
+			
+			//需要拍照没有拍,返回不扣次数
+			if(this.needPhoto && !this.isTakePhoto) {
+				return;
+			}
 			let score = 0; //计算总分
 			let reportStatus = 0;
 			let number = 0;
+			let doQuestionIds = []; //做过的题目id
+			let doQuestionNum = 0;  //做过的题目数量
 			let passScore = 0;
 			let allScore = 0;  //总分
 			this.questionList.forEach((item, index) => {
@@ -916,6 +986,11 @@ export default {
 						
 						item.scoreResult = 0;
 					}
+					
+					if (item.ques) {
+						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
+					}
 					allScore += item.score;
 				} else if (item.type == 2) {
 					let isRight =
@@ -948,7 +1023,7 @@ export default {
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -966,6 +1041,11 @@ export default {
 						score += checkboxScore;
 						
 					}
+					
+					if (item.ques && item.ques.length) {
+						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
+					}
 					allScore += item.score;
 				} else if (item.type == 3) {
 					if (item.ques == item.ans) {
@@ -976,6 +1056,12 @@ export default {
 						
 						item.scoreResult = 0;
 					}
+					if (item.ques) {
+						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
+					}
+					allScore += item.score;
+				} else {
 					allScore += item.score;
 				}
 			});
@@ -996,7 +1082,9 @@ export default {
 					courseId:this.courseId,
 					reportStatus:reportStatus,
 					rightQuestionNum: number,
+					doQuestionNum:doQuestionNum,
 					status: 1,
+					doQuestionIds:doQuestionIds.join(','),
 					gradeId:this.gradeId,
 					performance: score,
 					totalScore: allScore,
@@ -1063,7 +1151,7 @@ export default {
 									if(item.ques) {
 										
 										if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-											checkboxScore -= item.partScore;
+											checkboxScore = item.partScore;
 										}
 									} else {
 										checkboxScore = 0;
@@ -1077,7 +1165,7 @@ export default {
 							} else {
 								item.scoreResult = checkboxScore;
 								score += checkboxScore;
-								number++;
+								// number++;
 							}
 						}
 
@@ -1152,7 +1240,7 @@ export default {
 				.goodsQuestionList({
 					examId: this.id
 				})
-				.then(res => {
+				.then(async res => {
 					if (!res.data.data.length) {
 						this.hideDialog();
 						uni.showModal({
@@ -1183,6 +1271,8 @@ export default {
 									arr[i] = '' + a;
 								});
 								item.ans = arr;
+								item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+								item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								return;
 							} else if (item.type == 5) {
 								//简答题
@@ -1195,6 +1285,8 @@ export default {
 									text: '',
 									imageList: []
 								}
+								item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+								item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							} else if (item.type == 4) {
 								//案例题
 								console.log(item.jsonStr);
@@ -1204,6 +1296,7 @@ export default {
 								item.jsonStr.forEach((json, index) => {
 									if (json.type == 1) {
 										ansArr[index] = json.answerQuestion;
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									} else if (json.type == 2) {
 										json.optionsList.forEach(str => {
 											str.optionsId = '' + str.optionsId;
@@ -1213,8 +1306,10 @@ export default {
 											arr[i] = '' + a;
 										});
 										ansArr[index] = arr;
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									} else if (json.type == 3) {
 										ansArr[index] = json.answerQuestion;
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									} else if (json.type == 5) {
 										ansArr[index] = {
 											text: '',
@@ -1224,73 +1319,87 @@ export default {
 											text: '',
 											imageList: []
 										};
+										json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 									}
 								});
-
+								item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+								item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								item.ans = ansArr;
 								return;
 							}
 
+
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							item.ans = item.answerQuestion;
 						}
 					});
 
 					this.questionList = res.data.data;
 					this.lastCount = this.questionList.length;
-					this.examRecord();
+					
+					
+					await this.examRecord();
+					
 				});
 		},
 		/**
-		 * 记录总题数
+		 * 记录总题数,获取recordId
 		 * hasSpecial (是否包含简答和案例) true 包含  false 不包含
 		 */
 		examRecord(hasSpecial) {
-			let self = this
-			let questionList = 0;
-			if(!hasSpecial) {
-				this.questionList.forEach((item, index) => {
-					if(item.type == 1 || item.type == 2 || item.type == 3) {
-						questionList++;
-					}
-				})
-			} else {
-				questionList = this.questionList.length;
-			}
-			 
-			this.$api
-				.bankRecord({
-					chapterExamId: this.chapterId || 0,
-					moduleExamId: this.moduleId || 0,
-					examId: this.id,
-					goodsId: this.goodsId,
-					gradeId:this.gradeId,
-					totalQuestionNum: questionList
-				})
-				.then(res => {
-					this.recordId = res.data.data;
-					if(self.needPhoto){
-						self.photoPopup = true; //拍照
-					} else {
-						if(this.lastTime) {
-							this.timer = setInterval(() => {
-								if (this.lastTime <= 0) {
-									clearInterval(this.timer);
-									uni.showToast({
-										icon:'none',
-										mask:true,
-										title:'考试时间已到,系统将自动交卷',
-										duration:10000
-									})
+			return new Promise(resolve => {
+				let self = this
+				let questionList = 0;
+				if(!hasSpecial) {
+					this.questionList.forEach((item, index) => {
+						if(item.type == 1 || item.type == 2 || item.type == 3) {
+							questionList++;
+						}
+					})
+				} else {
+					questionList = this.questionList.length;
+				}
+				 
+				this.$api
+					.bankRecord({
+						chapterExamId: this.chapterId || 0,
+						moduleExamId: this.moduleId || 0,
+						examId: this.id,
+						goodsId: this.goodsId,
+						gradeId:this.gradeId,
+						totalQuestionNum: questionList
+					})
+					.then(res => {
+						this.recordId = res.data.data;
+						
+						if(self.needPhoto){
+							self.photoPopup = true; //拍照
+						} else {
+							if(this.lastTime) {
+								this.timer = setInterval(() => {
+									if (this.lastTime <= 0) {
+										clearInterval(this.timer);
+										uni.showToast({
+											icon:'none',
+											mask:true,
+											title:'考试时间已到,系统将自动交卷',
+											duration:10000
+										})
+								
+										this.submit();
+										return;
+									}
+									this.lastTime--;
+								}, 1000);
+							}
 							
-									this.submit();
-									return;
-								}
-								this.lastTime--;
-							}, 1000);
+							
+							resolve()
 						}
-					}
-					
-				});
+						
+					});
+			})
+			
 			
 		},
 		/**
@@ -1424,16 +1533,35 @@ export default {
 
 		
 		pdsubmit() {
-			if (this.bankType == 1) {
-				let ansCount = this.questionOverNum(); //已答题数
-				this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
-				//没有答完
-				if (this.lastCount !== 0) {
-					this.cgType = 6;
-					this.showpopups = true;
+			let ansCount = this.questionOverNum(true); //已答题数
+			this.lastCount = this.questionList.length - ansCount; //统计未答完的题数
+			//没有答完
+			if (this.lastCount !== 0) {
+				this.cgType = 6;
+				this.showpopups = true;
+				return;
+			}
+			
+			if(this.bankType == 2) {
+				if(this.lastTime > 0) {
+					let lastTime = this.countdown(this.lastTime)
+					uni.showModal({
+						title:'提示',
+						content:`时间还剩余${lastTime},确定交卷吗?`,
+						confirmText:'交卷',
+						cancelText:'继续答题',
+						success:(res) => {
+							if(res.confirm) { //确定
+								this.submit();
+							} else {  //取消
+								
+							}
+						}
+					})
 					return;
 				}
 			}
+			
 			this.submit();
 		},
 		/**
@@ -1506,7 +1634,7 @@ export default {
 								if(item.ques) {
 									
 									if(item.ques.indexOf(item.ans[quesIndex]) == -1) {
-										checkboxScore -= item.partScore;
+										checkboxScore = item.partScore;
 									}
 								} else {
 									checkboxScore = 0;
@@ -1519,10 +1647,11 @@ export default {
 							item.scoreResult = 0;
 							doWrongQuestionIds.push(item.questionId)
 						} else { //部分分
-							number++;
+							// number++;
+							doWrongQuestionIds.push(item.questionId)
 							item.scoreResult = checkboxScore;
 							score += checkboxScore;
-							rightQuestionIds.push(item.questionId)
+							// rightQuestionIds.push(item.questionId)
 						}
 					}
 					allScore += item.score;
@@ -1546,12 +1675,16 @@ export default {
 						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 4) {
+					allScore += item.score;
 					if (item.ques && item.ques.length) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				} else if (item.type == 5) {
-					if (item.ques) {
+					allScore += item.score;
+					if (item.ques && (item.ques.imageList || item.ques.text)) {
 						doQuestionNum++;
+						doQuestionIds.push(item.questionId)
 					}
 				}
 			});
@@ -1574,9 +1707,9 @@ export default {
 					reportStatus:reportStatus,
 					recordId: this.recordId,
 					courseId:this.courseId,
-					// rightQuestionNum: number,
+					rightQuestionNum: number,
 					status: 1,
-					// doQuestionIds:doQuestionIds.join(','),
+					doQuestionIds:doQuestionIds.join(','),
 					// rightQuestionIds:rightQuestionIds.join(','),
 					// doQuestionNum: doQuestionNum,
 					performance: score,
@@ -1820,8 +1953,8 @@ export default {
 					//多选
 				} else if (item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item, i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item, i) => {
+						return item == this.questionList[index].ques[i];
 					});
 					//判断
 				} else if (item.type == 3) {
@@ -1872,8 +2005,8 @@ export default {
 					//多选
 				} else if (item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item, index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item, i) => {
+						return item != this.questionList[index].ques[i];
 					});
 					//判断
 				} else if (item.type == 3) {
@@ -1945,6 +2078,10 @@ export default {
 		}
 	}
 	
+.navbar {
+	position: relative;
+	z-index: 20000;
+}
 .questionBank {
 	width:100%;
 	height:100vh;
@@ -1978,12 +2115,12 @@ export default {
 
 	&.right {
 		color: #fff;
-		background: green;
+		background: #36C75A;
 	}
 
 	&.wrong {
 		color: #fff;
-		background: red;
+		background: #FF3B30;
 	}
 
 	&.checked {
@@ -1993,6 +2130,10 @@ export default {
 }
 
 .submit_checkbox {
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
 	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
@@ -2104,7 +2245,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color: #fff;
-					background: red;
+					background: #FF3B30;
 					border-radius: 50%;
 				}
 
@@ -2140,25 +2281,25 @@ export default {
 		}
 	}
 }
+.leftLetters {
+	display: flex;
+	align-items: center;
+	width: 220rpx;
+	.btnType {
+		padding: 5rpx 10rpx;
+		border: 1rpx solid #007aff;
+		border-radius: 10rpx;
+		background-color: rgba(0, 122, 255, 0.1);
+		font-size: 28rpx;
+		color: #007aff;
+		margin-right: 15rpx;
+	}
+}
 .firstLetter {
 	display: flex;
 	justify-content: space-between;
 	align-items: center;
 	margin-bottom: 30rpx;
-	.leftLetters {
-		display: flex;
-		align-items: center;
-		width: 220rpx;
-		.btnType {
-			padding: 5rpx 10rpx;
-			border: 1rpx solid #007aff;
-			border-radius: 10rpx;
-			background-color: rgba(0, 122, 255, 0.1);
-			font-size: 28rpx;
-			color: #007aff;
-			margin-right: 15rpx;
-		}
-	}
 }
 .popupView {
 	height: 100%;
@@ -2293,13 +2434,13 @@ export default {
 	&.isRight {
 		border: 1rpx solid #eeeeee;
 		color: #fff;
-		background: green;
+		background: #36C75A;
 	}
 
 	&.isWrong {
 		border: 1rpx solid #eeeeee;
 		color: #fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {
@@ -2352,6 +2493,42 @@ export default {
 	}
 }
 
+.dialog-arrow {
+	padding-top:124rpx;
+	position: fixed;
+	left: 0;
+	top: 0;
+	width: 100%;
+	height: 100%;
+	background-color: rgba(0, 0, 0, 0.8);
+	z-index: 20000;
+	
+	.pointer {
+		margin-left:87rpx;
+		display: block;
+		width:95rpx;
+		height:98rpx;
+	}
+
+	.text {
+		padding-left:177rpx;
+		font-size: 32rpx;
+		color: #ffffff;
+	}
+
+	.btn {
+		width: 242rpx;
+		height: 82rpx;
+		border: 2rpx solid #ffffff;
+		border-radius: 16rpx;
+		text-align: center;
+		line-height: 82rpx;
+		margin: 500rpx auto 0;
+		color: #fff;
+		font-size: 32rpx;
+	}
+}
+
 .dialog_wrap {
 	position: fixed;
 	left: 0;

+ 2 - 2
pages2/class/question_report.vue

@@ -284,11 +284,11 @@ page {
 					color: #e12626;
 
 					&.red {
-						color: red;
+						color: #FF3B30;
 					}
 
 					&.green {
-						color: green;
+						color: #36C75A;
 					}
 				}
 			}

+ 11 - 9
pages2/exam/exam_appointment.vue

@@ -24,8 +24,8 @@
 						<view class="item">
 							<view class="left">考试时间</view>
 							<view class="right">
-								{{ $method.timestampToTime(item.applySiteExamTime) }} {{ item.applySiteStartTime.replace('-', ':') }} ~
-								{{ item.applySiteEndTime.replace('-', ':') }}
+								{{ $method.timestampToTime(item.applySiteExamTime) }} {{ item.applySiteStartTime }} ~
+								{{ item.applySiteEndTime }}
 							</view>
 						</view>
 						<view class="item" v-if="item.applySiteAddressTrain">
@@ -35,8 +35,8 @@
 						<view class="item" v-if="item.applySiteExamTrainTime && item.applySiteStartTrainTime && item.applySiteEndTrainTime">
 							<view class="left">考前培训时间</view>
 							<view class="right">
-								{{ $method.timestampToTime(item.applySiteExamTrainTime) }} {{ item.applySiteStartTrainTime.replace('-', ':') }} ~
-								{{ item.applySiteEndTrainTime.replace('-', ':') }}
+								{{ $method.timestampToTime(item.applySiteExamTrainTime) }} {{ item.applySiteStartTrainTime }} ~
+								{{ item.applySiteEndTrainTime }}
 							</view>
 						</view>
 					</view>
@@ -86,9 +86,9 @@
 							{{
 								$method.timestampToTime(activeList.applySiteExamTime) +
 									' ' +
-									activeList.applySiteStartTime.replace('-', ':') +
+									activeList.applySiteStartTime +
 									'~' +
-									activeList.applySiteEndTime.replace('-', ':')
+									activeList.applySiteEndTime
 							}}
 						</text>
 					</view>
@@ -102,9 +102,9 @@
 							{{
 								$method.timestampToTime(activeList.applySiteExamTrainTime) +
 									' ' +
-									activeList.applySiteStartTrainTime.replace('-', ':') +
+									activeList.applySiteStartTrainTime +
 									'~' +
-									activeList.applySiteEndTrainTime.replace('-', ':')
+									activeList.applySiteEndTrainTime
 							}}
 						</text>
 					</view>
@@ -188,9 +188,11 @@ export default {
 		isShowFun(times) {
 			var timestamp = parseInt(new Date().getTime() / 1000);
 			var newDataAge = parseInt(new Date(new Date().toLocaleDateString()).getTime() / 1000);
+			//报名开放时间”过了“结束时间点”,【取消预约】按钮隐藏
 			if (times.applyEndTime <= timestamp) {
 				return false;
 			} else {
+				//报名开放时间-进行中,【前培标记:已开通】,【取消预约】按钮隐藏
 				if (times.beforeStatus === 1) {
 					console.log(1);
 					return false;
@@ -207,7 +209,7 @@ export default {
 					console.log(5);
 					var hours = new Date().getHours();
 					var mins = new Date().getMinutes();
-					var arrays = times.applySiteStartTime.split('-').map(Number);
+					var arrays = times.applySiteStartTime.split(':').map(Number);
 					if (arrays[0] > hours) {
 						return true;
 					} else if (arrays[0] < hours) {

+ 6 - 6
pages2/exam/exam_result.vue

@@ -24,8 +24,8 @@
 						<view class="item">
 							<view class="left">考试时间</view>
 							<view class="right">
-								{{ $method.timestampToTime(item.applySiteExamTime) }} {{ item.applySiteStartTime.replace('-', ':') }} ~
-								{{ item.applySiteEndTime.replace('-', ':') }}
+								{{ $method.timestampToTime(item.applySiteExamTime) }} {{ item.applySiteStartTime }} ~
+								{{ item.applySiteEndTime }}
 							</view>
 						</view>
 						<view class="item">
@@ -87,9 +87,9 @@
 						<text class="val">{{
 								$method.timestampToTime(activeList.applySiteExamTime) +
 									' ' +
-									activeList.applySiteStartTime.replace('-', ':') +
+									activeList.applySiteStartTime +
 									'~' +
-									activeList.applySiteEndTime.replace('-', ':')
+									activeList.applySiteEndTime
 							}}</text>
 					</view>
 					<view class="item" v-if="activeList.applySiteAddressTrain">
@@ -101,9 +101,9 @@
 						<text class="val">{{
 								$method.timestampToTime(activeList.applySiteExamTrainTime) +
 									' ' +
-									activeList.applySiteStartTrainTime.replace('-', ':') +
+									activeList.applySiteStartTrainTime +
 									'~' +
-									activeList.applySiteEndTrainTime.replace('-', ':')
+									activeList.applySiteEndTrainTime
 							}}</text>
 					</view>
 				</view>

+ 876 - 77
pages2/invoice/index.vue

@@ -7,32 +7,78 @@
 			<view class="open" v-if="current == 0">
 				<view class="form">
 					<u-form :model="form" ref="uForm">
-						<u-form-item label="发票类型" label-width="130" required >
-							<u-radio-group v-model="form.type" prop="type">
+						<u-form-item label="发票类型" label-width="130" required prop="type" >
+							<u-radio-group v-model="form.type" @change="formTypeChange">
 								<u-radio v-for="(item, index) in typeList" :key="index" :name="item.value">
 									{{ item.name }}
 								</u-radio>
 							</u-radio-group>
 						</u-form-item>
-						<u-form-item label="申请主体" label-width="130" required >
-							<u-radio-group v-model="form.main" prop="main">
-								<u-radio v-for="(item, index) in mainList" :key="index" :name="item.value">
-									{{ item.name }}
-								</u-radio>
-							</u-radio-group>
-						</u-form-item>
-						<u-form-item label="发票抬头" label-width="130" required prop="header" >
-							<u-input placeholder="请输入" v-model="form.header" />
-						</u-form-item>
-						<u-form-item label="选择订单" label-width="130" required prop="orderId" right-icon="arrow-right">
+						
+						<!-- 增值税发票 -->
+						<template v-if="form.type == 2">
+							
+							<u-form-item label="申请主体" label-width="130" required  prop="main">
+								<u-radio-group v-model="form.main">
+									<u-radio :key="index" name="2">
+										企业
+									</u-radio>
+								</u-radio-group>
+							</u-form-item>
+							
+							<u-form-item label="发票抬头" label-width="130" required prop="header" >
+								<u-input placeholder="请输入" v-model="form.header" />
+							</u-form-item>
+							<u-form-item label="单位税号" label-width="130" required prop="tax" >
+								<u-input placeholder="请输入" v-model="form.tax" />
+							</u-form-item>
+							<u-form-item label="单位地址" label-width="130" required prop="address" >
+								<u-input placeholder="请输入" v-model="form.address" />
+							</u-form-item>
+							<u-form-item label="电话号码" label-width="130" required prop="tel" >
+								<u-input placeholder="请输入" v-model="form.tel" />
+							</u-form-item>
+							<u-form-item label="开户银行" label-width="130" required prop="bank" >
+								<u-input placeholder="请输入" v-model="form.bank" />
+							</u-form-item>
+							<u-form-item label="银行账号" label-width="130" required prop="bankNo" >
+								<u-input placeholder="请输入" v-model="form.bankNo" />
+							</u-form-item>
+							<u-form-item label="收件地址" label-width="130" required prop="recieveAddress" >
+								<u-input placeholder="请输入" v-model="form.recieveAddress" />
+							</u-form-item>
+							<u-form-item label="收件人" label-width="130" required prop="name" >
+								<u-input placeholder="请输入" v-model="form.name" />
+							</u-form-item>
+							<u-form-item label="收件手机" label-width="130" required prop="phone" >
+								<u-input placeholder="请输入" v-model="form.phone" />
+							</u-form-item>
+							
+						</template>
+						<!-- 增值税发票 -->
+						
+						<!-- 普通发票 -->
+						<template v-else>
+							<u-form-item label="申请主体" label-width="130" required prop="main">
+								<u-radio-group v-model="form.main">
+									<u-radio v-for="(item, index) in mainList" :key="index" :name="item.value">
+										{{ item.name }}
+									</u-radio>
+								</u-radio-group>
+							</u-form-item>
+							
+							<u-form-item label="发票抬头" label-width="130" required prop="header" >
+								<u-input placeholder="请输入" v-model="form.header" />
+							</u-form-item>
+						</template>
+						<!-- 普通发票 -->
+						
+						
+						<u-form-item label="选择订单" label-width="130" required prop="orderIds" right-icon="arrow-right" ref="orderIds">
 							<view class="form-item" @click="selectOrderModal = true">
-								<u-input v-if="false" v-model="form.orderId" />
-								<view class="content">
-									{{ form.orderId || '请选择' }}
-								</view>
+								<u-input placeholder="请选择" disabled  @click="selectOrderModal = true" v-model="form.orderIds" />
 							</view>
 						</u-form-item>
-						
 						<view>
 							<view class="check-order" v-for="(item,index) in orderList" :key="index" v-if="item.disabled">
 									<view class="close" @click="deleteOrder(index)">
@@ -52,17 +98,70 @@
 					<view class="order-text__price">¥ 999.00</view>
 				</view>
 				
-				<view class="submit">
+				<view class="submit" @click="formSubmit">
 					提交申请
 				</view>
 			</view>
-			<view class="record" v-if="current == 1">
-				record
+			<view class="." v-if="current == 1">
+				<view class="nodata" v-if="!recordList.length">
+					您暂无相关发票记录哦~
+				</view>
+				
+				<view class="record__list">
+					<view class="record-item"  @click="orderDetailModal = true;" v-for="(record,index) in recordList" :key="index">
+						<view class="item__time">2021/10/29 09:30:00</view>
+						<view class="item__content">
+							<view class="top">
+								<view class="state" :class="{wait:record.state == 1,refuse:record.state == 2,agree:record.state == 3}">
+									<text v-if="record.state == 1">待审核</text>
+									<text v-if="record.state == 2">驳回</text>
+									<text v-if="record.state == 3">通过</text>
+									<u-icon class="arrow" name="arrow-right" color="#ffffff" size="28"></u-icon>
+								</view>
+							</view>
+							
+							<view class="bottom">
+								<view class="flex">
+									<view class="text">发票类型</view>
+									<view class="flex__auto">
+										<text>普通发票</text>
+									</view>
+								</view>
+								<view class="flex">
+									<view class="text">申请主体</view>
+									<view class="flex__auto">
+										<text>个人</text>
+									</view>
+								</view>
+								<view class="flex">
+									<view class="text">发票状态</view>
+									<view class="flex__auto">
+										<text class="red" :class="{red:record.state != 2 ,green:record.state == 2}">未开票</text>
+									</view>
+								</view>
+								<view @click.stop="showOrder(record.checked,index)">
+									<view class="flex noborder" >
+										<view class="text">开票订单</view>
+										<view class="flex__auto">
+											<text class="red">3</text>
+											<u-icon v-if="!record.checked" name="arrow-down" color="#ccc" size="28"></u-icon>
+											<u-icon v-if="record.checked" name="arrow-up" color="#ccc" size="28"></u-icon>
+										</view>
+									</view>
+									<view class="order-list" v-if="record.checked">
+										<view class="order-item">1.2021七大员新考施工专业人员岗提高班</view>
+										<view class="order-item">2.2021七大员新考施工专业人员岗提高班订单名称过长换行</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
 		
-		<u-popup class="modal" v-model="selectOrderModal" mode="bottom" border-radius="40">
-			<view class="popup_box">
+		<u-popup class="modal" v-model="selectOrderModal" mode="bottom" border-radius="24">
+			<view class="select-order">
 				<view class="line"></view>
 				<view class="title">选择订单</view>
 				<u-line color="#D6D6DB" />
@@ -96,7 +195,161 @@
 					</scroll-view>
 				</view>
 				<view class="confrim-btn">
-					<view class="okBtn" @click="okPopup(1)">确定</view>
+					<view class="okBtn" @click="okPopup()">确定</view>
+				</view>
+			</view>
+		</u-popup>
+		
+		<u-popup class="modal" v-model="orderDetailModal" mode="center" border-radius="40">
+			<view class="order-detail">
+				<view class="order-detail__content">
+					<scroll-view scroll-y="true" style="height: 972rpx;">
+						<view class="content">
+							<view class="header">2021年10月29日 09:30:00</view>
+							<view class="body">
+								<view class="body__item">
+									<view class="title">发票申请信息</view>
+									<view class="content">
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">发票类型:</view>
+											<text>普通发票</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">申请主体:</view>
+											<text>个人</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">发票抬头:</view>
+											<text>广东中正科技教育科技有限公司</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">单位税号:</view>
+											<text>SH123456789</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">单位地址:</view>
+											<text>广州市天河区燕岭路123号建设大厦F座 16楼过长换行</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">电话号码:</view>
+											<text>企业 拷贝</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">开户银行:</view>
+											<text>中国工商银行星星支行</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">银行账号:</view>
+											<text>SH123456789 拷贝</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">收件地址:</view>
+											<text>广州市天河区燕岭路123号</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">收件人:</view>
+											<text>李大米</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">发票抬头:</view>
+											<text>广东中正科技教育科技有限公司</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false" >
+											<view slot="title">收件手机:</view>
+											<text>13800138000</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false" >
+											<view slot="title">开票订单:</view>
+										</u-cell-item>
+										<view class="order-list">
+											<view class="order-item">
+												<view class="order-title">2021七大员新考施工专业人员岗提高班</view>
+												<view class="order-number">GDXY1234567890</view>
+												<view class="order-price">¥ 100元</view>
+											</view>
+											<view class="order-item">
+												<view class="order-title">2021七大员新考施工专业人员岗提高班</view>
+												<view class="order-number">GDXY1234567890</view>
+												<view class="order-price">¥ 100元</view>
+											</view>
+											<view class="order-item">
+												<view class="order-title">2021七大员新考施工专业人员岗提高班</view>
+												<view class="order-number">GDXY1234567890</view>
+												<view class="order-price">¥ 100元</view>
+											</view>
+										</view>
+										<view class="order-text">
+											<view class="order-text__label">本次申请开票金额:</view>
+											<view class="order-text__price">¥ 999.00</view>
+										</view>
+									</view>
+								</view>
+								<view class="body__item">
+									<view class="title">发票申请结果</view>
+									<view class="content">
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">审核结果:</view>
+											<text class="text wait">待审核</text>
+											<text class="text agree">通过</text>
+											<text class="text refuse">驳回</text>
+										</u-cell-item>
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">发票状态:</view>
+											<text class="text refuse">未开票</text>
+											<text class="text agree">已开票</text>
+											<text class="text refuse">已退票</text>
+										</u-cell-item>
+										
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">发票预览:</view>
+											<view>
+												<image class="preview" src="/static/info_3.png"></image>
+												<view class="download-btn" @click="download">下载电子发票</view>
+											</view>
+										</u-cell-item>
+										
+										
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">机构发票邮寄状态:</view>
+											<text class="text">是</text>
+										</u-cell-item>
+										
+										<u-cell-item :border-bottom="false" hover-class="none" :arrow="false">
+											<view slot="title">发票邮寄快递单号:</view>
+											<text class="text">153666689456</text>
+										</u-cell-item>
+									</view>
+								</view>
+							</view>
+						</view>
+						
+					</scroll-view>
+				</view>
+				<view class="order-detail__btns">
+					<view class="btn" @click="orderDetailModal = false;">知道了</view>
+					<view class="btn warm" @click="orderCancelModal = true;">撤销申请</view>
+				</view>
+				
+				<view class="order-detail__btns">
+					<view class="btn ok" @click="orderDetailModal = false;">知道了</view>
+				</view>
+			</view>
+		</u-popup>
+		
+		<u-popup class="modal" v-model="orderCancelModal" mode="center" border-radius="24">
+			<view class="order-cancel">
+				<view class="header">
+					温馨提示
+				</view>
+				<view class="body">
+					<view>撤销申请后,</view>
+					<view>本次的发票申请内容将不存在。</view>
+					<view>请慎重考虑。 </view>
+					<view>您确定要取消本次发票申请吗?</view>
+				</view>
+				<view class="footer">
+					<view class="btn cancel" @click="orderCancelModal = false;">取消</view>
+					<view class="btn ok" @click="orderCancel()">确定</view>
 				</view>
 			</view>
 		</u-popup>
@@ -110,6 +363,16 @@ export default {
 	data() {
 		return {
 			checkOrderList:[],
+			recordList:[{
+				checked:false,
+				state:'1'
+			},{
+				checked:false,
+				state:'2'
+			},{
+				checked:false,
+				state:'3'
+			}],
 			list: [
 				{
 					name: '发票申请'
@@ -122,12 +385,122 @@ export default {
 				type:'',
 				main:'',
 				header:'',
-				orderId:'',
+				orderIds:'',
+			},
+			rules: {
+				phone: [
+					{ 
+						required: true, 
+						message: '请输入收件手机', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					},
+					{
+						validator: (rule, value, callback) => {
+							// 上面有说,返回true表示校验通过,返回false表示不通过
+							// this.$u.test.mobile()就是返回true或者false的
+							return this.$u.test.mobile(value);
+						},
+						message: '手机号码格式不正确',
+						// 触发器可以同时用blur和change
+						trigger: ['change'],
+					}
+				],
+				type: [
+					{ 
+						required: true, 
+						message: '请选择发票类型', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				main: [
+					{ 
+						required: true, 
+						message: '请选择申请主体', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				header: [
+					{ 
+						required: true, 
+						message: '请输入发票抬头', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				tax: [
+					{ 
+						required: true, 
+						message: '请输入单位税号', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				address: [
+					{ 
+						required: true, 
+						message: '请输入单位地址', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				tel: [
+					{ 
+						required: true, 
+						message: '请输入电话号码', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				bank: [
+					{ 
+						required: true, 
+						message: '请输入开户银行', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				bankNo: [
+					{ 
+						required: true, 
+						message: '请输入银行账号', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				recieveAddress: [
+					{ 
+						required: true, 
+						message: '请输入收件地址', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				name: [
+					{ 
+						required: true, 
+						message: '请输入收件人', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
+				orderIds: [
+					{ 
+						required: true, 
+						message: '请选择订单', 
+						// 可以单个或者同时写两个触发验证方式 
+						trigger: ['change'],
+					}
+				],
 			},
 			orderValue:'',
 			orderList:[{checked:false,name:'1'},{checked:false,name:'2'},{checked:false,name:'3'},{checked:false,name:'4'}],
 			selectOrderModal:false,
-			current: 0,
+			orderDetailModal:false,
+			orderCancelModal:false,
+			current: 1,
 			order: [],
 			typeList:[{
 				name:'普通发票',
@@ -147,12 +520,48 @@ export default {
 	},
 	// onPullDownRefresh() {},
 	onLoad(option) {
-		
+		// this.$refs.uForm.setRules(this.rules)
 	},
 	onShow() {
 		
 	},
 	methods: {
+		/**
+		 * @param {Object} checkedState 显示状态
+		 * @param {Object} index 索引值
+		 * 修改开票订单列表显示状态
+		 */
+		showOrder(showState,index) {
+			this.$set(this.recordList[index],'checked',!showState)
+		},
+		/**
+		 * 发票申请提交
+		 */
+		formSubmit() {
+			this.$refs.uForm.validate(valid => {
+				if(valid) {
+					uni.showToast({
+						title:'申请成功'
+					})
+				}
+			})
+		},
+		/**
+		 * @param {Object} e value
+		 * 发票类型修改
+		 */
+		formTypeChange(e) {
+			console.log(e)
+			if(e == '2') {
+				this.$set(this.form,'main','2')
+			} else {
+				this.$set(this.form,'main','')
+			}
+		},
+		/**
+		 * @param {Object} e
+		 * tabs 切换
+		 */
 		change(e) {
 			console.log(e)
 			this.current = e;
@@ -163,18 +572,64 @@ export default {
 		},
 		okPopup() {
 			this.selectOrderModal = false;
+			let strArr = [];
 			this.orderList.forEach((item,index) => {
 				if(item.checked) {
 					this.$set(this.orderList[index],'disabled',true)
+					strArr.push(item.name)
 				}
 			})
 			
-			console.log(this.checkOrderList)
+			this.form.orderIds = strArr.join(',')
+			this.$nextTick(() => {
+				this.$refs.orderIds.onFieldChange()
+			})
+			console.log(this.$refs.orderIds)
 		},
 		
 		deleteOrder(index) { 
 			this.$set(this.orderList[index],'disabled',false)
 			this.$set(this.orderList[index],'checked',false)
+			let strArr = [];
+			this.orderList.forEach((item,index) => {
+				if(item.checked) {
+					strArr.push(item.name)
+				}
+			})
+			
+			this.form.orderIds = strArr.join(',')
+			this.$nextTick(() => {
+				this.$refs.orderIds.onFieldChange()
+			})
+		},
+		
+		download() {
+			uni.downloadFile({
+			  url: 'https://gw.alipayobjects.com/os/bmw-prod/c134022a-1088-47e2-bb76-a33ec0519101.pdf?spm=a2c4g.11186623.0.0.cf863d1fUcFiPN&file=c134022a-1088-47e2-bb76-a33ec0519101.pdf',
+			  success: function (res) {
+				  console.log(999)
+			    var filePath = res.tempFilePath;
+			    uni.openDocument({
+			      filePath: filePath,
+			      showMenu: true,
+			      success: function (res) {
+			        console.log(res,'打开文档成功');
+			      },
+				  fail:function(err) {
+					  console.log(err)
+				  }
+			    });
+			  }
+			});
+		},
+		
+		orderCancel() {
+			this.orderDetailModal = false;
+			this.orderCancelModal = false;
+			uni.showToast({
+				title:'撤销成功',
+				icon:'none'
+			})
 		}
 	},
 	computed: { ...mapGetters(['userInfo']) }
@@ -200,6 +655,7 @@ page {
 		padding-top:96rpx;
 		
 		.open {
+			padding-bottom:150rpx;
 			margin:8rpx 24rpx 0;
 			
 			.form {
@@ -298,77 +754,420 @@ page {
 				transform: translateX(-50%);
 			}
 		}
+		
+		.record {
+			.nodata {
+				padding-top:160rpx;
+				font-size: 32rpx;
+				text-align: center;
+				color: #999999;
+			}
+			
+			&__list {
+				
+				.record-item {
+					margin:0 8rpx 10rpx;
+					.item__time {
+						padding:20rpx 0;
+						text-align: center;
+						font-size: 24rpx;
+						color: #999999;
+					}
+					
+					.item__content {
+						background:#fff;
+						border-radius: 16rpx;
+						
+						.top {
+							padding:12rpx 0;
+							border-bottom:1px solid #EEEEEE;
+							.state {
+								position:relative;
+								text-align: center;
+								color:#fff;
+								font-size: 30rpx;
+								margin:0 auto;
+								width: 240rpx;
+								height: 56rpx;
+								line-height: 56rpx;
+								background: #007AFF;
+								border-radius: 28rpx;
+								
+								&.wait {
+									background: #007AFF;
+								}
+								&.refuse {
+									background: #FF3B30;
+								}
+								&.wait {
+									background: #34C759;
+								}
+								
+								.arrow {
+									position:absolute;
+									top:50%;
+									transform: translateY(-50%);
+									right:18rpx;
+								}
+							}
+						}
+						
+						.bottom {
+							padding:0 32rpx;
+							.flex {
+								height:80rpx;
+								display: flex;
+								align-items: center;
+								border-bottom:1px solid #EEEEEE;
+								
+								&.noborder{
+									border:0;
+								}
+								
+								
+								.text {
+									font-size: 24rpx;
+									color: #666666;
+								}
+								
+								&__auto {
+									text-align: right;
+									flex:1;
+									font-size: 30rpx;
+									font-weight: bold;
+									color: #666666;
+									
+									.red {
+										color:#FF3B30;
+									}
+									
+									.green {
+										color:#34C759;
+									}
+								}
+							}
+							
+							.order-list {
+								padding-bottom:30rpx;
+								.order-item {
+									border-radius: 16rpx;
+									padding:14rpx;
+									background:#F5F5F5;
+									font-size: 30rpx;
+									color:#333;
+									margin-top:16rpx;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
 	}
 	
 	.modal {
-		.line {
-			width: 80rpx;
-			height: 8rpx;
-			background: #999999;
-			border-radius: 4rpx;
-			margin:8rpx auto 0;
-		}
 		
-		.title {
-			margin:20rpx 0 15rpx;
-			text-align: center;
-			font-size: 24rpx;
-			color: #999999;
+		.select-order {
+			.line {
+				width: 80rpx;
+				height: 8rpx;
+				background: #999999;
+				border-radius: 4rpx;
+				margin:8rpx auto 0;
+			}
+			
+			.title {
+				margin:20rpx 0 15rpx;
+				text-align: center;
+				font-size: 24rpx;
+				color: #999999;
+			}
+			
+			.order-item {
+				display: flex;
+				align-items: center;
+				padding: 20rpx;
+				
+				
+				&__bg {
+					width: 654rpx;
+					height: 168rpx;
+					background: #F5F5F5;
+					border: 2px solid #F5F5F5;
+					border-radius: 16rpx;
+					padding:20rpx;
+					
+					
+					&.active {
+						background: #EBF5FF;
+						border: 2px solid #007AFF;
+					}
+					
+					.order-title,.order-number,.order-price {
+						color:#333333;
+						margin-top:10rpx;
+						line-height: 30rpx;
+						font-size: 30rpx;
+					}
+					
+					.order-number {
+						color:#999;
+					}
+				}
+			}
+			
+			.confrim-btn {
+				width: 750rpx;
+				height: 98rpx;
+				background: rgba(255, 255, 255, 0.98);
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				
+				.okBtn {
+					text-align: center;
+					line-height: 64rpx;
+					color:#fff;
+					font-size: 30rpx;
+					width: 200rpx;
+					height: 64rpx;
+					background: linear-gradient(0deg, #015EEA, #00C0FA);
+					border-radius: 32rpx;
+				}
+			}
 		}
 		
-		.order-item {
+		.order-detail {
+			width: 640rpx;
+			height: 1112rpx;
+			background: #FFFFFF;
 			display: flex;
-			align-items: center;
-			padding: 20rpx;
+			flex-direction: column;
 			
 			
-			&__bg {
-				width: 654rpx;
-				height: 168rpx;
-				background: #F5F5F5;
-				border: 2px solid #F5F5F5;
-				border-radius: 16rpx;
-				padding:20rpx;
-				
+			&__content {
+				flex:1;
 				
-				&.active {
-					background: #EBF5FF;
-					border: 2px solid #007AFF;
+				.content {
+					padding:24rpx 24rpx 0;
+					
+					/deep/ .u-cell {
+						padding:10rpx;
+						
+						&_title {
+							color:#999;
+						}
+						
+						&__value {
+							color:#333;
+							text-align: left;
+						}
+						
+						.text {
+							&.wait {
+								color:#007AFF;
+							}
+							
+							&.agree {
+								color:#34C759;
+							}
+							
+							&.refuse {
+								color:#FF3B30;
+							}
+						}
+						
+						.preview {
+							width:240rpx;
+							height:160rpx;
+						}
+						
+						.download-btn {
+							margin:10rpx 0 0;
+							text-align: center;
+							line-height: 56rpx;
+							color:#fff;
+							font-size: 30rpx;
+							width: 224rpx;
+							height: 56rpx;
+							background: #007AFF;
+							border-radius: 16rpx;
+						}
+					}
+					
+					
+					.header {
+						font-size: 30rpx;
+						font-weight: bold;
+						color: #333333;
+						line-height: 48rpx;
+					}
+					
+					.body {
+						&__item {
+							
+							border-bottom:1px solid #EEEEEE;
+							padding-bottom:30rpx;
+							
+							&:last-child {
+								border:0;
+							}
+							
+							.title {
+								margin-top:30rpx;
+								font-size: 24rpx;
+								color: #007AFF;
+								line-height: 48rpx;
+								
+								&::before {
+									content:'';
+									width: 4rpx;
+									height: 24rpx;
+									background: #007AFF;
+									border-radius: 2rpx;
+									display: inline-block;
+									margin-right:10rpx;
+								}
+							}
+							
+							.order-list {
+								
+								.order-item {
+									overflow: hidden;
+									border-radius: 16rpx;
+									padding:0 14rpx 14rpx;
+									background:#F5F5F5;
+									font-size: 30rpx;
+									color:#333;
+									margin-top:16rpx;
+									
+									.order-title,.order-number,.order-price {
+										color:#333333;
+										margin-top:20rpx;
+										line-height: 26rpx;
+										font-size: 26rpx;
+									}
+									
+									.order-number {
+										color:#999;
+									}
+								}
+							}
+							
+							.order-text {
+								margin-top:16rpx;
+								padding:0 30rpx;
+								height: 80rpx;
+								background: #F5F5F5;
+								border-radius: 16rpx;
+								display: flex;
+								align-items: center;
+								
+								&__label {
+									font-size: 24rpx;
+									color:#999999;
+								}
+								
+								&__price {
+									font-size: 30rpx;
+									margin-left:20rpx;
+									color:#FF2D55;
+								}
+							}
+						}
+					}
 				}
 				
-				.order-title,.order-number,.order-price {
-					color:#333333;
-					margin-top:10rpx;
-					line-height: 30rpx;
+				
+				
+			}
+			
+			&__btns {
+				border-top:1px solid #EEEEEE;
+				padding:0 24rpx;
+				width: 100%;
+				height: 140rpx;
+				background: #FFFFFF;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				
+				.btn {
+					text-align: center;
+					width: 200rpx;
+					height: 80rpx;
+					line-height: 80rpx;
+					background: #F5F5F5;
+					border-radius: 40rpx;
+					color:#007AFF;
 					font-size: 30rpx;
+					margin:0 10rpx;
+					
+					
+					&.warm {
+						background: #FF3B30;
+						color:#fff;
+					}
+					
+					&.ok {
+						color:#fff;
+						width: 526rpx;
+						height: 80rpx;
+						background: #007AFF;
+						border-radius: 40rpx;
+					}
 				}
 				
-				.order-number {
-					color:#999;
-				}
 			}
 		}
 		
-		.confrim-btn {
-			width: 750rpx;
-			height: 98rpx;
-			background: rgba(255, 255, 255, 0.98);
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			
-			.okBtn {
+		.order-cancel {
+			width: 640rpx;
+			height: 439rpx;
+			background: #FFFFFF;
+			padding:40rpx;
+			.header {
 				text-align: center;
-				line-height: 64rpx;
-				color:#fff;
 				font-size: 30rpx;
-				width: 200rpx;
-				height: 64rpx;
-				background: linear-gradient(0deg, #015EEA, #00C0FA);
-				border-radius: 32rpx;
+				font-weight: bold;
+				color: #333333;
+				line-height: 48rpx;
+			}
+			
+			.body {
+				margin-top:40rpx;
+				
+				view {
+					font-size: 30rpx;
+					color: #666666;
+					line-height: 48rpx;
+				}
+			}
+			
+			.footer {
+				margin-top:40rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				
+				.btn {
+					text-align: center;
+					line-height: 80rpx;
+					font-size: 30rpx;
+					color:#007AFF;
+					width: 200rpx;
+					height: 80rpx;
+					background: #F5F5F5;
+					border-radius: 40rpx;
+					margin:0 10rpx;
+					
+					&.ok {
+						color:#fff;
+						background: #007AFF;
+					}
+				}
 			}
 		}
-		
 	}
 }
 

+ 41 - 13
pages2/learn/my_learn.vue

@@ -27,7 +27,6 @@
 										: ''
 								}}
 							</text>
-							\n
 							<view v-if="item.periodStatus === 3" style="font-size: 24rpx;color:#666;">
 								<text style="color:#FF3B30;">{{ item.rebuild }}节</text>
@@ -52,25 +51,25 @@
 					<view v-if="item.periodStatus !== 2">
 						<u-line color="#EEEEEE" />
 						<view v-if="item.periodStatus === -1">
-							<view class="btnBox"><view class="btn" @click="jumpPage(item, 1)">课程学习</view></view>
+							<view class="btnBox"><view class="btn" @click="jumpPage(item, 1,index)">课程学习</view></view>
 						</view>
 						<view>
 							<view v-if="item.periodStatus === 1 && item.applyStatus === 1">
 								<view class="subTitle">{{ item.applyName }}</view>
-								<view class="btnBox"><view class="btn" @click="jumpPage(item, 2)">预约考试</view></view>
+								<view class="btnBox"><view class="btn" @click="jumpPage(item, 2,index)">预约考试</view></view>
 							</view>
 							<u-line color="#EEEEEE" v-if="item.periodStatus === 1 && item.applyStatus === 1" />
 							<view v-if="item.periodStatus === 1 && item.beforeStatus === 1">
 								<view class="subTitle">{{ item.beforeName }}</view>
-								<view class="btnBox"><view class="btn" @click="jumpPage(item, 3)">进入刷题</view></view>
+								<view class="btnBox"><view class="btn" @click="jumpPage(item, 3,index)">进入刷题</view></view>
 							</view>
 						</view>
 
 						<view v-if="item.periodStatus === 3 && item.rebuildStatus === 0">
-							<view class="btnBox"><view class="btn" @click="jumpPage(item, 4)">查看详情</view></view>
+							<view class="btnBox"><view class="btn" @click="jumpPage(item, 4,index)">查看详情</view></view>
 						</view>
 						<view v-if="item.periodStatus === 3 && item.rebuildStatus === 1">
-							<view class="btnBox"><view class="btn" @click="jumpPage(item, 5)">重修目录</view></view>
+							<view class="btnBox"><view class="btn" @click="jumpPage(item, 5,index)">重修目录</view></view>
 						</view>
 					</view>
 				</view>
@@ -108,14 +107,42 @@ export default {
 					name: '学习凭证'
 				}
 			],
+			param:{
+				pageNum:1,
+				pageSize:10
+			},
+			total:0,
+			itemIndex:'',
 			listData: []
 		};
 	},
-	onLoad(option) {},
+	onLoad(option) {
+		this.getcourseperiodlistGoods();
+	},
 	onShow() {
-		this.getInfos();
+		if(this.itemIndex !== '') {
+			this.refreshByIndex();
+		}
+	},
+	onReachBottom() {
+		console.log(111)
+		if(this.listData.length < this.total) {
+			this.param.pageNum++;
+			this.getcourseperiodlistGoods();
+			
+		}
 	},
 	methods: {
+		refreshByIndex() {
+			this.$api.getcourseperiodlistGoods({
+				pageNum:this.itemIndex + 1,
+				pageSize:1
+			}).then(res => {
+				if (res.data.code === 200) {
+					this.$set(this.listData,this.itemIndex,res.data.rows[0])
+				}
+			});
+		},
 		copyText() {
 			uni.setClipboardData({
 				data: 'http://gdzczx.gdcic.net/',
@@ -128,7 +155,8 @@ export default {
 				}
 			});
 		},
-		jumpPage(v, int) {
+		jumpPage(v, int,index) {
+			this.itemIndex = index;
 			//int 1.课程学习 2.预约考试 3.进入刷题 4.查看详情 5.重修目录
 			if (int === 1) {
 				this.$navTo.togo(`/pages2/wd/course?id=${v.goodsId}&gid=${v.gradeId}`);
@@ -146,10 +174,11 @@ export default {
 				this.$navTo.togo(`/pages2/wd/course?id=${v.goodsId}&gid=${v.gradeId}`);
 			}
 		},
-		getInfos() {
-			this.$api.getcourseperiodlistGoods().then(res => {
+		getcourseperiodlistGoods() {
+			this.$api.getcourseperiodlistGoods(this.param).then(res => {
 				if (res.data.code === 200) {
-					this.listData = res.data.rows;
+					this.listData = [...this.listData,...res.data.rows];
+					this.total = res.data.total;
 				}
 			});
 		},
@@ -210,7 +239,6 @@ export default {
 			});
 		}
 	},
-	onReachBottom() {},
 	computed: { ...mapGetters(['userInfo']) }
 };
 </script>

+ 127 - 20
pages2/msg/detail.vue

@@ -5,7 +5,7 @@
 			<view class="time">{{ $method.timestampToTime(listData.sendTime, false) }}</view>
 			<view v-if="listData.systemStatus === 2" class="content" v-html="listData.informVo.affiche" style="width: 100%;"></view>
 			<view v-if="listData.systemStatus === 1" class="content" style="width: 100%;">{{ listData.text }}</view>
-			<view class="boxstistyle">
+			<view class="boxstistyle" v-if="listData.informVo">
 				<view class="lsow" style="border-bottom: 1rpx solid #eee;margin-top: 10rpx;" v-for="(item, index) in listData.informVo.informCourseVo" :key="index">
 					<view class="h4">{{ item.goodsName }}</view>
 					<view class="h33">
@@ -13,7 +13,7 @@
 					</view>
 					<view style="display: flex;align-items: center;margin:28rpx 0rpx;" @click="jumpSection(item)">
 						<image style="width: 35rpx;height: 35rpx;" src="@/static/courseIcon.png" mode=""></image>
-						<text class="timeStys">{{ item.topicNum }}分钟</text>
+						<text class="timeStys">{{ $method.secondToTime(item.topicNum) }}</text>
 						<text class="aSty">点击可直接跳转</text>
 					</view>
 				</view>
@@ -29,7 +29,7 @@
 			</view>
 		</view>
 		<view class="btn1" @click="isOk" v-if="listData.systemStatus === 2 && listData.receiptStatus === 0">我已阅读</view>
-		<view class="btn1" v-if="statusGO && listData.systemStatus === 1 && getNames(listData.remindId) !== ''" @click="jumpFuns(listData)">{{ getNames(listData.remindId) }}</view>
+		<view class="btn1" v-if="statusGO && listData.systemStatus === 1 && getNames(listData.remindId) !== ''" @click="jumpFuns(goodsData,listData.remindId)">{{ getNames(listData.remindId) }}</view>
 	</view>
 </template>
 
@@ -40,6 +40,7 @@ export default {
 	data() {
 		return {
 			listData: {},
+			goodsData:{},
 			id: null,
 			img1: '/static/icon/msg_icon1.png',
 			img2: '/static/icon/msg_icon2.png',
@@ -65,8 +66,8 @@ export default {
 	},
 	methods: {
 		//跳转页面
-		jumpFuns(item) {
-			switch (item.remindId) {
+		async jumpFuns(item,remindId) {
+			switch (remindId) {
 				case 1:
 				case 3:
 				case 5:
@@ -79,6 +80,95 @@ export default {
 				case 10:
 				case 12:
 				case 18:
+					
+					let currentTime = this.$method.getZeroTime();
+					console.log(currentTime)
+					console.log(item)
+					console.log(item.studyStartTime)
+					console.log(item.studyEndTime)
+					console.log(currentTime < item.studyStartTime || currentTime > item.studyEndTime)
+					if(currentTime < item.studyStartTime || currentTime > item.studyEndTime) {
+						uni.showToast({
+							title:'不在学习有效期,不可以学习了哦',
+							icon:'none'
+						})
+						return;
+					}
+					
+					if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
+						uni.showToast({
+							title:'不在班级有效期,不能进入学习',
+							icon:'none'
+						})
+						return;
+					}
+					
+					if(item.learningStatus == 2) {
+						uni.showToast({
+							title:'开放学习时间待定,不能进入学习',
+							icon:'none'
+						})
+						return;
+					}
+					
+					if(item.classStatus == 0 ) {
+						uni.showToast({
+							title:'尚未开班,不能进入学习',
+							icon:'none'
+						})
+						return;
+					}
+					
+					if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
+						uni.showToast({
+							title:'不在开放学习时间,不能进入学习',
+							icon:'none'
+						})
+						return;
+					}
+					
+					if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > currentTime) &&  (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
+						
+						uni.showModal({
+							title:'提示',
+							content:'班级已过期,需要重新选班',
+							showCancel:false,
+							success:() => {
+								uni.navigateTo({
+									url:"/pages2/wd/class"
+								})
+							}
+						})
+						return;
+					}
+					
+					let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
+					
+					if(rebuildStatus == 0) {
+						this.$navTo.togo('/pages2/learn/details', {
+							gradeId:item.gradeId,
+							goodsId: item.goodsId
+						})
+						return;
+					}
+					
+					if(item.courseNum == 1 ) {
+						
+						this.$api.courseCourseList({
+							pageNum:1,
+							pageSize:1,
+							goodsId:item.goodsId,
+							gradeId:item.gradeId
+						}).then(res => {
+							if(res.data.code == 200) {
+								uni.navigateTo({
+									url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
+								})
+							}
+						});
+						return;
+					}
+					
 					this.$navTo.togo('/pages2/wd/course', {
 						id: item.goodsId,
 						gid: item.gradeId
@@ -126,6 +216,20 @@ export default {
 					break;
 			}
 		},
+		/**
+		 * @param {Object} goodsId 商品id
+		 * 查询商品重修状态
+		 */
+		courseGoodsRebuildStatus(goodsId,gradeId) {
+			return new Promise(resolve => {
+				this.$api.courseGoodsRebuildStatus({
+					goodsId:goodsId,
+					gradeId:gradeId
+				}).then(res => {
+					resolve(res.data.data)
+				})
+			})
+		},
 		//跳转节视频
 		jumpSection(item) {
 			item.noteSecond = Number(item.topicNum) * 60; //转秒数
@@ -188,21 +292,24 @@ export default {
 						res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi, '<img style="max-width:100%;"');
 					}
 					this.listData = res.data.data;
-					this.$api.goodsDetail(res.data.data.goodsId).then(rs => {
-						if (
-							rs.data.data.goodsType === 3 &&
-							(res.data.data.remindId === 1 ||
-								res.data.data.remindId === 3 ||
-								res.data.data.remindId === 5 ||
-								res.data.data.remindId === 6 ||
-								res.data.data.remindId === 7 ||
-								res.data.data.remindId === 19 ||
-								res.data.data.remindId === 21 ||
-								res.data.data.remindId === 22)
-						) {
-							this.statusGO = false;
-						}
-					});
+					if(res.data.data.goodsId) {
+						this.$api.goodsDetail(res.data.data.goodsId).then(rs => {
+							this.goodsData = rs.data.data
+							if (
+								rs.data.data.goodsType === 3 &&
+								(res.data.data.remindId === 1 ||
+									res.data.data.remindId === 3 ||
+									res.data.data.remindId === 5 ||
+									res.data.data.remindId === 6 ||
+									res.data.data.remindId === 7 ||
+									res.data.data.remindId === 19 ||
+									res.data.data.remindId === 21 ||
+									res.data.data.remindId === 22)
+							) {
+								this.statusGO = false;
+							}
+						});
+					}
 				}
 			});
 		},

+ 1 - 1
pages2/msg/index.vue

@@ -6,7 +6,7 @@
 				<view style="display: flex;justify-content: space-between;align-items: center;height: 60rpx;">
 					<view style="color: #333333;font-size: 30rpx;font-weight: bold;display: flex;align-items: center;">
 						<image :src="item.systemStatus === 1 ? img1 : img2" style="width: 40rpx;height: 40rpx;margin-right: 10rpx;"></image>
-						系统通知
+						{{item.systemStatus === 1 ? '系统通知' : '教务通知'}}
 					</view>
 					<view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.sendTime, false) }}</view>
 				</view>

+ 4 - 3
pages2/order/confirm_list.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view style="padding: 30rpx;padding-bottom: 98rpx;">
+		<view style="padding: 8rpx;padding-bottom: 98rpx;">
 			<view  >
 				<view class="item">
 					<view style="display: flex;justify-content: space-between;padding: 16rpx;">
@@ -43,7 +43,7 @@
 				</view>
 				<u-line color="#D6D6DB" />
 				<view>
-					<scroll-view scroll-y="true" style="height: 500rpx;">
+					<scroll-view scroll-y="true" style="height: 536rpx;">
 						<view>
 							<u-radio-group v-model="gradeValue" @change="radioGroupChange">
 								<view v-for="(item, index) in gradeList" :key="index" >
@@ -54,7 +54,7 @@
 												:name="index"
 												:disabled="item.studentNum > 0 && item.studentNum == item.studentUpper"
 											>
-												<view :class="item.checked?'white-box blue-box':'white-box'" >
+												<view :class="index==gradeValue?'white-box blue-box':'white-box'" >
 													<view>
 														<view class="blackTxt">{{item.className}}</view>
 														<view class="redTxt" v-if="item.classEndTime">有效期至:{{$method.timestampToTime(item.classEndTime)}}</view>
@@ -431,6 +431,7 @@ export default {
 		line-height: 64rpx;
 	}
 	.confrim-btn{
+		border-top:1px solid #eee;
 		height: 98rpx;
 		width: 100%;
 		display: flex;

+ 3 - 3
pages2/order/confirm_success.vue

@@ -1,7 +1,7 @@
 <template>
 	<view>
 		<view>
-			<view style="padding: 30rpx;">
+			<view style="padding: 8rpx;">
 				<view class="box1">
 					<view class="box1_t1">
 						<u-icon name="checkmark-circle" color="#34C759" size="32"></u-icon><text style="margin-left: 8rpx;">您的订单已支付成功!</text></view>
@@ -26,7 +26,7 @@
 				<view class="box2">
 					<view class="title2">订单信息</view>
 					<u-line color="#D6D6DB" />
-					<view style="padding:10rpx 30rpx;" v-for="(item,index) in shoppingCartList">
+					<view style="padding:10rpx 30rpx;" v-for="(item,index) in shoppingCartList" :key="index">
 						<view class="list_item">
 							<view class="txt_left">商品名称</view>
 							<view class="txt_right">{{item.goodsName}}</view>
@@ -227,7 +227,7 @@ export default {
 		width: 100%;
 		background: #FFFFFF;
 		border-radius: 16rpx;
-		margin-top: 30rpx;
+		margin-top: 16rpx;
 	}
 	.box1_t2{
 		font-size: 24rpx;

+ 176 - 78
pages2/order/index.vue

@@ -3,39 +3,35 @@
 		<view style="width: 100%;text-align: center;position: fixed;height: 96rpx;z-index: 999;">
 			<u-tabs :list="list" sticky :current="current" @change="change" active-color="#007AFF"></u-tabs>
 		</view>
-		<view style="padding-top: 96rpx;">
+		<view style="padding: 96rpx 8rpx 96rpx;">
 			<view v-if="!order.length" class="noData">您暂无相关订单哦~</view>
 			<template v-else>
-				<!-- <navigator url="/pages2/invoice/index">
-					<view class="btn2">
-						发票申请
-					</view>
-				</navigator> -->
 				
-				<view v-for="(item, index) in order" :key="index" style="padding: 20rpx 20rpx 0rpx 20rpx" class="lisChild">
+				
+				<view v-for="(item, index) in order" :key="index" class="lisChild">
 					<view class="item">
-						<view style="display: flex;justify-content: space-between;align-items: center;height: 50rpx;" @click="openPopup(index)">
-							<view style="color: #666666;font-size: 24rpx;">订单编号:{{ item.orderSn }}</view>
-							<view style="color: #999999;font-size: 24rpx;">{{ $method.timestampToTime(item.createTime) }}</view>
+						<view class="header" @click="openPopup(index)">
+							<view>订单编号:{{ item.orderSn }}</view>
+							<view>{{ $method.timestampToTime(item.createTime) }}</view>
 						</view>
 						<u-line color="#D6D6DB" />
-						<view
-							style="padding: 25rpx 0;border-bottom: 1rpx solid #eee;"
+						<view class="body"
 							v-for="(items, indexs) in item.orderGoodsList"
 							:key="indexs" @click="goCourse(items,item.orderStatus)"
 						>
-							<view style="display: flex;justify-content: space-between;">
-								<image :src="$method.splitImgHost(items.coverUrl)" style="height: 134rpx;width: 278rpx;border-radius: 16rpx;flex-shrink: 0;"></image>
-								<view style="margin-left: 20rpx;flex:1;display: flex;flex-direction: column;">
-									<view style="color: #333333;font-size: 30rpx;font-weight: bold;flex:1">{{ items.goodsName }}</view>
-									<view class="priceTag">¥ {{ items.goodsRealPrice }}</view>
+							<view class="body__content">
+								<image class="goods-img" :src="$method.splitImgHost(items.coverUrl)"></image>
+								<view class="goods-text">
+									<view class="goods-name">{{ items.goodsName }}</view>
+									<view class="goods-price">¥ {{ items.goodsRealPrice }}</view>
 								</view>
 							</view>
 							<view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
 								<view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2 || item.orderStatus === 3)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
 							</view>
 						</view>
-						<view style="height: 80rpx;display: flex;justify-content: space-between;align-items: center;">
+						<u-line color="#D6D6DB" />
+						<view class="footer">
 							<view>
 								<text style="color:#999;font-size: 24rpx;margin-right: 8rpx;">共{{ item.orderGoodsList.length }}项</text>
 								<text style="color: #333;font-size: 30rpx;font-weight: bold;">合计</text>
@@ -52,6 +48,11 @@
 				</view>
 			</template>
 			
+
+			<!-- <template v-if="current == 1 && order.length">
+				<view class="apply-invoice" @click="goInvoice">发票申请</view>
+			</template> -->
+			
 		</view>
 	</view>
 </template>
@@ -109,39 +110,56 @@ export default {
 		this.getFY();
 	},
 	methods: {
+		/**
+		 * 跳转发票申请页面
+		 */
+		goInvoice() {
+			uni.navigateTo({
+				url:`/pages2/invoice/index`
+			})
+		},
 		refund(orderSn,goodsId){
-			let self = this
-			this.$api.refundSmallOrder({orderSn:orderSn,goodsId:goodsId}).then(res => {
-				if(res.data.code==200){
-					if (res.data.code === 200) {
-						self.$method.showToast('退款成功');
-						self.getOrderList();
+			uni.showModal({
+				title:'提示',
+				content:'确定要退款吗',
+				success:(res) => {
+					if(res.confirm) {
+						let self = this
+						this.$api.refundSmallOrder({orderSn:orderSn,goodsId:goodsId}).then(res => {
+							if(res.data.code==200){
+								if (res.data.code === 200) {
+									self.$method.showToast('退款成功');
+									self.getOrderList();
+								}
+							} else {
+								uni.showToast({
+									icon:'none',
+									title:'不可以退款哦'
+								})
+							}
+						});
 					}
-				} else {
-					uni.showToast({
-						icon:'none',
-						title:'不可以退款哦'
-					})
 				}
-			});
+			})
+			
 		},
 		/**
 		 * 跳转课程
 		 */
 		goCourse(item,orderStatus) {
-			if(orderStatus == 1 || orderStatus == 2) {
-				console.log(item)
-				if(item.goodsType == 1) { //网课
-					uni.navigateTo({
-						url:'/pages2/wd/course?gid='+item.gradeId+'&id='+item.goodsId
-					})
-				} else if(item.goodsType == 2) { //题库
-					uni.navigateTo({
-						url:'/pages2/bank/question_detail?id='+item.goodsId
-					})
-				}
+			// if(orderStatus == 1 || orderStatus == 2) {
+			// 	console.log(item)
+			// 	if(item.goodsType == 1) { //网课
+			// 		uni.navigateTo({
+			// 			url:'/pages2/wd/course?gid='+item.gradeId+'&id='+item.goodsId
+			// 		})
+			// 	} else if(item.goodsType == 2) { //题库
+			// 		uni.navigateTo({
+			// 			url:'/pages2/bank/question_detail?id='+item.goodsId
+			// 		})
+			// 	}
 				
-			}
+			// }
 		},
 		resumeOrder(item){
 			let self = this
@@ -311,7 +329,106 @@ page {
 	background: #eaeef1;
 }
 </style>
-<style scoped>
+<style scoped lang="scss">
+.lisChild {
+	border-radius: 16rpx;
+	margin-bottom:16rpx;
+	background:#fff;
+	
+	.header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		height: 80rpx;
+		padding:0 15rpx;
+		color: #666666;
+		font-size: 24rpx;
+	}
+	
+	.body {
+		padding:16rpx;
+		
+		&__content {
+			display: flex;
+			justify-content: space-between;
+			
+			.goods-img {
+				height: 134rpx;
+				width: 278rpx;
+				border-radius: 16rpx;
+				flex-shrink: 0;
+			}
+			
+			.goods-text {
+				margin-left: 20rpx;
+				flex:1;
+				display: flex;
+				flex-direction: column;
+				
+				.goods-name {
+					color: #333333;
+					font-size: 30rpx;
+					font-weight: bold;
+					flex:1;
+				}
+				
+				.goods-price {
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff2d55;
+					display: flex;
+					flex-direction: row-reverse;
+				}
+			}
+		}
+		
+		.btn2 {
+			width: 144rpx;
+			height: 46rpx;
+			background: #ffffff;
+			border: 2rpx solid #007aff;
+			border-radius: 16rpx;
+			text-align: center;
+			line-height: 48rpx;
+			color: #007aff;
+			margin: 0 8rpx;
+		}
+		
+		
+	}
+	
+	.footer {
+		padding:0 24rpx;
+		height: 80rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		
+		.btn2 {
+			width: 144rpx;
+			height: 46rpx;
+			background: #ffffff;
+			border: 2rpx solid #007aff;
+			border-radius: 16rpx;
+			text-align: center;
+			line-height: 48rpx;
+			color: #007aff;
+			margin: 0 8rpx;
+		}
+		.btn1 {
+			width: 144rpx;
+			height: 48rpx;
+			background: #ffffff;
+			border: 2rpx solid #999999;
+			border-radius: 16rpx;
+			text-align: center;
+			line-height: 48rpx;
+			color: #999999;
+			margin: 0 8rpx;
+		}
+	}
+}
 .lisChild:last-child {
 	margin-bottom: 34rpx;
 }
@@ -323,44 +440,25 @@ page {
 	color: #999999;
 	margin: 160rpx 0;
 }
-.btn2 {
-	width: 144rpx;
-	height: 46rpx;
-	background: #ffffff;
-	border: 2rpx solid #007aff;
-	border-radius: 16rpx;
-	text-align: center;
-	line-height: 48rpx;
-	color: #007aff;
-	margin: 0 8rpx;
-}
-.btn1 {
-	width: 144rpx;
-	height: 48rpx;
-	background: #ffffff;
-	border: 2rpx solid #999999;
-	border-radius: 16rpx;
+
+.apply-invoice {
+	z-index: 100;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:40rpx;
+	margin:0 auto;
+	width: 526rpx;
+	height: 80rpx;
 	text-align: center;
-	line-height: 48rpx;
-	color: #999999;
-	margin: 0 8rpx;
-}
-.item {
-	width: 100%;
-	background: #ffffff;
-	border-radius: 16rpx;
-	/* margin-bottom: 20rpx; */
-	padding: 15rpx;
-}
-.priceTag {
-	font-size: 30rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #ff2d55;
-	display: flex;
-	flex-direction: row-reverse;
+	line-height: 80rpx;
+	color:#fff;
+	background: #007AFF;
+	box-shadow: 0rpx 8rpx 7rpx 1rpx rgba(0, 122, 255, 0.1);
+	border-radius: 40rpx;
 }
 
+
 .bottomBox {
 	position: fixed;
 	bottom: 0;

+ 10 - 10
pages2/plan/create.vue

@@ -270,11 +270,11 @@ export default {
 					if (result.data.code == 200) {
 						this.studyNums = result.data.data.studyCourseKnob;
 					} else {
-						uni.showToast({
-							title: result.data.msg,
-							icon: 'none',
-							duration: 2000
-						});
+						uni.showModal({
+							title:'提示',
+							content:result.data.msg,
+							showCancel:false,
+						})
 					}
 				});
 			} else {
@@ -292,11 +292,11 @@ export default {
 							}
 						});
 					} else {
-						uni.showToast({
-							title: result.data.msg,
-							icon: 'none',
-							duration: 2000
-						});
+						uni.showModal({
+							title:'提示',
+							content:result.data.msg,
+							showCancel:false,
+						})
 					}
 				});
 			}

+ 11 - 5
pages2/plan/edit.vue

@@ -2,10 +2,12 @@
 	<view style="padding: 16rpx;">
 		<view class="list_box">
 			<view class="item" v-for="(item, index) in list" :key="index">
-				<image :src="$method.splitImgHost(item.coverUrl)"></image>
-				<text>{{ item.goodsName }}</text>
-				<text style="color:#999;margin-left:12rpx;">{{ item.secAllNum }}节</text>
-				<view class="del_icon"><u-icon name="close" color="#fff" size="20" @click="delItem(index, item.goodsId)"></u-icon></view>
+				<image :src="item.coverUrl"></image>
+				<view style="height: 80rpx;overflow: hidden;">
+					<text >{{ item.goodsName }}</text>
+					<text style="color:#999;margin-left:12rpx;">{{ item.secAllNum }}节</text>
+				</view>
+				<view class="del_icon"><u-icon name="close" color="#fff" size="20" @click="delItem(index)"></u-icon></view>
 			</view>
 			<view class="item" style="vertical-align: top;">
 				<view class="item_add" @click="openSel"><u-icon name="plus-circle-fill" color="#007AFF" size="32"></u-icon></view>
@@ -85,7 +87,7 @@
 									:name="item.goodsId"
 								>
 									<view class="course_item" :class="{selected:item.checked}">
-										<view style="display: flex;align-items: center;"><image :src="$method.splitImgHost(item.coverUrl)" style="width: 278rpx;height: 134rpx;"></image></view>
+										<view style="display: flex;align-items: center;"><image :src="item.coverUrl" style="width: 278rpx;height: 134rpx;"></image></view>
 										<view style="margin: 16rpx;">
 											<view>{{ item.goodsName }}</view>
 											<view style="color:#999;">{{ item.secAllNum }}节</view>
@@ -199,6 +201,7 @@ export default {
 						for (let i = 0; i < res.data.rows.length; i++) {
 							res.data.rows[i].checked = false;
 							res.data.rows[i].disabled = false;
+							res.data.rows[i].coverUrl = self.$method.splitImgHost(res.data.rows[i].coverUrl);
 						}
 					}
 					self.list2 = res.data.rows;
@@ -311,6 +314,9 @@ export default {
 				this.form.endDate = this.$method.timestampToTime(res.data.data.endTime);
 				this.index_review = res.data.data.studyDay - 1;
 				this.form.week = res.data.data.studyCount;
+				res.data.data.goodsVos.forEach(item => {
+					item.coverUrl = this.$method.splitImgHost(item.coverUrl)
+				})
 				this.list = res.data.data.goodsVos;
 				this.businessId = res.data.data.goodsVos[0].businessId;
 				this.form.category = this.list[0].educationName + '-' + this.list[0].projectName + '-' + this.list[0].businessName;

+ 133 - 6
pages2/plan/index.vue

@@ -359,14 +359,135 @@ export default {
 			this.calendarStudyVo.miniDayStudyList = this.calendarStudyVo.dayStudyList.slice(start, start + 7);
 			this.showDayList = this.calendarStudyVo.miniDayStudyList;
 			console.log(this.showDayList)
+			
+			for (let i = 0; i < this.calendarStudyVo.dayStudyList.length; i++) {
+				let item = this.calendarStudyVo.dayStudyList[i];
+				
+				if (item.note > 0) {
+					item.note = 0;
+					this.showDayList.forEach(day => {
+						if(day.date == item.date) {
+							if(day.daySectionList) {
+								day.daySectionList.forEach(section => {
+									this.listItem.goodsVos.forEach(vos => {
+										if(vos.goodsId == section.goodsId) {
+											item.note += vos.classHours
+										}
+									})
+								})
+							}
+						}
+					})
+				}
+			}
+			
 		},
-		jumpDetail(item) {
+		async jumpDetail(item) {
+			
+			let currentTime = this.$method.getZeroTime();
+			
+			if(currentTime < item.studyStartTime || currentTime > item.studyEndTime) {
+				uni.showToast({
+					title:'不在学习有效期,不可以学习了哦',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if( (item.classStartTime && currentTime <= item.classStartTime) || (item.classEndTime && currentTime >= item.classEndTime) ) {
+				uni.showToast({
+					title:'不在班级有效期,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.learningStatus == 2) {
+				uni.showToast({
+					title:'开放学习时间待定,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.classStatus == 0 ) {
+				uni.showToast({
+					title:'尚未开班,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.learningStatus == 3 && (currentTime < item.learningTimeStart) ) {
+				uni.showToast({
+					title:'不在开放学习时间,不能进入学习',
+					icon:'none'
+				})
+				return;
+			}
+			
+			if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > currentTime) &&  (item.classEndTime && (item.classEndTime < currentTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
+				
+				uni.showModal({
+					title:'提示',
+					content:'班级已过期,需要重新选班',
+					showCancel:false,
+					success:() => {
+						uni.navigateTo({
+							url:"/pages2/wd/class"
+						})
+					}
+				})
+				return;
+			}
+			
+			let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId);
+			
+			if(rebuildStatus == 0) {
+				this.$navTo.togo('/pages2/learn/details', {
+					gradeId:item.gradeId,
+					goodsId: item.goodsId
+				})
+				return;
+			}
+			
+			if(item.courseNum == 1 ) {
+				
+				this.$api.courseCourseList({
+					pageNum:1,
+					pageSize:1,
+					goodsId:item.goodsId,
+					gradeId:item.gradeId
+				}).then(res => {
+					if(res.data.code == 200) {
+						uni.navigateTo({
+							url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
+						})
+					}
+				});
+				return;
+			}
+			
 			this.$navTo.togo('/pages2/wd/course', {
 				id: item.goodsId,
 				gid:item.gradeId
 			});
 			return;
 		},
+		/**
+		 * @param {Object} goodsId 商品id
+		 * 查询商品重修状态
+		 */
+		courseGoodsRebuildStatus(goodsId,gradeId) {
+			return new Promise(resolve => {
+				this.$api.courseGoodsRebuildStatus({
+					goodsId:goodsId,
+					gradeId:gradeId
+				}).then(res => {
+					resolve(res.data.data)
+				})
+			})
+		},
 		replay(index) {
 			if (index == 0) {
 				return '日';
@@ -583,8 +704,9 @@ export default {
 	margin: 0 auto;
 }
 .date_note {
-	border-radius: 50%;
-	width: 29rpx;
+	border-radius: 15rpx;
+	padding:0 5rpx;
+	min-width:50rpx;
 	height: 29rpx;
 	line-height: 25rpx;
 	border: 1px solid #ffcc00;
@@ -594,11 +716,12 @@ export default {
 	display: inline-block;
 	position: absolute;
 	top: -19rpx;
-	right: 9rpx;
+	left: 80%;
 }
 .circle_num {
-	border-radius: 50%;
-	width: 29rpx;
+	border-radius: 15rpx;
+	padding:0 5rpx;
+	min-width:50rpx;
 	height: 29rpx;
 	border: 1px solid #ffcc00;
 	font-size: 18rpx;
@@ -631,6 +754,7 @@ export default {
 	margin-top: 20rpx;
 }
 .date_num_color0 {
+	position:relative;
 	display: inline-block;
 	width: 48rpx;
 	height: 48rpx;
@@ -639,6 +763,7 @@ export default {
 	color: #32467b;
 }
 .date_num_color1 {
+	position:relative;
 	display: inline-block;
 	width: 48rpx;
 	height: 48rpx;
@@ -647,6 +772,7 @@ export default {
 	color: #34c759;
 }
 .date_num_color2 {
+	position:relative;
 	display: inline-block;
 	width: 48rpx;
 	height: 48rpx;
@@ -655,6 +781,7 @@ export default {
 	color: #ff3b30;
 }
 .date_num_color3 {
+	position:relative;
 	color: #007AFF;
 	background-color: rgba(229,241,255,1);
 	border-radius: 50%;

+ 353 - 1
pages2/register/register.vue

@@ -17,7 +17,7 @@
 				<view  style="display: flex;align-items: center;font-size: 24rpx;justify-content:center;">
 					<u-checkbox v-model="read" :label-disabled="false"></u-checkbox>
 					<view style="color: #666666;">我已认真阅读并同意</view>
-					<view style="color: #007AFF;">《祥粤云学堂服务协议》</view>
+					<view style="color: #007AFF;" @click="agreementModal = true;">《祥粤云学堂服务协议》</view>
 				</view>
 			</view>
 			<button :disabled="isUse" class="loginBtn" :class="{able:canRegister()}" @click="submit">
@@ -26,6 +26,279 @@
 		
 		</view>
 		<u-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
+		
+		<u-popup class="modal" v-model="agreementModal" mode="center" border-radius="24" :mask-close-able="false">
+			<view class="agreement">
+				<view class="body">
+					<scroll-view scroll-y="true" style="height:972rpx">
+						<view class="content">
+							<view class="bold">欢迎注册成为“祥粤云学堂”用户!</view>
+							
+							<view>在您注册过程中,您需要完成我们的注册流程并通过点击“同意并继续”的形式在线签署以下协议及政策,请您务必仔细阅读、充分理解协议中的条款内容后再点击同意(尤其是以粗体标识的条款,因为这些条款可能会明确您应履行的义务或对您的权利有所限制)。
+							</view>
+							
+							<view><text class="bold">【请您注意】</text>如果您不同意以下协议及政策全部或任何条款约定,请您停止注册。您停止注册后仅可以浏览我们的产品(或服务),但无法使用我们的产品(或服务)。如果您按照注册流程提示填写信息,阅读并点击同意上述协议及政策且完成全部注册流程后,即表示您也充分阅读、理解并接受协议及政策的全部内容,并表明您同意我们可以依照协议及政策内容来处理您的个人信息。如您对以下协议内容有任何疑问,请随时通过《个人信息保护政策》中的联系方式联系我们。
+							</view>
+							
+							<view class="center bold">《用户使用协议》</view>
+							
+							<view>本《用户使用协议》(以下称“本协议”)是由您(以下称“用户”)与广东省祥粤建设职业培训学校(以下简称“祥粤”或“我们”)就用户使用祥粤提供的“祥粤云学堂”互联网服务产品(包括但不限于:祥粤云学堂网站www.xyyxt.net、微信小程序等,以下简称“祥粤云学堂”),包括但不限于注册、登录、使用等方面所订立的相关权利义务规范。本服务条款对用户和祥粤均具有法律效力。本协议连同所有更新材料、补充条款以及祥粤的其他规则和政策共同构成了用户与祥粤之间的协议。
+我们在此特别提醒,在用户注册使用“祥粤云学堂”服务前,请务必审慎阅读本协议的全部条款、充分理解各条款内容后再点击同意,特别是免除或者限制祥粤责任的条款、对用户权利限制的条款、法律适用和争议解决条款,这些条款将尽可能以加粗方式标识。如用户按照注册页面提示填写信息、点击同意本协议且完成全部注册流程,或者在我们更新本协议后继续使用“祥粤云学堂”提供的服务,即表示用户已充分阅读、理解并接受本协议及祥粤的其他规则和政策的全部内容,成为具有法律约束力的本协议的一方。如果用户不同意本协议任何条款及/或修改后的内容,应立即停止注册程序或停止使用“祥粤云学堂”的服务。
+如对本协议内容有任何疑问、意见或建议,用户可通过“祥粤云学堂”网站(www.xyyxt.net)页面上的联系方式与我们联系。
+							</view>
+							
+							<view class="bold">一、账号注册与使用</view>
+							
+							<view>1.用户在使用“祥粤云学堂”服务时需要注册一个账号,账号注册成功后,将产生“祥粤云学堂”账号及相应的用户名和密码等账号信息。用户所创建的“祥粤云学堂”账号的所有权归祥粤所有,用户完成申请注册手续后,即获得“祥粤云学堂”账号的使用权,该使用权仅属于初始申请注册人,禁止赠与、借用、租用、转让或售卖或以其他方式许可他人使用该账号,用户应谨慎合理地保存、使用其用户名和密码。如果我们发现或者有合理理由认为使用者并非账号初始注册人,为保障账号安全,我们有权立即暂停或终止向该注册账号提供服务,并有权永久禁用该账号。
+							</view>
+							
+							<view>2.您可以使用微信账号登录并使用“祥粤云学堂”,但您需要将微信账号与“祥粤云学堂”账号绑定,账号绑定后,您可以直接使用微信账号扫码登录并使用“祥粤云学堂”的相关服务。
+							</view>
+							
+							<view>3.用户在注册及使用“祥粤云学堂”服务时,必须提供真实、准确、完整、合法有效的资料,且有义务维持并及时更新相关资料。用户在账号注册及使用过程中需遵守相关法律法规,不得实施任何侵害国家利益、损害其他公民合法权益,有害社会道德风尚的行为。我们有权对用户提交的注册信息进行审核。如果用户提供的资料违反本款要求,用户需承担因此引起的相应责任及后果,并且我们保留终止用户使用“祥粤云学堂”各项服务或采取其他处理措施的权利。
+							</view>
+							
+							<view>4.作为“祥粤云学堂”服务的提供者,为使用户更好地使用“祥粤云学堂”的各项服务,保障用户的账号安全,我们有权要求用户按照我国法律规定完成实名认证。若用户提交的材料或提供的信息不准确、不真实、不规范、不合法或者我们有理由怀疑为错误、不实或不合法的资料,则我们有权拒绝为用户提供相关服务,用户可能无法使用“祥粤云学堂”互联网服务或在使用过程中部分功能受到限制。
+							</view>
+							
+							<view>5.用户应当对以其用户账号进行的所有活动和事件负法律责任。用户同意在任何情况下不使用其他用户的账号或密码,不得冒充他人,也不得恶意使用注册账号导致其他用户误认,否则我们有权立即停止提供服务,收回其账号并由用户独自承担由此而产生的一切法律责任。在用户怀疑他人使用其账号或密码时,用户同意立即通知我们并按照要求提供相关身份证明文件等材料,同意授权我们采取一切合理措施以保证用户的利益不受损害,并认可该等措施所产生的法律效果归于用户自身。如用户丢失账号或遗忘密码,可通过平台页眉的联系方式及时申诉请求找回账号或密码。用户理解并认可,密码找回机制仅需要识别申诉提供资料与系统记录资料具有一致性,而无法识别申诉人是否系账号真正有权使用者。我们特别提醒用户应妥善保管账号和密码,当用户使用完毕后,应安全退出。因黑客行为、用户的保管疏忽或不可抗力因素等非祥粤的原因导致账号、密码遭他人非法使用、丢失的,我们不承担任何责任。
+							</view>
+							
+							<view>6.账号注销。在需要终止使用“祥粤云学堂”账号服务时,符合以下条件的,用户可以申请注销其“祥粤云学堂”账号:</view>
+							
+							<view>(1)用户仅能申请注销用户本人的账号,并依照“祥粤云学堂”的要求和流程进行注销;</view>
+							<view>(2)用户仍应对其在注销账号前且使用“祥粤云学堂”服务期间的行为承担相应责任;</view>
+							<view>(3)注销成功后,账号记录、功能等将无法恢复或提供。</view>
+							<view>如用户需要注销“祥粤云学堂”账号,请打开“祥粤云学堂”网站www.xyyxt.net,如有疑问可联系客服。</view>
+							<view>7. 用户必须自行准备如下设备和承担如下开支:</view>
+							<view>(1)自行配备上网的所需设备,包括个人手机、平板电脑、调制解调器、路由器等;</view>
+							<view>(2)自行负担个人上网所支付的与此服务有关的电话费用、网络费用等。</view>
+							<view class="bold">二、服务内容</view>
+							<view>1.网上购物下单。使用“祥粤云学堂”网站下订单,您应具备购买相关商品/服务的权利能力和行为能力,如果您在18周岁以下,您需要在监护人的监护参与下才能注册并使用本网站。在下订单的同时,即视为您满足上述条件,并对您在订单中提供的所有信息的真实性负责。
+							</view>
+							
+							<view>2.在线课程学习。您在购买课程后,可以在平台进行相应在线课程的学习。我们将尽最大努力保障在线课程的正常使用,如因网站维护、系统升级、课程更新等技术原因导致课程无法正常使用的,请您及时向我们反馈,我们将会尽快解决问题。如您购买的课程包含考试报名,我们会根据您提供的考试报名所需的个人信息,向相关考试机构提交报名信息,您应对提供的个人信息的真实性负责。
+							</view>
+							
+							<view class="bold">三、用户个人信息保护及授权</view>
+							
+							<view>1.您知悉并同意,为方便您使用“祥粤云学堂”相关服务,我们将视不同产品/服务,存储您在使用时的必要信息,包括但不限于您的真实姓名、身份证号码、手机号码、个人生物识别信息、学历信息等。除法律法规规定的情形外,未经您的许可,我们不会向第三方公开、透露您的个人信息。我们对相关信息采取专业加密存储与传输方式,利用合理措施保障用户个人信息的安全。
+							</view>
+							
+							<view>2.您充分理解并同意:</view>
+							<view>(1)同意通过短信、电话、站内私信等形式,接受“祥粤云学堂”发送的多类通知,用于用户消息告知、身份验证、安全验证等用途;我们可能使用您的个人信息,通过我们的站内私信、电子邮件或其他方式向您提供或推广我们或第三方的商品和服务;
+							</view>
+							
+							<view>(2)为配合行政监管机关、司法机关执行工作,在法律规定范围内我们有权向上述行政、司法机关提供您在使用“祥粤云学堂”时所储存的相关信息,包括但不限于您的注册信息等,或使用相关信息进行证据保全,包括但不限于公证、见证等;
+							</view>
+							
+							<view>(3)我们依法保障您在使用过程中的知情权和选择权,在您使用“祥粤云学堂”服务过程中,涉及您设备自带功能的服务会提前征得您同意,您一经确认,我们有权开启包括但不限于使用摄像头、访问相册等提供服务必要的辅助功能。
+							</view>
+							
+							<view>(4)我们有权根据实际情况,在法律规定范围内自行决定单个用户在“祥粤云学堂”及服务中数据的最长储存期限以及用户日志的储存期限,并在服务器上为其分配数据存储空间等。
+							</view>
+							
+							<view class="bold">四、用户行为规范</view>
+							
+							<view>1、您同意严格遵守法律法规规章规定,依法遵守以下义务:</view>
+							<view>(1)不得制作、传输或发表以下违法信息资料:反对宪法所确定的基本原则,煽动抗拒、破坏宪法和法律法规实施的;危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的,煽动推翻社会主义制度的;损害国家荣誉和利益的;歪曲、丑化、亵渎、否定英雄烈士事迹和精神,侵害英雄烈士的姓名、肖像、名誉、荣誉的;宣扬或煽动实施恐怖主义、极端主义及其活动的;煽动民族仇恨、民族歧视、破坏民族团结的言论;破坏国家宗教政策,宣扬邪教和封建迷信的;散布谣言,扰乱经济秩序和社会秩序的;散布淫秽、色情、暴力或者教唆犯罪的;侮辱或者诽谤他人,侵害他人名誉、隐私和其他合法权益的;法律、行政法规禁止的其他内容。
+							</view>
+							
+							<view>(2)防范和抵制制作、复制、发布含有下列内容的不良信息资料:标题严重夸张,发表内容与标题严重不符的;不当评述自然灾害、重大事故等灾难的;煽动人群歧视、地域歧视等的;宣扬低俗、庸俗、媚俗内容的;违反社会公德行为的;侵犯未成年人合法权益的;其他对网络生态造成不良影响的内容。
+							</view>
+							
+							<view>2、本协议依据国家相关法律法规规章制定,您亦同意严格遵守以下义务:</view>
+							<view>(1)从中国大陆向境外传输资料信息时必须符合中国有关法规;</view>
+							<view>(2)不得利用本网站从事洗钱、窃取商业秘密、窃取个人信息等违法犯罪活动;</view>
+							<view>(3)不得干扰本网站的正常运转,不得侵入本网站及国家计算机信息系统;</view>
+							<view>(4)不得传输或发表任何违法犯罪的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的、不文明的等信息资料;</view>
+							<view>(5)不得教唆他人从事违法违规或本协议、平台规则所禁止的行为;</view>
+							<view>(6)不得利用在本网站注册的账户进行牟利性经营活动;</view>
+							<view>(7)不得发布任何侵犯他人个人信息、著作权、商标权等知识产权或合法权利的内容。</view>
+							<view>3、您须对自己在网上的言论和行为承担法律责任,您若在“祥粤云学堂”上散布和传播反动、色情或其它违反国家法律的信息,“祥粤云学堂”的系统记录有可能作为您违反法律的证据。
+							</view>
+							
+							<view class="bold">五、知识产权</view>
+							<view>“祥粤云学堂”提供的网络服务中包含的任何文本、图片、图形、音频和/或视频资料均受版权、商标和/或其它财产所有权法律的保护,祥粤享有上述知识产权,但相关权利人依照法律规定应享有的权利除外。未经祥粤书面同意,用户均不得将上述资料在任何媒体直接或间接发布、播放、出于播放或发布目的而改写或再发行,或者被用于其他任何商业目的。所有以上资料或资料的任何部分仅可作为私人和非商业用途使用。
+							</view>
+							
+							<view class="bold">六、协议修改</view>
+							<view>1. 根据互联网的发展和有关法律、法规及规范性文件的变化,或者因业务发展、技术条件、产品功能等变化的需要,我们将在必要时对本协议的服务条款作出修改或变更。我们将会直接在“祥粤云学堂”互联网服务产品上公布修改之后的协议内容,该公布行为视为祥粤已经通知用户修改内容,修改后的内容一经公布即有效替代原有服务条款。我们也可采用电子邮件或私信的传送方式,提示用户协议条款的修改、服务变更、或其它重要事项。
+2. 用户可登录“祥粤云学堂”互联网服务产品中查阅最新版本的相关协议条款。如果用户继续使用“祥粤云学堂”提供的服务,即视为用户已经接受修改后的服务条款;如果用户不接受修改后的服务条款或对内容存在异议的,应当停止使用“祥粤云学堂”提供的服务。
+							</view>
+							
+							<view class="bold">七、免责声明</view>
+							<view>1.我们不保证(包括但不限于):</view>
+							<view>(1)“祥粤云学堂”的服务不受干扰,及时、安全、可靠或不出现错误;</view>
+							<view>(2)用户经由“祥粤云学堂”取得的任何产品、服务或其他材料符合用户的期望。</view>
+							<view>2.用户使用经由“祥粤云学堂”下载的或取得的任何资料,其风险自行负担。</view>
+							<view>3.由于地震、台风、洪水、火灾、战争、政府禁令以及其他不能预见并且对其发生和后果不能防止或避免的不可抗力或互联网上的黑客攻击事件,致使影响本服务条款的履行,祥粤不承担责任。
+							</view>
+							
+							<view>4.用户同意“祥粤云学堂”因政策法规变化、教学需要等原因有权更新课程,包括但不限于变更在线课程的授课老师、讲义及课件内容等。</view>
+							<view class="bold">八、法律适用及争议解决</view>
+							<view>1. 本协议的成立、效力、履行、解释及纠纷的解决,适用于中华人民共和国法律。本协议之任何规定因与中华人民共和国法律抵触而无效,则这些条款应在不违反法律的前提下按照尽可能接近本协议原条文目的之原则进行重新解释和适用,且本协议其它规定仍应具有完整的效力及效果。
+							</view>
+							<view>2.本协议的签署地点为中华人民共和国广州市天河区,若用户和祥粤之间发生任何纠纷或争议,首先应友好协商解决,协商不成的,用户同意将纠纷或争议提交协议签订地有管辖权的人民法院管辖。
+							</view>
+							
+							<view class="bold center">《个人信息保护政策》</view>
+							<view>广东省祥粤建设职业培训学校(注册地址:广东省广州市天河区燕岭路123号3楼)及其关联方(以下简称“祥粤”或“我们”)作为“祥粤云学堂”互联网服务产品(包括但不限于祥粤云学堂网站www.xyyxt.net、微信小程序等,下称“祥粤云学堂”)的运营者,深知个人信息对您的重要性,我们将按照法律法规的规定,保护您的个人信息安全。我们制定本“个人信息保护政策”并特别提示:希望您在使用“祥粤云学堂”及相关服务前仔细阅读并理解本个人信息保护政策,以便做出适当的选择。本政策中涉及的相关术语,我们尽量以简明扼要的方式进行表述,以便您更好地理解。您使用或在我们更新本政策后(我们会及时提示您更新的情况并再次取得您对本政策更新版本的同意)继续使用我们的服务,即意味着您同意本政策(含更新版本)内容,并且同意我们按照本政策收集、使用、存储、传输、共享、转让和公开披露您的相关信息。
+							</view>
+							
+							<view class="bold">本个人信息保护政策将帮助您了解:</view>
+							<view>• 我们会遵循个人信息保护政策收集、使用您的信息,但不会仅因您同意本个人信息保护政策而采用强制捆绑的方式一揽子收集个人信息。</view>
+							<view>• 当您使用或开启相关功能或使用服务时,为实现功能、服务所必需,我们会收集、使用相关信息。除非是为实现基本业务功能或根据法律法规要求所必需的必要信息,您均可以拒绝提供且不影响其他功能或服务,对于前述您可以拒绝提供的信息,我们将在个人信息保护政策中进行说明。
+							</view>
+							
+							<view>• 地理位置、网络、通知、相机、摄像头、麦克风、相册等权限,均不会默认开启,只有经过您的明示授权才会在为实现特定功能或服务时使用,您也可以撤回授权。特别需要指出的是,即使经过您的授权,我们获得了这些敏感权限,也不会在相关功能或服务不需要时而收集您的信息。
+							</view>
+							
+							<view>•本个人信息保护政策适用于您通过“祥粤云学堂”官方网站或微信小程序来访问和使用我们的产品和服务。</view>
+							
+							<view>下文将帮您详细了解我们将如何收集、使用、存储、传输、共享、转让、公开披露和保护(如适用)您的个人信息,帮您了解查询、访问、删除、更正、撤回授权个人信息的方式。其中,有关您个人信息权益的条款重要内容我们已用加粗形式提示,请特别关注。请您了解并知悉,“祥粤云学堂”未来有可能根据信息处理情境不时更新或修改本政策。
+							</view>
+							
+							<view class="bold">一、我们如何收集和使用您的个人信息</view>
+							<view>个人信息是指以电子或者其他方式记录的与已识别或者可识别的自然人有关的各种信息,不包括匿名化处理后的信息。个人敏感信息是指一旦泄露或者非法使用,容易导致自然人的人格尊严受到侵害或者人身、财产安全受到危害的个人信息,包括生物识别、宗教信仰、特定身份、医疗健康、金融账户、行踪轨迹等信息,以及不满十四周岁未成年人的个人信息。本政策中涉及的个人信息包括但不限于基本信息(包括个人姓名、生日、性别、住址、个人电话号码、电子邮箱、工作单位等)、个人身份信息(包括身份证、军官证、护照、驾驶证等)、个人生物识别信息(包括声纹、面部识别特征等)、网络身份标识信息(包括个人信息主体账号、IP地址、邮箱地址及与前述有关的密码、口令、口令保护答案等)、个人财产信息(包括交易和消费记录)、通讯录、个人上网记录(包括网站浏览记录、软件使用记录、点击记录等)、个人常用设备信息(如硬件序列号、设备MAC地址、软件列表、唯一设备识别码(如IMEI/Android ID/IDFA/OPENUDID/GUID、SIM卡IMSI信息等)在内的描述个人常用设备基本情况的信息)及个人位置信息(包括行踪轨迹、精准定位信息、住宿信息、经纬度等);其中,字体加粗部分为涉及的个人敏感信息。
+							</view>
+							<view class="bold">(一)我们收集和使用个人信息的功能和场景</view>
+							<view>我们根据合法、正当、必要的原则,仅收集实现产品/服务功能所必要的信息用于实现明确、合理的处理目的。我们不会以欺诈、诱骗、误导的方式收集个人信息,也不会从非法渠道获取个人信息。</view>
+							<view>我们提供如下功能和服务时,可能会处理下列与您有关的信息。</view>
+							<view>如果您不提供相关信息,您可能无法注册成为我们的用户或无法享受我们提供的某些产品/服务,或者无法达到使用相关服务拟达到的效果。</view>
+							<view class="bold">用户注册/登录</view>
+							<view>您使用“祥粤云学堂”提供的服务,可以注册并登录经注册的“祥粤云学堂”账号。当您注册“祥粤云学堂”账号时,您需向我们提供您的移动电话号码,我们将通过发送短信验证码的方式来验证您的身份是否有效,验证无误后我们会为您创建账号;此外,您也可以使用微信账号登录并使用“祥粤云学堂”,但您仍需要将微信账号与“祥粤云学堂”账号绑定,账号绑定后,您可以直接使用微信账号扫码登录并使用本产品和相关服务。</view>
+							<view>为了满足相关法律法规的网络实名制要求,我们需要收集您的移动电话号码。如您拒绝提供移动电话号码或进行实名验证,在您同意接受本《个人信息保护政策》及《祥粤云学堂用户使用协议》适用条款的前提下,您仍可浏览“祥粤云学堂”网站的内容,但将无法使用课程购买、课程学习、考试预约等其他全部或部分“祥粤云学堂”提供的服务。</view>
+							<view class="bold">网上购物下单</view>
+							<view>当您准备对您平台购物车内的产品/服务进行结算时,我们的网站系统会生成您购买该产品/服务的订单。针对不同的产品/服务,可能还需要您提供额外的个人信息,以完成下单。</view>
+							<view>(1)考前培训课程:您在登录个人账号后,如需要购买考前培训课程,无须提供额外的个人信息,便可完成下单。</view>
+							<view>(2)二级建造师继续教育:您在登录个人账号后,如需要购买二级建造师继续教育课程,根据广东省建设执业注册管理中心的要求,您需提供以下个人信息,以便完成下单:姓名、性别、身份证号码、移动电话号码、身份证照片、一寸照、证书名称/岗位、证书编号、证书有效期、工作单位。</view>
+							<view>(3)施工现场管理人员(七大员)新考证:您在登录个人账号后,如需要购买七大员新考的考试报名及考前培训课程,根据广州市建筑教育协会的要求,您需提供以下个人信息,以便完成下单:姓名、性别、身份证号码、移动电话号码、身份证照、承诺书照、一寸照、用户电子签名、学历信息、工作单位、工作年限。</view>
+							<view>(4)施工现场管理人员(七大员)继续教育:您在登录个人账号后,如需要购买七大员继续教育课程,根据广东省建筑教育协会的要求,您需提供以下个人信息,以便完成下单:姓名、身份证号码、移动电话号码、证书名称/岗位、证书编号、发证时间、证书有效期、工作单位。</view>
+							<view>上述所有信息构成您的“订单信息”,我们将使用您的订单信息来进行您的身份核验、确定交易、支付结算、为您查询订单以及提供客服咨询与售后服务;我们还会使用您的订单信息来判断您的交易是否存在异常以保护您的交易安全。</view>
+							<view>我们会收集您的交易记录信息,以便您查询您的交易记录及保障交易安全。</view>
+							<view class="bold">支付</view>
+							<view>在您使用消费功能并选择支付时,您可以使用微信支付所提供的支付服务。支付功能本身并不收集您的个人信息,但我们需要将您的订单号与交易金额信息与支付机构共享以实现其确认您的支付指令并完成支付。</view>
+							<view class="bold">在线课程学习</view>
+							<view>您在购买相应课程后,可以在平台进行在线课程学习,部分课程可能需额外获取您的个人信息。</view>
+							<view>(1)考前培训课程:您在登录个人账号后,即可进行在线学习,无须提供其他个人信息。</view>
+							<view>(2)施工现场管理人员(七大员)继续教育:您在登录个人账号后,即可进行在线学习,无须提供其他个人信息。我们会将您的以下个人信息提供予广东省建筑教育协会:姓名、身份证号码、移动电话号码、证书名称/岗位、证书编号。</view>
+							<view>(3)二级建造师继续教育:您在登录个人账号后,即可进行在线学习,根据广东省建设执业注册管理中心的要求,在您每一节在线课程的培训过程中,我们需要通过您设备上的摄像头随机拍摄三张照片,用于比对核实学习人员的身份。我们会将您的以下个人信息提供予广东省建设执业注册管理中心:姓名、性别、身份证号码、移动电话号码、身份证照片、一寸照、证书名称/岗位、证书编号、有效期、人脸照片、学习详细记录。</view>
+							<view>(4)施工现场管理人员(七大员)新考证:您在登录个人账号后,即可进行在线学习,根据广州市建筑教育协会的要求,在您每一节在线课程的培训过程中,我们需要通过您设备上的摄像头随机拍摄三张照片,用于比对核实学习人员的身份。我们会将您的以下个人信息提供予广州市建筑教育协会:姓名、性别、身份证号码、移动电话号码、身份证照、承诺书照、一寸照、用户电子签名、学历信息、工作年限、人脸照片、学习详细记录。</view>
+							<view class="bold">商品或服务推荐</view>
+							<view>为了改进我们的商业广告服务,将您可能感兴趣的商品或服务信息(包括但不限于课程等)展示给您,提升现有服务体验,我们可能会收集您的年龄、学历信息、工作年限等信息,并以此开展内部审计、进行数据分析、形成用户画像,以便为您提供个性化的商品或服务推荐。</view>
+							<view class="bold">客服与发票功能</view>
+							<view>在您与我们的在线客服/电话客服进行沟通时,为了及时有效地与您沟通,我们的在线客服/电话客服功能会使用您的账号信息、订单信息。</view>
+							<view>为保证您的账号安全,我们的在线客服/电话客服会使用您的账号信息与您核验您的身份。当您需要我们提供与您订单信息相关的客服与售后服务时,我们将会查询您的订单信息。若您需要开具发票,则需提供相应的开票信息。</view>
+							<view class="bold">保障账号和服务安全</view>
+							<view>为提高您使用我们的服务时系统的安全性并保障网站数据安全,更准确地预防钓鱼网站欺诈和保护账户安全,我们会收集您的有关信息对“祥粤云学堂”系统问题进行分析、统计流量并排查可能存在的风险、在您选择向我们发送异常信息时予以排查。我们可能使用您的账户信息、服务日志信息以及我们关联方、合作方在获得您授权或依法可以共享的信息,用于判断账户安全、进行身份验证、检测及防范安全事件。尤其是在接到您有关账号安全方面的需求(如账号找回)时,我们可能会要求您再次提供相关信息(如移动电话号码等)用于安全验证,如您拒绝提供的,我们可能无法判断您账户的安全情况或无法为您进行与账号安全相关的操作。</view>
+							<view class="bold">设备权限调用</view>
+							<view>我们在提供服务的过程中,基于服务的具体场景和功能,可能需要您开启一些设备访问权限,例如相机(摄像头)、相册(图片库)等访问权限,以实现拍摄、上传图片等功能所涉及的信息收集和使用。您也可以在设备的设置功能中随时选择关闭部分或全部权限,从而撤回您授予我们某项权限的同意。在不同设备中,权限显示方式及关闭方式可能有所不同,具体请参考设备及系统开发方说明或指引。请您注意,您开启这些权限即代表您授权我们可以收集和使用这些个人信息来实现上述的功能,您关闭权限即代表您取消了这些授权,则我们将不再继续收集和使用您的这些个人信息,也无法为您提供与这些授权所对应的功能。您关闭权限的决定不会影响此前基于您的授权所进行的个人信息的处理。</view>
+							<view class="bold">消息通知</view>
+							<view>您知悉并同意,对于您在使用产品及/或服务的过程中提供的您的联系方式(例如:移动电话号码),我们在运营中可能会向其中的一种或多种发送多类通知,用于用户消息告知、身份验证、安全验证等用途;我们可能使用您的个人信息,通过我们的站内私信、电子邮件或其他方式向您提供或推广我们或第三方的商品和服务。如相关页面设置了“退订”或类似功能且您不希望我们通过上述方式向您发送商品或服务的相关信息,您可以按照页面提示的操作进行设置或联系我们进行反馈,要求全部或部分停止接收我们发送的相关推广信息。</view>
+							<view class="bold">征得授权同意的例外</view>
+							<view>根据相关法律法规的规定,以下情形中收集您的个人信息无需征得您的授权同意:</view>
+							<view>(1)与我们履行法律法规规定的义务相关的;</view>
+							<view>(2)与国家安全、国防安全直接相关的;</view>
+							<view>(3)与公共安全、公共卫生、重大公共利益直接相关的;</view>
+							<view>(4)与刑事侦查、起诉、审判和判决执行等直接相关的;</view>
+							<view>(5)出于维护您或其他个人的生命、财产等重大合法权益但又很难得到您本人同意的;</view>
+							<view>(6)所收集的个人信息是您或您的监护人自行向社会公众公开的;</view>
+							<view>(7)从合法公开披露的信息中收集个人信息的,如合法的新闻报道、政府信息公开等渠道;</view>
+							<view>(8)根据您的要求签订和履行合同所必需的;</view>
+							<view>(9)用于维护所提供的产品或服务的安全稳定运行所必需的,例如发现、处置产品或服务的故障;</view>
+							<view>(10)为合法的新闻报道所必需的;</view>
+							<view>(11)学术研究机构基于公共利益开展统计或学术研究所必要,且对外提供学术研究或描述的结果时,对结果中所包含的个人信息进行去标识化处理的;</view>
+							<view>(12)法律法规规定的其他情形。</view>
+							<view class="bold">(二)您个人信息使用的规则</view>
+							<view>1、我们会根据本政策的约定并为实现我们的服务功能对所收集的个人信息进行使用。</view>
+							<view>2、请您注意,您在使用我们的服务时所提供的所有个人信息,除非您删除或通过系统设置拒绝我们收集,否则将在您使用我们的服务期间持续授权我们使用。在您注销账号后,我们将停止为您提供服务,您的个人信息将在“祥粤云学堂”全站匿名化处理,使您的账号处在不可被检索、访问的状态,并在符合相关法律法规规定的前提下删除您的个人信息。</view>
+							<view>3、当我们要将您的个人信息用于本政策未载明的其他用途时,或基于特定目的收集而来的信息用于其他目的时,会通过您主动做出勾选或其他合法形式事先征求您的同意。</view>
+							<view>4、根据法律法规的规定,经过处理无法识别特定个人且不能复原的信息不属于个人信息,我们有权自行决定收集、使用该部分信息,包括但不限于对该类信息进行分析并予以商业化的利用。</view>
+							<view class="bold">二、我们会如何使用Cookies和同类技术</view>
+							<view>您使用我们的服务时,我们会在您的计算机或移动设备上存储名为Cookies的小数据文件。Cookies通常包含标识符、站点名称以及一些号码和字符。我们使用该等信息判断注册用户是否已经登录,提升服务质量及优化用户体验。</view>
+							<view>我们不会将Cookies用于本政策所述目的之外的任何用途。您可根据自己的偏好管理或删除Cookies。您可以清除计算机上保存的所有Cookies,大部分网络浏览器都设有阻止Cookies的功能。但如果您这么做,您可能需要在每一次访问我们的网站时亲自更改用户设置,而且您之前所记录的相应信息也均会被删除,并且可能会对您所使用服务的安全性有一定影响。</view>
+							<view class="bold">三、我们会如何委托处理、共享、转让、公开披露您的个人信息</view>
+							<view class="bold">(一)委托处理</view>
+							<view>为了向您提供更完善、优质的产品/服务,某些功能可能由我们的服务合作方提供(如我们的第三方服务供应商、承包商、代理等),我们会委托服务合作方代表我们处理您的某些个人信息,例如委托第三方进行人脸识别等。</view>
+							<view>对接受我们的委托处理您个人信息的公司、组织和个人,我们会与其签署保密协定或数据处理协议,明确双方责任、处理事项和处理目的等,要求他们仅按照我们的要求、本政策以及相关的保密和安全措施来处理个人信息。如该等第三方要改变个人信息的处理目的,该等第三方应再次征求您的同意。如果您拒绝我们的服务合作方在提供服务时收集为提供服务所必需的个人信息,将可能导致您无法使用我们的产品/服务来享用该合作方提供的服务。</view>
+							<view>委托处理您的个人信息的第三方SDK包括:</view>
+							<view>功能类型</view>
+							<view>第三方名称</view>
+							<view>获取信息目的</view>
+							<view>涉及个人信息范围</view>
+							<view>隐私政策链接</view>
+							<view>人脸识别</view>
+							<view>腾讯云</view>
+							<view>人脸比对</view>
+							<view>身份证照片</view>
+							<view>人脸照片</view>
+							<view class="bold">(二)共享</view>
+							<view>我们不会在未经您同意或授权的情况下向任何公司、组织和个人分享您的个人信息,但是您在此同意,我们可在以下情况下共享您的个人信息:</view>
+							<view>1、在获取明确同意的情况下共享:获得您的明确同意后,我们会与其他方共享您的个人信息。</view>
+							<view>2、我们可能会根据法律法规规定,或按政府主管部门的强制性要求,对外共享您的个人信息。</view>
+							<view>3、与我们的关联公司共享:在本政策声明的使用目的范围内,您的个人信息可能会与我们的关联公司共享。作为一项政策,我们只会共享必要的信息。关联公司如要改变个人信息的处理目的,将再次征求您的授权同意。</view>
+							<view>4、与授权合作伙伴共享:仅为实现本政策中声明的目的,平台的某些服务将由平台和授权合作伙伴共同提供。平台可能会与合作伙伴共享您的某些个人信息,以提供更好的客户服务和用户体验。平台仅会出于合法、正当、必要、特定、明确的目的共享您的个人信息,并且只会共享提供服务所必要的个人信息。</view>
+							<view>如果为了向您提供服务而需要将您的信息共享至第三方,我们将评估该第三方收集信息的合法性、正当性、必要性。我们将要求第三方对您的信息采取保护措施,并且严格遵守相关法律法规与监管要求。平台的合作伙伴无权将共享的个人信息用于与产品或服务无关的其他用途。</view>
+							<view>5、祥粤云学堂服务含有到其他网站的链接。除法律另有规定外,我们对其他网站的隐私保护措施不负任何责任。平台可能在任何需要的时候增加商业伙伴或共用品牌的网站,但是提供给他们的将仅是匿名化的信息,平台将不会公开您的身份。</view>
+							<view class="bold">(三)转让</view>
+							<view>我们不会将您的个人信息转让给任何公司、组织和个人,但以下情况除外:</view>
+							<view>1、在获取明确同意的情况下转让:获得您的明确同意后,我们会向其他方转让您的个人信息;</view>
+							<view>2、在涉及合并、收购或破产清算时,如涉及到个人信息转让,我们会要求新的持有您个人信息的公司、组织继续受本政策的约束,否则我们将要求该公司、组织重新向您征求授权同意。</view>
+							<view class="bold">(四)公开披露</view>
+							<view>我们仅会在以下情况下,公开披露您的个人信息:</view>
+							<view>1、获得您明确同意后;</view>
+							<view>2、基于法律的披露:在法律、法律程序、诉讼或政府主管部门强制性要求的情况下,我们可能会公开披露您的个人信息。</view>
+							<view class="bold">四、我们会如何保护和保存您的个人信息</view>
+							<view class="bold">(一)我们保护您个人信息的技术与措施</view>
+							<view>1、为保障您的信息安全,我们会在现有技术水平下努力采取合理必要的物理、技术和行政管理方面的安全措施来保护您的信息,以防止您的信息遭受丢失、误用、非授权访问、公开披露和更改,包括但不限于SSL、信息加密存储、数据中心的访问控制、专用的网络通道及代理。</view>
+							<view>互联网环境并非百分之百安全,我们将尽力确保或担保您发送给我们的任何信息的安全性。如果我们的物理、技术或管理防护设施遭到破坏,导致信息被非授权访问、公开披露、篡改或毁坏,导致您的合法权益受损,我们将承担相应的法律责任。</view>
+							<view>2、我们建立专门的管理制度、流程、组织并采取相应措施确保信息安全。例如,我们对可能接触到您的信息的员工或外包人员进行严格管理,包括但不限于根据岗位的不同采取不同的权限控制,与其签署保密协议,监控其操作情况等措施;组织对员工的数据安全或合规培训等。</view>
+							<view>3、若我们确认发生个人信息泄露等安全事件,我们会启动应急预案,阻止安全事件扩大,并以推送通知、公告等形式告知您。同时,我们还将按照监管部门要求上报个人信息安全事件及其处置情况。</view>
+							<view class="bold">(二)我们如何保存您的个人信息</view>
+							<view>1、我们收集和产生的个人信息将存储在中华人民共和国境内。</view>
+							<view>2、当我们的产品/服务发生停止运营的情况时,我们将及时停止继续收集您的个人信息,并将以推送通知或公告等形式通知您,且会对您的个人信息进行删除或匿名化处理,但国家法律法规、规章、规范性文件或政府的政策、命令等另有要求或为履行我们的合规义务而保留您的个人信息的除外。为免疑义,在产品/服务停止运营时,我们对您的个人信息删除或匿名化处理并不影响我们的关联公司基于您的同意而继续处理您的个人信息以及您届时相应地继续使用该等关联公司的服务。</view>
+							<view>3、我们仅会在达到本政策所述目的所必需的时限内保存您的个人信息,但为了遵守适用的法律法规、法院判决或裁定、其他有权机关的要求、维护公共利益等目的,我们可能会将个人信息保存时间予以适当延长。</view>
+							<view class="bold">五、您的权利</view>
+							<view>我们非常重视您对个人信息的关注,并尽全力保护您对于您个人信息访问、更正、删除以及注销账号的权利,以使您拥有充分的能力保障您的个人信息安全。您的权利包括:</view>
+							<view>1、您可以按照我们的相关政策及“祥粤云学堂”网站页面提示,通过网站联系方式或“个人信息”功能界面等对您的个人信息进行查询、访问、更正及删除;具体权限及方式以“祥粤云学堂”网站相关页面显示的操作要求及信息为准。同时,我们将尽一切可能采取适当的技术手段,保证收集到的有关于您的个人信息的准确性,并保证及时进行更新。</view>
+							<view>2、注销账户。您可注销您注册的“祥粤云学堂”账户,具体注销路径: </view>
+							<view>3、响应您的请求</view>
+							<view>如果您无法通过上述方式查询、访问、更正或删除您的个人信息,或您需要访问、更正或删除您在使用我们服务时所产生的其他个人信息,或您认为我们存在任何违反法律法规或与您关于个人信息的收集使用的约定,您均可以通过“祥粤云学堂”网站页面上的联系方式与我们联系。为了保障安全,我们可能需要您提供书面请求,或以其他方式证明您的身份,我们将在收到您反馈并验证您的身份后的十五个工作日内答复您的请求。</view>
+							<view class="bold">六、第三方提供商及其服务</view>
+							<view>为确保流畅的浏览体验,您可能会收到来自“祥粤云学堂”及其合作伙伴外部的第三方(以下简称“第三方”)提供的内容或网络链接。我们对此类第三方无控制权。您可选择是否访问第三方提供的链接、内容、产品和服务。</view>
+							<view>我们无法控制第三方的隐私和个人信息保护政策,此类第三方不受到本政策的约束。您在向第三方提交个人信息之前,请确保您阅读并认可这些第三方的个人信息保护政策或隐私政策。</view>
+							<view class="bold">七、我们会如何处理未成年人的个人信息</view>
+							<view>若您是未满18周岁的未成年人,在使用我们的产品和服务前,应事先取得您监护人的同意。但是,如果您确认自己能够完全理解本政策的全部内容且您为使用“祥粤云学堂”服务所进行的相关操作行为与您的年龄、智力相适应的,则您可以独立进行相关操作(包括向我们提交您的个人信息)。</view>
+							<view>我们将根据国家相关法律法规的规定保护未成年的个人信息。如果我们发现在未事先获得可证实的父母或其他监护人同意的情况下收集了未成年人的个人信息,则会设法尽快删除相关信息。</view>
+							<view class="bold">八、本政策如何更新及适用范围</view>
+							<view>我们保留不时更新或修改本政策的权利,我们会在“祥粤云学堂”网站页面上发布对本政策所做的任何变更。对于重大变更,我们还会提供更为显著的通知(包括对于某些服务,我们会通过电子邮件发送通知,说明个人信息保护政策的具体变更内容)。渠道向您发送变更通知,包括但不限于网站公示、私信通知、电子邮件通知等方式。</view>
+							<view>本政策所指的重大变更包括但不限于:</view>
+							<view>1、我们的服务模式发生重大变化。如处理个人信息的目的、处理的个人信息类型、个人信息的使用方式等;</view>
+							<view>2、我们在所有权结构、组织架构等方面发生重大变化。如业务调整、破产并购等引起的所有者变更等;</view>
+							<view>3、个人信息共享、转让或公开披露的主要对象发生变化;</view>
+							<view>4、您参与个人信息处理方面的权利及其行使方式发生重大变化;</view>
+							<view>5、我们负责处理个人信息安全的责任部门、联络方式及投诉渠道发生变化时;</view>
+							<view>6、个人信息安全影响评估报告表明存在高风险时。</view>
+							<view>若您不同意修改后的个人信息保护政策,您有权并应立即停止使用“祥粤云学堂”的服务。</view>
+							<view>如果您继续使用“祥粤云学堂”服务,则视为您接受我们对本政策相关条款所做的修改。</view>
+							<view>“祥粤云学堂”的所有服务均适用本政策。但某些服务有其特定的个人信息保护政策,该等特定的个人信息保护政策更具体地说明我们在该服务中如何处理您的信息。如本政策与特定服务的个人信息保护政策有不一致之处,请以该特定个人信息保护政策为准。</view>
+							<view class="bold">九、联系我们</view>
+							<view>当您有个人信息相关问题或其他的投诉、建议等,可以通过如下方式与平台联系,平台将尽快审核所涉及内容,并于15个工作日内对于您的问题、投诉、建议进行回复:</view>
+							<view>平台运营主体名称:广东省祥粤建设职业培训学校</view>
+							<view>注册地址:广东省广州市天河区燕岭路123号3楼</view>
+							<view>联系地址:广东省广州市天河区燕岭路123号3楼</view>
+							<view>联系电话:020-87085982、020-87085983</view>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="footer">
+					<view v-if="isAgree" class="btn close" @click="agreementModal = false">关闭</view>
+					<view v-if="!isAgree" class="btn cancel" @click="refuseAgreement">取消</view>
+					<view v-if="!isAgree" class="btn ok" @click="agree">确定</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -33,6 +306,8 @@
 export default {
 	data() {
 		return {
+			agreementModal:true,
+			isAgree:false,
 			form:{
 				code:'',
 				tel:'',
@@ -81,12 +356,23 @@ export default {
 	},
 	mounted() {},
 	methods: {
+		agree() {
+			this.agreementModal = false;
+			setTimeout(() => {
+				this.isAgree = true;
+			},500)
+		},
 		canRegister() {
 			if(this.form.tel && this.form.code && this.form.pwd && this.read) {
 				return true;
 			}
 			return false;
 		},
+		refuseAgreement() {
+			uni.navigateBack({
+				delta:1
+			})
+		},
 		submit(){
 			let that = this
 			// if(!this.form.tel){
@@ -329,4 +615,70 @@ export default {
 	position: absolute;
 	left: 30rpx;
 }
+
+.modal {
+	.agreement {
+		width: 640rpx;
+		height: 1112rpx;
+		background: #FFFFFF;
+		display: flex;
+		flex-direction: column;
+		
+		.body {
+			flex:1;
+			
+			.content {
+				padding:30rpx 40rpx 28rpx;
+				line-height: 40rpx;
+				font-size: 24rpx;
+				color:#666;
+				
+				.bold {
+					color:#333;
+					font-size: 26rpx;
+					font-weight: bold;
+				}
+				
+				.center {
+					text-align: center;
+				}
+			}
+		}
+		
+		.footer {
+			height:140rpx;
+			border-top:1px solid #EEEEEE;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			.btn {
+				margin:0 12rpx;
+				width: 200rpx;
+				height: 80rpx;
+				color:#007AFF;
+				font-size: 30rpx;
+				text-align: center;
+				line-height: 80rpx;
+				background: #F5F5F5;
+				border-radius: 40rpx 40rpx 40rpx 40rpx;
+				
+				&.ok {
+					width: 336rpx;
+					height: 80rpx;
+					background: #007AFF;
+					color:#fff;
+				}
+				
+				&.close {
+					color:#fff;
+					width: 560rpx;
+					height: 80rpx;
+					background: #007AFF;
+					border-radius: 40rpx 40rpx 40rpx 40rpx;
+				}
+			}
+		}
+	}
+}
 </style>

+ 56 - 19
pages2/subject/collectBank.vue

@@ -92,13 +92,18 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view> 
 						</view>
@@ -170,13 +175,19 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -202,7 +213,10 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -211,7 +225,10 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -241,13 +258,18 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view>
 								</view>	
@@ -412,6 +434,8 @@ export default {
 								arr[i] = ''+a;
 							})
 							item.ans = arr;
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
@@ -421,6 +445,8 @@ export default {
 								text: '',
 								imageList: []
 							}
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							
 							if(this.explain) {
 								item.ques = {
@@ -439,6 +465,7 @@ export default {
 							item.jsonStr.forEach((json,index) => {
 								if(json.type == 1) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 2) {
 									json.optionsList.forEach(str => {
 										str.optionsId = ''+str.optionsId;
@@ -448,8 +475,10 @@ export default {
 										arr[i] = ''+a;
 									})
 									ansArr[index] = arr
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 3) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 5) {
 									ansArr[index] = {
 										text: '',
@@ -459,17 +488,20 @@ export default {
 										text: '',
 										imageList: []
 									}
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								}
 							})
 							
 							item.ans = ansArr
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
 							return;
 							
 						}
-						
+						item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+						item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 						item.ans = item.answerQuestion
 						if(this.explain) {
 							item.ques = item.ans;
@@ -787,8 +819,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -838,8 +870,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -870,6 +902,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -891,12 +924,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -906,7 +939,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1018,7 +1055,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1207,13 +1244,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 57 - 19
pages2/subject/collectTypeBank.vue

@@ -93,13 +93,18 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view> 
 						</view>
@@ -171,13 +176,19 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="index" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -203,7 +214,10 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!this.isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -212,7 +226,10 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -242,13 +259,18 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -415,13 +437,16 @@ export default {
 							if(this.explain) {
 								item.ques = item.ans;
 							}
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							return;
 						} else if(item.type == 5) {
 							item.ansText = {
 								text: '',
 								imageList: []
 							}
-							
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = {
 									text:item.analysisContent
@@ -439,6 +464,7 @@ export default {
 							item.jsonStr.forEach((json,index) => {
 								if(json.type == 1) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 2) {
 									json.optionsList.forEach(str => {
 										str.optionsId = ''+str.optionsId;
@@ -448,8 +474,10 @@ export default {
 										arr[i] = ''+a;
 									})
 									ansArr[index] = arr
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 3) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 5) {
 									ansArr[index] = {
 										text: '',
@@ -459,10 +487,13 @@ export default {
 										text: '',
 										imageList: []
 									}
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								}
 							})
 							
 							item.ans = ansArr
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
@@ -470,6 +501,8 @@ export default {
 							
 						}
 						
+						item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+						item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 						item.ans = item.answerQuestion
 						if(this.explain) {
 							item.ques = item.ans;
@@ -787,8 +820,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -838,8 +871,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -870,6 +903,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -891,12 +925,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -906,7 +940,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1018,7 +1056,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1207,13 +1245,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 67 - 26
pages2/subject/wrongBank.vue

@@ -72,7 +72,7 @@
 						<view v-if="bank.ques">
 							<view class="pad_8 answer">
 								<view>正确答案:
-									<text v-for="ansItem in bank.ans">{{ast[ansItem-1]}}</text>
+									<text :key="ansIndex" v-for="(ansItem,ansIndex) in bank.ans">{{ast[ansItem-1]}}</text>
 								</view>
 								<view v-if="!explain">我的答案:
 									<text v-for="quesItem in bank.ques">{{ast[quesItem-1]}}</text>
@@ -92,13 +92,18 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view> 
 						</view>
@@ -141,7 +146,7 @@
 									<view class="answerTitle">我的答案:</view>
 									{{bank.ques.text}}
 									<view class="imgs">
-										<image class="img" v-for="ques in bank.ques.imageList" :src="$method.splitImgHost(ques,true)"></image>
+										<image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques.imageList" :src="$method.splitImgHost(ques,true)"></image>
 									</view>
 								</view>
 							</view>
@@ -170,13 +175,19 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="index" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -202,7 +213,10 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -211,17 +225,20 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
 								<view v-if="bank.ques[ansIndex]">
 									<view class="pad_8 answer">
 										<view>正确答案:
-											<text v-for="ansItem1 in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
+											<text :key="ansItemIndex1" v-for="(ansItem1,ansItemIndex1) in bank.ans[ansIndex]">{{ast[ansItem1-1]}}</text>
 										</view>
 										<view v-if="!explain">我的答案:
-											<text v-for="quesItem in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
+											<text :key="quesItemIndex" v-for="(quesItem,quesItemIndex) in bank.ques[ansIndex]">{{ast[quesItem-1]}}</text>
 										</view>
 									</view>
 									<view class="pad_8 answerInfos">
@@ -241,13 +258,19 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -285,7 +308,7 @@
 												<textarea v-model="ansItem.ansText.text" placeholder="在此输入答案"></textarea>
 											</view>
 											<view class="imgs">
-												<view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" >
+												<view class="img" v-for="(img,imgIndex) in ansItem.ansText.imageList" :key="imgIndex">
 													<text @click="deleteImgChild(imgIndex,bankIndex,ansIndex)">x</text>
 													<image :src="$method.splitImgHost(img, true)"></image>
 												</view>
@@ -295,7 +318,7 @@
 											<view class="answerTitle">我的答案</view>
 											{{bank.ques[ansIndex].text}}
 											<view class="imgs">
-												<image class="img" v-for="ques in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
+												<image class="img" :key="quesIndex" v-for="(ques,quesIndex) in bank.ques[ansIndex].imageList" :src="$method.splitImgHost(ques,true)"></image>
 											</view>
 										</view>
 									</view>
@@ -426,13 +449,14 @@ export default {
 							if(this.explain) {
 								item.ques = item.ans;
 							}
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 							return;
 						} else if(item.type == 5) {
 							item.ansText = {
 								text: '',
 								imageList: []
 							}
-							
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = {
 									text:item.analysisContent
@@ -450,6 +474,7 @@ export default {
 							item.jsonStr.forEach((json,index) => {
 								if(json.type == 1) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 2) {
 									json.optionsList.forEach(str => {
 										str.optionsId = ''+str.optionsId;
@@ -459,8 +484,10 @@ export default {
 										arr[i] = ''+a;
 									})
 									ansArr[index] = arr
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 3) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 5) {
 									ansArr[index] = {
 										text: '',
@@ -470,10 +497,12 @@ export default {
 										text: '',
 										imageList: []
 									}
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								}
 							})
 							
 							item.ans = ansArr
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
@@ -518,6 +547,8 @@ export default {
 								arr[i] = ''+a;
 							})
 							item.ans = arr;
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
@@ -527,7 +558,8 @@ export default {
 								text: '',
 								imageList: []
 							}
-							
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = {
 									text:item.analysisContent
@@ -569,6 +601,8 @@ export default {
 							})
 							
 							item.ans = ansArr
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
@@ -576,6 +610,8 @@ export default {
 							
 						}
 						
+						item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+						item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 						item.ans = item.answerQuestion
 						if(this.explain) {
 							item.ques = item.ans;
@@ -941,8 +977,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -992,8 +1028,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -1037,6 +1073,7 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
 	
 	.flex_auto {
 		flex:1;
@@ -1058,12 +1095,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -1073,7 +1110,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1181,7 +1222,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1370,13 +1411,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 57 - 19
pages2/subject/wrongTypeBank.vue

@@ -92,13 +92,18 @@
 							<view v-if="!bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty" @click="judgeSelect(index,bankIndex)">
 									<view class="activeTI">{{ ast[index] }}</view>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
+									
 								</view>
 							</view>
 							<view v-if="bank.ques">
 								<view v-for="(item, index) in judge" :key="index" class="lisSty">
 									<text :class="{right:(index == bank.ques) || (index == bank.ans),wrong:(index == bank.ques) && (bank.ques != bank.ans)}"  class="activeTI">{{ ast[index] }}</text>
-									{{ item }}
+									<view class="flex_auto">
+										{{ item }}
+									</view>
 								</view>
 							</view> 
 						</view>
@@ -170,13 +175,19 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty" @click="radioSelectChild(option.optionsId,ansIndex,bankIndex)">
 											<view class="activeTI">{{ ast[childIndex] }}</view>
-											<rich-text class="textChild" :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text class="textChild" :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childIndex) in ansItem.optionsList" :key="childIndex" class="lisSty">
 											<text :class="{right:(option.optionsId == bank.ques[ansIndex]) || (option.optionsId == bank.ans[ansIndex]),wrong:(option.optionsId == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childIndex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -202,7 +213,9 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty" @click="checkboxSelectChild(bankIndex,ansIndex,childindex)">
 											<view :class="{checked:option.checked}" class="activeTI">{{ ast[childindex] }}</view>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
 										</view>
 									</view>
 									<view v-if="!bank.ques[ansIndex]" class="submit_checkbox" :class="{disabled:!isCheckboxChecked(ansItem.optionsList)}" @click="checkboxSubmitChild(bankIndex,ansIndex)">
@@ -211,7 +224,10 @@
 									<view v-if="bank.ques && bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in ansItem.optionsList" :key="childindex" class="lisSty">
 											<text :class="{right:right(bankIndex,ansIndex,option),wrong:wrong(bankIndex,ansIndex,option)}"  class="activeTI">{{ ast[childindex] }}</text>
-											<rich-text :nodes="option.content"></rich-text>
+											<view class="flex_auto">
+												<rich-text :nodes="option.content"></rich-text>
+											</view>
+											
 										</view>
 									</view> 
 								</view>
@@ -241,13 +257,18 @@
 									<view v-if="!bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty" @click="judgeSelectChild(ansIndex,childindex,bankIndex)">
 											<view class="activeTI">{{ ast[childindex] }}</view>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
+											
 										</view>
 									</view>
 									<view v-if="bank.ques[ansIndex]">
 										<view v-for="(option, childindex) in judge" :key="childindex" class="lisSty">
 											<text :class="{right:(childindex == bank.ques[ansIndex]) || (childindex == bank.ans[ansIndex]),wrong:(childindex == bank.ques[ansIndex]) && (bank.ques[ansIndex] != bank.ans[ansIndex])}"  class="activeTI">{{ ast[childindex] }}</text>
-											{{ option }}
+											<view class="flex_auto">
+												{{ option }}
+											</view>
 										</view>
 									</view> 
 								</view>
@@ -409,13 +430,16 @@ export default {
 							if(this.explain) {
 								item.ques = item.ans;
 							}
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							return;
 						} else if(item.type == 5) {
 							item.ansText = {
 								text: '',
 								imageList: []
 							}
-							
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = {
 									text:item.analysisContent
@@ -433,6 +457,7 @@ export default {
 							item.jsonStr.forEach((json,index) => {
 								if(json.type == 1) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 2) {
 									json.optionsList.forEach(str => {
 										str.optionsId = ''+str.optionsId;
@@ -442,8 +467,10 @@ export default {
 										arr[i] = ''+a;
 									})
 									ansArr[index] = arr
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 3) {
 									ansArr[index] = json.answerQuestion;
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								} else if(json.type == 5) {
 									ansArr[index] = {
 										text: '',
@@ -453,10 +480,13 @@ export default {
 										text: '',
 										imageList: []
 									}
+									json.content && (json.content = json.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 								}
 							})
 							
 							item.ans = ansArr
+							item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+							item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 							if(this.explain) {
 								item.ques = item.ans;
 							}
@@ -464,6 +494,8 @@ export default {
 							
 						}
 						
+						item.analysisContent && (item.analysisContent = item.analysisContent.replace(/<img/gi, '<img style="max-width:100%;"'));
+						item.content && (item.content = item.content.replace(/<img/gi, '<img style="max-width:100%;"'));
 						item.ans = item.answerQuestion
 						if(this.explain) {
 							item.ques = item.ans;
@@ -828,8 +860,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.every((item,i) => {
-						return item == this.questionList[index].ans[i];
+					return this.questionList[index].ans.every((item,i) => {
+						return item == this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -879,8 +911,8 @@ export default {
 				//多选
 				} else if(item.type == 2) {
 					//每一项都相等
-					return this.questionList[index].ques.some((item,index) => {
-						return item != this.questionList[index].ans;
+					return this.questionList[index].ans.some((item,i) => {
+						return item != this.questionList[index].ques[i];
 					})
 				//判断
 				} else if(item.type == 3) {
@@ -925,6 +957,8 @@ export default {
 .lisSty {
 	margin-bottom: 16rpx;
 	display: flex;
+	align-items: center;
+	
 	.flex_auto {
 		flex:1;
 	}
@@ -945,12 +979,12 @@ export default {
 	
 	&.right {
 		color:#fff;
-		background:green;
+		background:#36C75A;
 	}
 	
 	&.wrong {
 		color:#fff;
-		background:red;
+		background:#FF3B30;
 	}
 	
 	&.checked {
@@ -960,7 +994,11 @@ export default {
 }
 
 .submit_checkbox {
-	margin:20rpx auto;
+	position:fixed;
+	left:0;
+	right:0;
+	bottom:120rpx;
+	margin: 20rpx auto;
 	width: 526rpx;
 	height: 80rpx;
 	background: rgba(0, 122, 255, 1);
@@ -1068,7 +1106,7 @@ export default {
 					text-align: center;
 					line-height: 30rpx;
 					color:#fff;
-					background:red;
+					background:#FF3B30;
 					border-radius:50%;
 				}
 				
@@ -1257,13 +1295,13 @@ export default {
 	&.isRight {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: green;
+		background: #36C75A;
 	}
 	
 	&.isWrong {
 		border:1rpx solid #EEEEEE;
 		color:#fff;
-		background: red;
+		background: #FF3B30;
 	}
 }
 .answerInfos {

+ 436 - 268
pages2/verify/input.vue

@@ -1,273 +1,297 @@
 <template>
 	<view style="padding: 30rpx;">
-		<view class="topBox">
-			<view>
-				<u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
-				<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text>
-			</view>
-			<view style="color: #007AFF;" @click="backPage">稍后再填</view>
-		</view>
-		<u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close">
-			<u-collapse-item title="审核结果反馈">
-				<view style="padding-bottom: 30rpx;">
-					<text class="collapse-item">{{ remark }}</text>
+		
+		<view v-show="!agreementModal">
+			<view class="topBox">
+				<view>
+					<u-icon name="error-circle-fill" color="#FF3B30" size="28"></u-icon>
+					<text style="color: #FF3B30;margin-left: 10rpx;">学习前请提交完整审核资料</text>
 				</view>
-			</u-collapse-item>
-		</u-collapse>
-		<view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
-			<u-form :model="form" ref="uForm">
-				<template v-for="(item, index) in listData">
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'name'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.name" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'idcard'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.idcard" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'telphone'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.telphone" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'school'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.school" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'work_unit'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.work_unit" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'unit_contact'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.unit_contact" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'unit_tel'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.unit_tel" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'apply_post'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.apply_post" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.fieldKey == 'major'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<u-input v-model="form.major" :placeholder="`请输入${item.fieldName}`" />
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.inputType == 2"
-						:label="item.fieldName"
-						:label-width="auto"
-						:required="item.required"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<picker @change="bindPickerChange(item.fieldKey, $event)" :value="form[item.fieldKey]" :range="getarrays(item.fieldKey)">
-							<view class="picker">
-								{{ returnName(item.fieldKey) }}
-								<image
-									src="@/static/icon/clears.png"
-									v-if="clearWatch(item.fieldKey)"
-									@click.stop="clearFun(item.fieldKey)"
-									mode=""
-									style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"
-								></image>
-							</view>
-						</picker>
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.inputType == 5"
-						:label="item.fieldName"
-						:label-width="auto"
-						:required="item.required"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<picker mode="date" :value="form[item.fieldKey]" @change="bindDateChange(item.fieldKey, $event)">
-							<view class="picker">
-								{{ getTimes(item.fieldKey) }}
-								<image
-									src="@/static/icon/clears.png"
-									v-if="clearWatch(item.fieldKey)"
-									@click.stop="clearFun(item.fieldKey)"
-									mode=""
-									style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"
-								></image>
-							</view>
-						</picker>
-					</u-form-item>
-					<u-form-item
-						:key="index"
-						v-if="item.inputType == 3 && item.fieldKey !== 'commitment_electr_signature'"
-						:label="item.fieldName"
-						:required="item.required"
-						:label-width="auto"
-						label-position="top"
-						:prop="item.required ? item.fieldKey : ''"
-					>
-						<text v-if="item.fieldKey === 'recent_photos'" style="color: #999999;position: absolute;top: 20rpx;left: 130rpx;">竖向证件照 文件大小≤2M</text>
-						<text
-							v-if="item.fieldKey === 'idcard_face_photo' || item.fieldKey === 'idcard_national_photo'"
-							style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;"
+				<view style="color: #007AFF;" @click="backPage">稍后再填</view>
+			</view>
+			<u-collapse v-if="remarkStatus" :item-style="itemStyle" event-type="close">
+				<u-collapse-item title="审核结果反馈">
+					<view style="padding-bottom: 30rpx;">
+						<text class="collapse-item">{{ remark }}</text>
+					</view>
+				</u-collapse-item>
+			</u-collapse>
+			<view class="bodyBox" style="margin-top: 30rpx;padding:0 20rpx;">
+				<u-form :model="form" ref="uForm" :error-type="errorType">
+					<template v-for="(item,index) in listData" >
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'name'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
 						>
-							文件大小≤2M
-						</text>
-						<u-upload
-							:show-progress="false"
-							:max-size="2097152"
-							@on-list-change="
-								item.fieldKey === 'recent_photos'
-									? changePhotoListHeader1($event)
-									: item.fieldKey === 'idcard_face_photo'
-									? changePhotoListHeader2($event)
-									: item.fieldKey === 'idcard_national_photo'
-									? changePhotoListHeader3($event)
-									: ''
-							"
-							:auto-upload="false"
-							custom-btn="true"
-							:action="action"
-							:file-list="
-								item.fieldKey === 'recent_photos'
-									? fileList1
-									: item.fieldKey === 'idcard_face_photo'
-									? fileList2
-									: item.fieldKey === 'idcard_national_photo'
-									? fileList3
-									: ''
-							"
-							width="120"
-							height="120"
-							size-type="['compressed']"
-							max-count="1"
+							<u-input v-model="form.name" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'idcard'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
 						>
-							<template v-slot:addBtn>
-								<image
-									:src="
-										item.fieldKey === 'recent_photos'
-											? '/static/info_1.png'
-											: item.fieldKey === 'idcard_face_photo'
-											? '/static/info_2.png'
-											: item.fieldKey === 'idcard_national_photo'
-											? '/static/info_3.png'
-											: ''
-									"
-									:style="
-										item.fieldKey === 'recent_photos'
-											? 'width: 120rpx; height: 169rpx;'
-											: item.fieldKey === 'idcard_face_photo'
-											? 'width: 120rpx; height: 82rpx;'
-											: item.fieldKey === 'idcard_national_photo'
-											? 'width: 120rpx; height: 82rpx;'
-											: ''
-									"
-								></image>
-							</template>
-						</u-upload>
-					</u-form-item>
-					<view :key="index" v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'">
+							<u-input v-model="form.idcard" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
 						<u-form-item
-							v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
-							label="承诺书"
+							:key="index"
+							v-if="item.fieldKey == 'telphone'"
+							:label="item.fieldName"
 							:required="item.required"
 							:label-width="auto"
-							label-position="top"
+							:prop="item.required ? item.fieldKey : ''"
 						>
-							<view style="line-height: 40rpx;text-indent:2em">
-								<text>
-									本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
-									全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
-								</text>
-								<view style="line-height: 40rpx;text-indent:2em"><text>特此承诺!</text></view>
-							</view>
+							<u-input v-model="form.telphone" :placeholder="`请输入${item.fieldName}`" />
 						</u-form-item>
 						<u-form-item
-							v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
-							label="签名板"
+							:key="index"
+							v-if="item.fieldKey == 'school'"
+							:label="item.fieldName"
 							:required="item.required"
 							:label-width="auto"
-							label-position="top"
 							:prop="item.required ? item.fieldKey : ''"
 						>
-							<view class="dis_stys">
-								<text style="color: #999999;">请在下方签名区进行签名</text>
-								<text @click="retDraw" mode="">清空</text>
-							</view>
-							<view class="handCenter">
-								<canvas
-									v-if="!form[item.fieldKey]"
-									class="handWriting"
-									disable-scroll="true"
-									@touchstart="uploadScaleStart"
-									@touchmove="uploadScaleMove"
-									@touchend="uploadScaleEnd"
-									@tap="mouseDown"
-									canvas-id="handWriting"
-								></canvas>
-								<view v-else style="width:100%;height: 100%;position: relative;">
-									<view class="ctoples">图片</view>
-									<image style="width:100%;height:100%;" :src="$method.splitImgHost(form[item.fieldKey])" mode=""></image>
+							<u-input v-model="form.school" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'work_unit'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<u-input v-model="form.work_unit" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'unit_contact'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<u-input v-model="form.unit_contact" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'unit_tel'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<u-input v-model="form.unit_tel" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'apply_post'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<u-input v-model="form.apply_post" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.fieldKey == 'major'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<u-input v-model="form.major" :placeholder="`请输入${item.fieldName}`" />
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.inputType == 2"
+							:label="item.fieldName"
+							:label-width="auto"
+							:required="item.required"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<picker @change="bindPickerChange(item.fieldKey, $event)" :value="form[item.fieldKey]" :range="getarrays(item.fieldKey)">
+								<view class="picker">
+									{{ returnName(item.fieldKey) }}
+									<image
+										src="@/static/icon/clears.png"
+										v-if="clearWatch(item.fieldKey)"
+										@click.stop="clearFun(item.fieldKey)"
+										mode=""
+										style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"
+									></image>
 								</view>
-							</view>
+							</picker>
 						</u-form-item>
-					</view>
-				</template>
-			</u-form>
+						<u-form-item
+							:key="index"
+							v-if="item.inputType == 5"
+							:label="item.fieldName"
+							:label-width="auto"
+							:required="item.required"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<picker mode="date" :value="form[item.fieldKey]" @change="bindDateChange(item.fieldKey, $event)">
+								<view class="picker">
+									{{ getTimes(item.fieldKey) }}
+									<image
+										src="@/static/icon/clears.png"
+										v-if="clearWatch(item.fieldKey)"
+										@click.stop="clearFun(item.fieldKey)"
+										mode=""
+										style="width:30rpx;height:30rpx;vertical-align: middle;margin-left:10rpx;"
+									></image>
+								</view>
+							</picker>
+						</u-form-item>
+						<u-form-item
+							:key="index"
+							v-if="item.inputType == 3 && item.fieldKey !== 'commitment_electr_signature'"
+							:label="item.fieldName"
+							:required="item.required"
+							:label-width="auto"
+							label-position="top"
+							:prop="item.required ? item.fieldKey : ''"
+						>
+							<text v-if="item.fieldKey === 'recent_photos'" style="color: #999999;position: absolute;top: 20rpx;left: 130rpx;">竖向证件照 文件大小≤2M</text>
+							<text
+								v-if="item.fieldKey === 'idcard_face_photo' || item.fieldKey === 'idcard_national_photo'"
+								style="color: #999999;position: absolute;top: 20rpx;left: 180rpx;"
+							>
+								文件大小≤2M
+							</text>
+							<u-upload
+								:show-progress="false"
+								:max-size="2097152"
+								@on-list-change="
+									item.fieldKey === 'recent_photos'
+										? changePhotoListHeader1($event)
+										: item.fieldKey === 'idcard_face_photo'
+										? changePhotoListHeader2($event)
+										: item.fieldKey === 'idcard_national_photo'
+										? changePhotoListHeader3($event)
+										: ''
+								"
+								:auto-upload="false"
+								custom-btn="true"
+								:action="action"
+								:file-list="
+									item.fieldKey === 'recent_photos'
+										? fileList1
+										: item.fieldKey === 'idcard_face_photo'
+										? fileList2
+										: item.fieldKey === 'idcard_national_photo'
+										? fileList3
+										: ''
+								"
+								width="120"
+								height="120"
+								size-type="['compressed']"
+								max-count="1"
+							>
+								<template v-slot:addBtn>
+									<image
+										:src="
+											item.fieldKey === 'recent_photos'
+												? '/static/info_1.png'
+												: item.fieldKey === 'idcard_face_photo'
+												? '/static/info_2.png'
+												: item.fieldKey === 'idcard_national_photo'
+												? '/static/info_3.png'
+												: ''
+										"
+										:style="
+											item.fieldKey === 'recent_photos'
+												? 'width: 120rpx; height: 169rpx;'
+												: item.fieldKey === 'idcard_face_photo'
+												? 'width: 120rpx; height: 82rpx;'
+												: item.fieldKey === 'idcard_national_photo'
+												? 'width: 120rpx; height: 82rpx;'
+												: ''
+										"
+									></image>
+								</template>
+							</u-upload>
+						</u-form-item>
+						<view :key="index" v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'">
+							<u-form-item
+								v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
+								label="承诺书"
+								:required="item.required"
+								:label-width="auto"
+								label-position="top"
+							>
+								<view style="line-height: 40rpx;text-indent:2em">
+									<text>
+										本人自愿做出如下承诺:本人己仔细阅读《广东省住房和城乡建设厅关于推进住房和城乡建设领域施工现场专业人员职业培训工作的通知》
+										全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。
+									</text>
+									<view style="line-height: 40rpx;text-indent:2em"><text>特此承诺!</text></view>
+								</view>
+							</u-form-item>
+							<u-form-item
+								v-if="item.inputType == 3 && item.fieldKey === 'commitment_electr_signature'"
+								label="签名板"
+								:required="item.required"
+								:label-width="auto"
+								label-position="top"
+								:prop="item.required ? item.fieldKey : ''"
+							>
+								<view class="dis_stys">
+									<text style="color: #999999;">请在下方签名区进行签名</text>
+									<text @click="retDraw" mode="">清空</text>
+								</view>
+								<view class="handCenter">
+									<canvas
+										v-if="!form[item.fieldKey]"
+										class="handWriting"
+										disable-scroll="true"
+										:catchtouchmove="true"
+										@touchstart="uploadScaleStart"
+										@touchmove="uploadScaleMove"
+										@touchend="uploadScaleEnd"
+										canvas-id="handWriting"
+									></canvas>
+									<view v-else style="width:100%;height: 100%;position: relative;">
+										<view class="ctoples">图片</view>
+										<image style="width:100%;height:100%;" :src="$method.splitImgHost(form[item.fieldKey])" mode=""></image>
+									</view>
+								</view>
+							</u-form-item>
+						</view>
+					</template>
+				</u-form>
+			</view>
+			<view @click="submits" class="submit_btn">提交资料</view>
 		</view>
-		<view @click="submits" class="submit_btn">提交资料</view>
+		
+		
+		<u-popup class="modal" catchtouchmove='return' v-model="agreementModal" mode="center" border-radius="24" :mask-close-able="false">
+			<view class="agreement">
+				<view class="body">
+					<scroll-view scroll-y="true" style="height:600rpx;">
+						<view class="content">
+							<view>本产品(或服务)提供【{{goodsData.goodsName}}】课程的在线学习功能,为使用这些功能,我们需要使用您设备上的摄像头,并收集以下个人信息:
+								<text v-for="(item,listIndex) in listData" :key="listIndex">{{item.fieldName}}、</text>
+								<!-- 姓名、性别、身份证号码、移动电话号码、身份证照片、一寸照、证书名称/岗位、证书编号、有效期、人脸照片(每节课随机拍摄三张)、 -->
+							学习详细记录。</view>
+							<view>我们会将上述信息提供至广东省建设执业注册管理中心等第三方组织使用,用于继续教育备案等。如果您拒绝,将导致这些功能无法实现,但不影响您使用本产品(或服务)的其他业务功能。</view>
+						</view>
+					</scroll-view>
+				</view>
+				<view class="footer">
+					<view class="btn cancel" @click="refuseAgreement">取消</view>
+					<view class="btn ok" @click="agree">同意并继续</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -278,12 +302,16 @@ import Handwriting from '@/common/signature.js';
 export default {
 	data() {
 		return {
+			errorType: ['message'],
+			agreementModal:true,
+			goodsData:{},
 			itemStyle: {
 				marginTop: '20px',
 				backgroundColor: '#fff',
 				borderRadius: '24rpx',
 				padding: '0rpx 20rpx'
 			},
+			isUploading:false,
 			form: {
 				name: '',
 				sex: '',
@@ -476,8 +504,9 @@ export default {
 	created() {
 		this.$store.getters.dictObj;
 	},
-	onLoad(option) {
+	async onLoad(option) {
 		this.goodsId = Number(option.id);
+		await this.getGoodsDetail()
 		this.getInfo();
 	},
 	onReady(res) {
@@ -488,8 +517,44 @@ export default {
 		});
 		this.$refs.uForm.setRules(this.rules);
 	},
-	computed: { ...mapGetters(['dictObj']) },
+	computed: { ...mapGetters(['dictObj','userInfo']) },
+	watch:{
+		userInfo(val, oldVal){//普通的watch监听
+		     if(val){
+				 
+				 this.listData.forEach(item => {
+				 	if(item.fieldKey == "idcard") {
+				 		this.form.idcard = this.userInfo.idCard;
+				 	}
+				 	if(item.fieldKey == "telphone") {
+				 		this.form.telphone = this.userInfo.telphone;
+				 	}
+					
+					if(item.fieldKey == "name") {
+						this.form.name = this.userInfo.realname
+					}
+				 })
+			}
+		 },
+	},
 	methods: {
+		getGoodsDetail() {
+			return new Promise(resolve => {
+				
+				this.$api.goodsDetail(this.goodsId).then(res => {
+					this.goodsData = res.data.data;
+					resolve()
+				})
+			})
+		},
+		agree() {
+			this.agreementModal = false;
+		},
+		refuseAgreement() {
+			uni.navigateBack({
+				delta:1
+			})
+		},
 		clearFun(key) {
 			this.form[key] = '';
 		},
@@ -547,7 +612,12 @@ export default {
 					goodsId: this.goodsId,
 					keyValue: JSON.stringify(arsty)
 				};
+				if(this.isUploading) {
+					return;
+				}
+				this.isUploading = true;
 				this.$api.editbaseprofiletp(datas).then(res => {
+					this.isUploading = false;
 					if (res.data.code === 200) {
 						this.$method.showToast('提交成功');
 						uni.navigateBack();
@@ -574,7 +644,12 @@ export default {
 					profileTpId: this.goodsId,
 					keyValue: JSON.stringify(objs)
 				};
+				if(this.isUploading) {
+					return;
+				}
+				this.isUploading = true;
 				this.$api.addbaseprofiletp(datas).then(res => {
+					this.isUploading = false;
 					if (res.data.code === 200) {
 						this.$method.showToast('提交成功');
 						uni.navigateBack();
@@ -617,15 +692,24 @@ export default {
 				if (this.isRequired) {
 					this.submitApi();
 				} else {
-					this.$refs.uForm.validate(valid => {
-						if (valid) {
-							if (int === 1) {
-								this.submitApi();
+					if(int === 1) {
+						this.errorType = ['toast'];
+					} else {
+						this.errorType = ['message'];
+					}
+					this.$nextTick(() => {
+						this.$refs.uForm.validate(valid => {
+							if (valid) {
+								if (int === 1) {
+									this.submitApi();
+								}
+							} else {
+								this.errorType = ['message'];
+								console.log('验证失败');
 							}
-						} else {
-							console.log('验证失败');
-						}
-					});
+						});
+					})
+					
 				}
 			}
 		},
@@ -640,10 +724,9 @@ export default {
 			this.resultForm(1);
 		},
 		async changePhotoListHeader1(lists, name) {
-			console.log(lists[0].url);
 			if (lists.length) {
 				this.fileList1 = lists;
-				if (lists[0].url.indexOf('//tmp') !== -1) {
+				if (lists[0].url.indexOf('//tmp') !== -1 || lists[0].url.indexOf('//temp') !== -1) {
 					this.$set(this.form, 'recent_photos', await this.$method.imageInfos(lists[0].url));
 				}
 			} else {
@@ -659,7 +742,8 @@ export default {
 		async changePhotoListHeader2(lists, name) {
 			if (lists.length) {
 				this.fileList2 = lists;
-				if (lists[0].url.indexOf('//tmp') !== -1) {
+				console.log(lists,'lists')
+				if (lists[0].url.indexOf('//tmp') !== -1 || lists[0].url.indexOf('//temp') !== -1) {
 					this.$set(this.form, 'idcard_face_photo', await this.$method.imageInfos(lists[0].url));
 				}
 			} else {
@@ -673,7 +757,7 @@ export default {
 		async changePhotoListHeader3(lists, name) {
 			if (lists.length) {
 				this.fileList3 = lists;
-				if (lists[0].url.indexOf('//tmp') !== -1) {
+				if (lists[0].url.indexOf('//tmp') !== -1 || lists[0].url.indexOf('//temp') !== -1) {
 					this.$set(this.form, 'idcard_national_photo', await this.$method.imageInfos(lists[0].url));
 				}
 			} else {
@@ -732,9 +816,26 @@ export default {
 			var self = this;
 			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
 				self.listData = JSON.parse(res.data.data.keyValue);
+				
+				
+				self.listData.forEach(item => {
+					if(item.fieldKey == "idcard") {
+						this.form.idcard = this.userInfo.idCard;
+					}
+					if(item.fieldKey == "telphone") {
+						this.form.telphone = this.userInfo.telphone;
+					}
+					
+					if(item.fieldKey == "name") {
+						this.form.name = this.userInfo.realname
+					}
+				})
 				self.isRequired = self.listData.every(ims => {
 					return ims.required === false;
 				});
+				this.$nextTick(() => {
+					this.agreementModal = true;
+				})
 				self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
 					if (result.data.code === 200) {
 						if (!result.data.data) {
@@ -881,6 +982,7 @@ export default {
 				self.handwriting
 					.saveCanvas()
 					.then(res => {
+						console.log(res,'res')
 						if (this.handwriting.linePrack.length) {
 							this.$set(this.form, 'commitment_electr_signature', res);
 						}
@@ -902,7 +1004,7 @@ page {
 	background: #eaeef1;
 }
 </style>
-<style scope>
+<style scope lang="scss">
 .ctoples {
 	position: absolute;
 	top: 0;
@@ -919,7 +1021,7 @@ page {
 	height: 100%;
 }
 /deep/ .u-collapse-title {
-	color: red;
+	color: #FF3B30;
 	font-size: 24rpx;
 }
 .collapse-item {
@@ -995,4 +1097,70 @@ input {
 	padding: 0 20rpx;
 	font-size: 24rpx;
 }
+
+.modal {
+	.agreement {
+		width: 640rpx;
+		height: 740rpx;
+		background: #FFFFFF;
+		display: flex;
+		flex-direction: column;
+		
+		.body {
+			flex:1;
+			
+			.content {
+				padding:30rpx 40rpx 28rpx;
+				line-height: 40rpx;
+				font-size: 26rpx;
+				color:#666;
+				
+				.bold {
+					color:#333;
+					font-size: 26rpx;
+					font-weight: bold;
+				}
+				
+				.center {
+					text-align: center;
+				}
+			}
+		}
+		
+		.footer {
+			height:140rpx;
+			border-top:1px solid #EEEEEE;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			
+			.btn {
+				margin:0 12rpx;
+				width: 200rpx;
+				height: 80rpx;
+				color:#007AFF;
+				font-size: 30rpx;
+				text-align: center;
+				line-height: 80rpx;
+				background: #F5F5F5;
+				border-radius: 40rpx 40rpx 40rpx 40rpx;
+				
+				&.ok {
+					width: 336rpx;
+					height: 80rpx;
+					background: #007AFF;
+					color:#fff;
+				}
+				
+				&.close {
+					color:#fff;
+					width: 560rpx;
+					height: 80rpx;
+					background: #007AFF;
+					border-radius: 40rpx 40rpx 40rpx 40rpx;
+				}
+			}
+		}
+	}
+}
 </style>

+ 13 - 2
pages2/verify/input2.vue

@@ -26,7 +26,7 @@
 						:prop="item.required ? item.fieldKey : ''"
 						label-position="top"
 					>
-						<text style="color: blue;position: absolute;top: 20rpx;left: 180rpx;text-decoration: underline;" @click="downDocx(item.url)">点击下载</text>
+						<text style="color: #007AFF;position: absolute;top: 20rpx;left: 180rpx;text-decoration: underline;" @click="downDocx(item.url)">点击下载</text>
 						<view class="dis_stys"><text style="color: #999999;">下载承诺书进行填写并签名盖章后上传(≤2M)</text></view>
 						<image v-if="!form[item.fieldKey]" style="width: 169rpx; height: 169rpx;" @click="getChast" src="@/static/info_4.png"></image>
 						<view class="quzw" v-if="form[item.fieldKey]">
@@ -59,6 +59,7 @@ export default {
 				// 	text: '上传文件'
 				// }
 			],
+			isUploading:false,
 			itemStyle: {
 				marginTop: '20px',
 				backgroundColor: '#fff',
@@ -231,14 +232,24 @@ export default {
 			};
 			if (self.remarkStatus) {
 				datas.id = self.id;
+				if(this.isUploading) {
+					return;
+				}
+				this.isUploading = true;
 				self.$api.editbaseprofileStamp(datas).then(res => {
+					this.isUploading = false;
 					if (res.data.code === 200) {
 						self.$method.showToast('提交成功');
 						uni.navigateBack();
 					}
 				});
 			} else {
+				if(this.isUploading) {
+					return;
+				}
+				this.isUploading = true;
 				self.$api.addbaseprofileStamp(datas).then(res => {
+					this.isUploading = false;
 					if (res.data.code === 200) {
 						self.$method.showToast('提交成功');
 						uni.navigateBack();
@@ -324,7 +335,7 @@ page {
 </style>
 <style scope>
 /deep/ .u-collapse-title {
-	color: red;
+	color: #FF3B30;
 	font-size: 24rpx;
 }
 .collapse-item {

+ 293 - 45
pages2/wd/class.vue

@@ -2,8 +2,7 @@
 	<view style="padding: 30rpx;">
 		<view class="class" v-for="(item, index) in goodsList" :key="index">
 			
-				<view class="class_item" @click.stop="studyIn(item.goodsId,item.gradeId,item)">
-					<!-- <navigator  hover-class="none" :url="`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}`"> -->
+				<view class="class_item" @click.stop="studyIn(item.goodsId,item.gradeId,item,index)">
 						<image :src="$method.splitImgHost(item.coverUrl, true)" class="class_img"></image>
 						<view class="class_text">
 							<view class="class_title">{{ item.goodsName }}</view>
@@ -11,7 +10,7 @@
 								<image src="/static/icon/wk_icon1.png" class="wk_icon"></image>
 								<text class="content">{{ item.courseNum }}</text>
-								
+								课程
 								<text class="content">{{ item.secAllNum }}</text>
 								<text class="content">{{ item.classHours }}</text>
@@ -20,46 +19,165 @@
 							<view class="content_box">
 								<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
 								学习有效期:
-								<text class="content">{{ $method.timestampToTime(item.validityStartTime) }} - {{ $method.timestampToTime(item.validityEndTime) }}</text>
+								<text class="content">{{ $method.timestampToTime(item.studyStartTime) }} - {{ $method.timestampToTime(item.studyEndTime) }}</text>
 							</view>
 						</view>
-					<!-- </navigator> -->
-					<!-- <view class="class-warm">
-						<u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill"></u-icon>
-						<view class="class-warm__text">
-							<view class="date">班级有效期:2021/11/30 - 2021/11/30</view>
-							<view class="state">班级状态:已过期,有疑问请联系 <text @click="call">020-87085982</text></view>
-						</view>
-					</view> -->
-					
+						
+						<!-- 不在学习有效期 -->
+						<template v-if="sysTime < item.studyStartTime || sysTime > item.studyEndTime">
+							<view class="class-warm" v-if="item.gradeId != 0 && item.gradeStatus == 1">
+								<view class="class-warm__text">
+									<view class="date">
+										不在学习有效期,不可以学习了哦
+									</view>
+								</view>
+							</view>
+						</template>
+						
+						<template v-else>
+							<!-- 班级有效期过了 -->
+							<template v-if="item.classEndTime && (item.classEndTime < sysTime) ">
+								<view class="class-warm">
+									<u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill"></u-icon>
+									<view class="class-warm__text">
+										<view class="date">班级有效期:{{$method.timestampToTime(item.classStartTime)}} - {{$method.timestampToTime(item.classEndTime)}}</view>
+										<view class="state">班级状态:已过期,有疑问请联系 <text @click="call">020-87085982</text></view>
+									</view>
+								</view>
+							</template>
+							
+							<!-- 班级有效期之前 -->
+							<template v-else-if="item.classStartTime && (item.classStartTime > sysTime) ">
+								<view class="class-warm">
+									<u-icon class="class-warm__icon" size="30" color="#FF3B30" name="error-circle-fill"></u-icon>
+									<view class="class-warm__text">
+										<view class="date">班级有效期:{{$method.timestampToTime(item.classStartTime)}} - {{$method.timestampToTime(item.classEndTime)}}</view>
+										<view class="state">班级状态:未到学习时间,有疑问请联系 <text @click="call">020-87085982</text></view>
+									</view>
+								</view>
+							</template>
+							
+							<!-- 在班级有效期之间或者没有班级有效期 -->
+							<template v-else>
+								
+								<!-- 学时审核状态不可审核 -->
+								<template v-if="item.periodStatus == -1">
+									<view class="class-warm" v-if="item.gradeId != 0 && item.gradeStatus == 1 && item.classStatus != null">
+										<view class="class-warm__text">
+											<view class="date">
+												班级状态:
+												<text v-if="item.classStatus == 1">已开班</text>
+												<text v-if="item.classStatus == 0">未开班</text>
+											</view>
+											<view class="state" v-if="item.classStatus == 0">教务处正在为您开通班级,请耐心等待</view>
+										</view>
+									</view>
+									
+									<view class="class-warm">
+										<view class="class-warm__text">
+											<view class="date">
+												<template v-if="sysTime >= item.studyStartTime && sysTime <= item.studyEndTime">
+													学习状态:
+													<text v-if="item.stuAllNum == 0">未学习</text>
+													<text v-else-if="item.stuAllNum > 0 && item.stuAllNum < item.secAllNum">学习中</text>
+													<text v-else-if="item.stuAllNum >= item.secAllNum">已学完</text>
+												</template>
+												<template v-else>
+													已过学习有效期,不可以学习了哦!
+												</template>
+											</view>
+										</view>
+									</view>
+									
+									<view class="class-warm" v-if="item.profileTpStatus == 1">
+										<view class="class-warm__text">
+											<view class="date">
+												资料审核状态:
+												<text v-if="item.profileStatus == null">未提交资料</text>
+												<text v-else-if="item.profileStatus == 1">已通过</text>
+												<text v-else-if="item.profileStatus == 2">审核中</text>
+												<text v-else-if="item.profileStatus == 3">待完善</text>
+											</view>
+										</view>
+									</view>
+								</template>
+								
+								<!-- 学时审核状态可以审核 -->
+								<template v-if="item.periodStatus != -1">
+									<view class="class-warm">
+										<view class="class-warm__text">
+											<view class="date">
+												<text v-if="item.periodStatus == 0">机构审核:学时审核不通过</text>
+												<text v-else-if="item.periodStatus == 1">机构审核:学时审核通过</text>
+												<text v-else-if="item.periodStatus == 2">学时待审核</text>
+											</view>
+										</view>
+									</view>
+									
+									<view class="class-warm" v-if="item.applyStatus == 1 && item.periodStatus == 1">
+										<view class="class-warm__text">
+											<view class="date">
+												<view v-if="item.subExamStatus === null">待预约考试</view>
+												<view v-else-if="item.subExamStatus === 0 &&  sysTime < item.subApplySiteStartTime">
+													待考试,考试时间:{{$method.timestampToTime(item.subApplySiteStartTime)}} - {{$method.timestampToTime(item.subaApplySiteEndTime)}}
+												</view>
+												<view v-else-if="item.subExamStatus === 0">待出考试结果</view>
+												<view v-else-if="item.subExamStatus === 1">
+													<text v-if="item.subResult === null">待出考试结果</text>
+													<text v-if="item.subResult === 0">考试结果:不通过,需补考</text>
+													<text v-else-if="item.subResult === 1">考试结果:通过,考试成绩为{{item.subPerformance}}</text>
+												</view>
+												<view v-else-if="item.subExamStatus === 2">缺考,无成绩,需补考</view>
+												<view v-else-if="item.subExamStatus === 3">作弊,无成绩,需补考</view>
+												<view v-else-if="item.subExamStatus === 4">替考,无成绩,需补考</view>
+												
+												
+											</view>
+										</view>
+									</view>
+								</template>
+								
+							</template>
+							
+							
+						</template>
+						
+						
 				</view>
 			
 			
 			<view class="bottomBox">
-				<view class="content_box">
-					<image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
-					学习进度:{{ item.stuAllNum }}/{{ item.secAllNum }}
-				</view>
-				<view class="box_progress">
-					<view style="width: 60%;"><u-line-progress :showText="false" height="22" active-color="#ff9900" :show-percent="false" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
-					
-					<view><u-button :class="{disabled:sysTime <= item.validityStartTime || sysTime >= item.validityEndTime}" type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId,item)">进入学习</u-button></view>
-				</view>
-				<view class="box_progress" v-if="item.applyStatus === 1">
-					<view style="width: 60%;">
-						<text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">{{ item.applyName }}</text>
+				<template v-if="item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > sysTime) && (item.studyStartTime < sysTime) &&  (item.classEndTime && (item.classEndTime < sysTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0">
+					<view class="restart" @click.stop="selectClass(item,index)">
+						选班重学
 					</view>
-					<view><u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item)">预约考试</u-button></view>
-				</view>
-				<view class="box_progress" v-if="item.beforeStatus === 1">
-					<view style="width: 60%;">
-						<text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">{{ item.beforeName }}</text>
+				</template>
+				
+				<template v-else>
+					<view class="content_box">
+						<image src="/static/icon/wk_icon3.png" class="wk_icon"></image>
+						学习进度:{{ item.stuAllNum }}/{{ item.secAllNum }}
 					</view>
-					<view><u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId)">进入刷题</u-button></view>
-				</view>
-				<!-- <view class="restart" @click="selectClass(item)">
-					选班重学
-				</view> -->
+					<view class="box_progress">
+						<view style="width: 60%;"><u-line-progress :showText="false" height="22" active-color="#ff9900" :show-percent="false" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
+						
+						<view><u-button :class="{disabled:sysTime <= item.studyStartTime || sysTime >= item.studyEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart)}" type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId,item,index)">进入学习</u-button></view>
+					</view>
+					<view class="box_progress" v-if="item.applyStatus === 1">
+						<view style="width: 60%;">
+							<text style="color: #333333;white-space: nowrap;text-overflow: ellipsis;">{{ item.applyName }}</text>
+						</view>
+						<view><u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item)">预约考试</u-button></view>
+					</view>
+					<view class="box_progress" v-if="item.beforeStatus === 1">
+						<view style="width: 60%;">
+							<text style="color: #2979ff;white-space: nowrap;text-overflow: ellipsis;">{{ item.beforeName }}</text>
+						</view>
+						<view><u-button type="primary" size="mini" @click="appBeforeAddress(item.goodsId)">进入刷题</u-button></view>
+					</view>
+				</template>
+				
+				
 			</view>
 		</view>
 			
@@ -84,6 +202,7 @@
 											<u-radio
 												shape="circle"
 												:name="index"
+												:disabled="item.studentNum > 0 && item.studentNum == item.studentUpper"
 											>
 												<view :class="item.checked?'white-box blue-box':'white-box'" >
 													<view>
@@ -125,13 +244,17 @@ export default {
 			},
 			total: 0,
 			sysTime:0,
+			itemIndex:'',
+			selectItem:{}
 		};
 	},
 	onLoad(option) {
-		
+		this.courseGoodsList();
 	},
 	onShow() {
-		this.courseGoodsList();
+		if(this.itemIndex !== '') {
+			this.refreshByIndex();
+		}
 		this.commonSystemTime()
 	},
 	onReachBottom() {
@@ -141,13 +264,29 @@ export default {
 		}
 	},
 	methods: {
+		/**
+		 * 返回刷新之前进入的课程数据
+		 */
+		refreshByIndex() {
+			let self = this;
+			this.$api.courseGoodsList({
+				pageNum: this.itemIndex+1,
+				pageSize: 1
+			}).then(res => {
+				if (res.data.code == 200) {
+					this.$set(this.goodsList,this.itemIndex,res.data.rows[0])
+				}
+			});
+		},
 		commonSystemTime() {
 			this.$api.commonSystemTime().then(res => {
 				this.sysTime = res.data.data;
 			})
 		},
-		selectClass(item) {
+		selectClass(item,index) {
 			console.log(item)
+			this.itemIndex = index;
+			this.selectItem = item;
 			this.selectClassModal = true;
 			this.goodsGradeList(item.goodsId);
 		},
@@ -165,6 +304,16 @@ export default {
 							gradeId:0
 						}
 						self.gradeList.push(item)
+					} else {
+						let isGradeFull = self.gradeList.every(item => (item.studentNum > 0 && item.studentNum == item.studentUpper))
+						//所有班级都满了
+						if(isGradeFull) {
+							let item = {
+								className:'系统分班',
+								gradeId:0
+							}
+							self.gradeList.unshift(item)
+						}
 					}
 				}
 			});
@@ -197,24 +346,98 @@ export default {
 				}
 			});
 		},
-		studyIn(v,i,item) {
-			if(this.sysTime <= item.validityStartTime || this.sysTime >= item.validityEndTime) {
+		async studyIn(v,i,item,index) {
+			if(this.sysTime <= item.studyStartTime || this.sysTime >= item.studyEndTime ) {
 				uni.showToast({
 					icon:'none',
-					title:'不在学习时间,不能进入学习'
+					title:'不在学习有效期,不能进入学习'
 				})
 				return;
 			}
 			
-			if(item.rebuildStatus == 0) {
+			if( (item.classStartTime && this.sysTime <= item.classStartTime) || (item.classEndTime && this.sysTime >= item.classEndTime)) {
+				uni.showToast({
+					icon:'none',
+					title:'不在班级有效期,不能进入学习'
+				})
+				return
+			}
+			
+			if(item.learningStatus == 2) {
+				uni.showToast({
+					icon:'none',
+					title:'开放学习时间待定,不能进入学习'
+				})
+				return
+			}
+			
+			if(item.classStatus == 0) {
+				uni.showToast({
+					icon:'none',
+					title:'尚未开班,不能进入学习'
+				})
+				return 
+			}
+			
+			if(item.learningStatus == 3 && (this.sysTime < item.learningTimeStart)) {
+				uni.showToast({
+					icon:'none',
+					title:'不在开放学习时间,不能进入学习'
+				})
+				return ;
+			}
+			
+			
+			this.itemIndex = index;
+			
+			if(item.gradeStatus == 1 && item.status == 1 && (item.studyEndTime > this.sysTime) &&  (item.classEndTime && (item.classEndTime < this.sysTime)) && (item.periodStatus == 0 || item.periodStatus == -1) && item.studyCount > 0) {
+				this.selectClass(item,index);
+				return ;
+			}
+			
+			
+			let rebuildStatus = await this.courseGoodsRebuildStatus(item.goodsId,item.gradeId)
+			
+			if(rebuildStatus == 0) {
 				this.$navTo.togo('/pages2/learn/details', {
 					gradeId:item.gradeId,
 					goodsId: item.goodsId
 				});
 				return;
 			}
+			
+			if(item.courseNum == 1 ) {
+				
+				this.$api.courseCourseList({
+					pageNum:1,
+					pageSize:1,
+					goodsId:item.goodsId,
+					gradeId:item.gradeId
+				}).then(res => {
+					if(res.data.code == 200) {
+						uni.navigateTo({
+							url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
+						})
+					}
+				});
+				return;
+			}
 			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}`);
 		},
+		/**
+		 * @param {Object} goodsId 商品id
+		 * 查询商品重修状态
+		 */
+		courseGoodsRebuildStatus(goodsId,gradeId) {
+			return new Promise(resolve => {
+				this.$api.courseGoodsRebuildStatus({
+					goodsId:goodsId,
+					gradeId:gradeId
+				}).then(res => {
+					resolve(res.data.data)
+				})
+			})
+		},
 		appointment(item) {
 			var data = {
 				goodsId: item.goodsId,
@@ -236,9 +459,34 @@ export default {
 			});
 		},
 		okPopup() {
-			this.selectClassModal = false;
-			uni.showToast({
-				title:'选班成功'
+			if(this.gradeValue == -1) {
+				uni.showToast({
+					icon:'none',
+					title:'请选择班级'
+				})
+				return;
+			}
+			this.$api.changeGrade({
+			  goodsId: this.selectItem.goodsId,
+			  gradeId: this.gradeValue,
+			  oldGradeId: this.selectItem.gradeId,
+			  orderGoodsId: this.selectItem.orderGoodsId,
+			  userId: this.selectItem.userId
+			}).then(res => {
+				if(res.data.code == 200) {
+					if(this.itemIndex !== '') {
+						this.refreshByIndex();
+					}
+					this.selectClassModal = false;
+					uni.showToast({
+						title:'选班成功'
+					})
+				} else {
+					uni.showToast({
+						icon:'none',
+						title:res.data.msg
+					})
+				}
 			})
 		},
 		call() {

+ 27 - 5
pages2/wd/course.vue

@@ -3,7 +3,7 @@
 		<view v-if="!courseList.length">
 			<u-empty text="暂无课程" mode="list"></u-empty>
 		</view>
-		<view v-else @click="jump(item)" v-for="(item, index) in courseList" :key="index" style="margin-bottom: 30rpx;">
+		<view v-else @click="jump(item,index)" v-for="(item, index) in courseList" :key="index" style="margin-bottom: 30rpx;">
 			<view class="class_item">
 				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
 				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">{{ item.courseName }}</view>
@@ -15,7 +15,7 @@
 				</view>
 				<view class="box_progress">
 					<view style="width: 60%;"><u-line-progress height="22" :show-percent="false" active-color="#ff9900" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
-					<view><u-button type="warning" size="mini" @click.stop="studyIn(item)">进入学习</u-button></view>
+					<view><u-button type="warning" size="mini" @click.stop="studyIn(item,index)">进入学习</u-button></view>
 				</view>
 			</view>
 		</view>
@@ -34,7 +34,7 @@ export default {
 				pageSize: 10,
 				total: 0
 			},
-			
+			itemIndex:''
 		};
 	},
 	onLoad(option) {
@@ -44,6 +44,11 @@ export default {
 		this.courseCourseList();
 		this.$store.getters.dictObj
 	},
+	onShow(){
+		if(this.itemIndex !== '') {
+			this.refreshByIndex();
+		}
+	},
 	onReachBottom() {
 		if (this.courseList.length < this.param.total) {
 			this.param.pageNum++;
@@ -51,7 +56,23 @@ export default {
 		}
 	},
 	methods: {
-		jump(item) {
+		/**
+		 * 返回刷新之前进入的课程数据
+		 */
+		refreshByIndex() {
+			this.$api.courseCourseList({
+				pageNum: this.itemIndex+1,
+				pageSize: 1,
+				goodsId:this.goodsId,
+				gradeId:this.gradeId
+			}).then(res => {
+				if (res.data.code == 200) {
+					this.$set(this.courseList,this.itemIndex,res.data.rows[0])
+				}
+			});
+		},
+		jump(item,index) {
+			this.itemIndex = index;
 			if(item.rebuild === 0) {  //未重修
 				this.$navTo.togo('/pages2/learn/details', {
 					id: item.courseId,
@@ -65,7 +86,8 @@ export default {
 				goodsId: this.goodsId,
 			}); 
 		},
-		studyIn(item) {
+		studyIn(item,index) {
+			this.itemIndex = index;
 			if(item.rebuild === 0) {  //未重修
 				this.$navTo.togo('/pages2/learn/details', {
 					id: item.courseId,

+ 7 - 4
pages2/wd/info.vue

@@ -73,7 +73,7 @@
 			<u-input v-model="nickname" type="nickname" placeholder="请输入昵称" />
 		</view>
 	</u-modal>
-	<u-modal v-model="id_show" @confirm="confirmId" :show-cancel-button="true" title="修改关联信息">
+	<u-modal v-model="id_show" ref="uModal" :async-close="true" @confirm="confirmId" :show-cancel-button="true" title="修改关联信息">
 		<view class="slot-content">
 			<u-input v-model="realname" @input="inputName(realname)" type="nickname" placeholder="请输入真实姓名" />
 			<u-input v-model="idCard" type="idcard" placeholder="请输入身份证" />
@@ -309,6 +309,7 @@ export default {
 					content: '真实姓名不能为空',
 					showCancel: false
 				})
+				this.$refs.uModal.clearLoading();
 				return
 			}
 			if(this.idCard==''){
@@ -319,6 +320,7 @@ export default {
 					content: '身份证ID不能为空',
 					showCancel: false
 				})
+				this.$refs.uModal.clearLoading();
 				return
 			}
 			let idCardRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
@@ -330,6 +332,7 @@ export default {
 					content: '身份证ID不正确',
 					showCancel: false
 				})
+				this.$refs.uModal.clearLoading();
 				return
 			}
 			let data = {realname:this.realname,idCard:this.idCard}
@@ -356,6 +359,7 @@ export default {
 			this.$api.appuserInfo(data).then(res => {
 				if (res.data.code === 200) {
 					setTimeout(()=>{
+						this.id_show = false;
 						uni.showToast({
 							title: '提交成功',
 							icon: 'none'
@@ -419,13 +423,12 @@ export default {
 					that.$api.bindNewTel(datas).then(
 						res => {
 							if (res.data.code == 200) {
+								that.showPhoneModal = false;
+								that.$api.refreshUserInfo();
 								uni.showModal({
 									title: '提示',
 									content: '绑定成功',
 									showCancel:false,
-									success: function(resst) {
-										this.showPhoneModal = false;
-									}
 								});
 							} else {
 								that.$u.toast(res.data.msg);

+ 15 - 5
pages3/course/detail.vue

@@ -21,7 +21,7 @@
 						@statechange="onStateChange"
 					></polyv-player>
 				</view>
-				<view style="padding:20rpx;height: 120rpx;">
+				<view style="padding:20rpx;">
 					<view style="display: flex;">
 						<view class="yearTag" v-if="detail.year">{{detail.year}}</view>
 						<view class="titleTag">{{detail.goodsName}}</view>
@@ -39,12 +39,12 @@
 			</view>
 			
 		</view>
-		<view style="padding: 20rpx;position: relative;top: 680rpx;" v-show="current==0">
+		<view style="padding: 20rpx 20rpx 100rpx;position: relative;top: 730rpx;" v-show="current==0">
 			<view class="content">
 				<view v-html="detail.mobileDetailHtml" style="width: 100%;overflow: hidden;"></view>
 			</view>
 		</view>
-		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;top: 680rpx;" v-show="current==1">
+		<view style="padding: 20rpx 20rpx 100rpx;padding-bottom: 100rpx;position: relative;top: 730rpx;" v-show="current==1">
 			<view >
 				<view v-for="(item,index) in courseList" :key="index" >
 					<view class="courseItemBox" >
@@ -113,6 +113,7 @@ export default {
 			listenConfigList:[],
 			listenSecond:0,
 			timer:null,
+			businessData:{},
 			startTime:0
 		};
 	},
@@ -162,9 +163,16 @@ export default {
 		})
 	},
 	methods: {
+		courseBusiness(){
+			this.$api.courseBusiness(this.detail.businessId).then(res => {
+				this.businessData = res.data.data;
+			})
+		},
 		toFixed(number) {
-			if(number) {
+			if(number > 0) {
 				return number.toFixed(2)
+			} else {
+				return '0.00'
 			}
 		},
 		onStateChange(newstate, oldstate) {
@@ -267,7 +275,9 @@ export default {
 						res.data.data.mobileDetailHtml = res.data.data.mobileDetailHtml.replace(/<img/gi,'<img style="max-width:100%;"')
 					}
 					
+					
 					self.detail = res.data.data
+					this.courseBusiness();
 					if(self.detail.goodsAuditionConfig){
 						self.listenConfigList = JSON.parse(self.detail.goodsAuditionConfig)
 						for (var itemChild of self.listenConfigList) {
@@ -354,7 +364,7 @@ export default {
 		position: fixed;
 		background-color: #FFFFFF;
 		width: 100%;
-		height: 680rpx;
+		/* height: 680rpx; */
 		z-index: 999;
 	}
 	.icon_up{

+ 351 - 17
pages3/polyv/detail.vue

@@ -44,8 +44,8 @@
 				</u-row>
 			</view>
 			<u-line color="#D6D6DB" />
-			<view style="display: flex;justify-content: center;">
-				<view><u-tabs :list="list" font-size="24" bar-width="24" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
+			<view>
+				<view><u-tabs gutter="0" :item-width="itemWidth()" :list="list" font-size="32" bar-width="24" :current="current" @change="change" active-color="#007AFF"></u-tabs></view>
 			</view>
 			<u-line color="#D6D6DB" />
 		</view>
@@ -55,15 +55,41 @@
 			<view v-show="current == 0">
 				<view class="menuBox" v-for="(item, index) in menuList" :key="index">
 					<!--模块 -->
-					<view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
+					<view v-if="item.type == 1"><courseModule :courseId="courseId" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
 					<!--章 -->
-					<view v-if="item.type == 2"><courseChapter :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter></view>
+					<view v-if="item.type == 2"><courseChapter :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :learningOrder="businessData.goodsLearningOrder" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter></view>
 					<!--节 -->
-					<view v-if="item.type == 3"><courseSection :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
+					<view v-if="item.type == 3"><courseSection @playEnd="sectionPlayEnd($event,index)" :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isBuy="true" :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection></view>
 				</view>
 			</view>
-			<!--笔记 -->
+			<!--讲义 -->
 			<view v-show="current == 1">
+				<view class="lecture-box" v-if="courseHandoutsData">
+					<view class="title">
+						{{courseHandoutsData.handoutsName}}
+						<!-- 这是后台配置的讲义标题过长省略这是后台配置的讲义标题过长省略 -->
+					</view>
+					<view class="btn" @click="openDocument">
+						<u-icon name="download" color="#007AFF" size="40"></u-icon>
+					</view>
+				</view>
+				
+				<view style="text-align: center;" v-else>暂无讲义</view>
+				<!-- <view class="lecture-content">
+					<rich-text :nodes="'讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容讲义内容'"></rich-text>
+				</view> -->
+				
+			<!-- 	<view class="inputBottom">
+					<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
+					<view style="width: 73%;height: 100%;padding: 10rpx 0;">
+						<u-input class="input" height="60" fixed="true" placeholder="您可以在这里输入笔记内容" type="textarea" :custom-style="inputStyle" v-model="noteValue" />
+					</view>
+					<view style="color: #007AFF;font-size: 30rpx;font-weight: bold;width: 15%;text-align: center;" @click="postNote">提交</view>
+				</view> -->
+				
+			</view>
+			<!--笔记 -->
+			<view v-show="current == 2">
 				<view v-if="noteList.length == 0" style="text-align: center;">暂无笔记</view>
 				<view class="inputBottom">
 					<view style="width: 10%;"><image src="/static/icon/note3.png" style="width: 39rpx;height: 39rpx;margin:0 29rpx;"></image></view>
@@ -94,7 +120,7 @@
 				</view>
 			</view>
 			<!--答疑 -->
-			<view v-show="current == 2">
+			<view v-show="current == 3">
 				<view class="inputBottom">
 					<view class="flex_auto">
 						<u-input height="60" fixed="true" :placeholder="placeholder" type="textarea" :custom-style="inputStyle" v-model="ctxValue" />
@@ -123,17 +149,17 @@
 				<view v-if="answerList.length == 0" style="text-align: center;">暂无记录</view>
 			</view>
 			<!--目录 -->
-			<view v-show="current == 3" >
+			<view v-show="current == 4" >
 				<view class="menuBox" v-for="(item, index) in reMenuList" :key="index">
 					<!--模块 -->
 					<view v-if="item.type == 1"><courseModule :courseId="courseId" :goodsId="goodsId" :gradeId="gradeId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="item.menuId"></courseModule></view>
 					<!--章 -->
 					<view v-if="item.type == 2">
-						<courseChapter :courseId="courseId" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>			
+						<courseChapter :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :menuItem="item" :levelId="'0-' + item.menuId"></courseChapter>			
 					</view>
 					<!--节 -->
 					<view v-if="item.type == 3">
-						<courseSection :courseId="courseId" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :nextMenuItem="findMenuNextSection(index)"  :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
+						<courseSection :courseId="courseId" @playEnd="sectionPlayEnd($event,index)" :gradeId="gradeId" :goodsId="goodsId" :isRebuild="true" :isBuy="true" :nextMenuItem="findMenuNextSection(index)"  :menuItem="item" :levelId="'0-0-' + item.menuId"></courseSection>
 					</view>
 				</view>
 			</view>
@@ -200,6 +226,7 @@ export default {
 				isAutoChange: false,
 				forceVideo: false, 
 			},
+			courseHandoutsData:'',
 			liveDetail:{},
 			showSet:false,
 			startStatus: false,
@@ -253,6 +280,8 @@ export default {
 			photoConfig:false, //是否配置好拍照次数
 			photoIndex:0, //当前位于拍照的区间下标 从0开始
 			photoHistoryList:[], //已拍照历史的下标点
+			businessData:{},
+			isRebuild:false, //视频是否从重修目录点击
 		};
 	},
 	computed: { ...mapGetters(['userInfo', 'playSectionId','playChannelId','playVID']) },
@@ -268,9 +297,11 @@ export default {
 			let item = {
 				sectionId:Number(option.sectionId),
 				recordingUrl:option.recordingUrl,
-				noteSecond:noteSecond
+				noteSecond:noteSecond,
+				studyDuration:noteSecond
 			}
 			this.$store.commit('setPlaySectionId', {playSectionId  :item.sectionId});
+			this.$store.commit('setPlayVID', {playVID  :item.recordingUrl});
 			this.playNoteVideo(item);
 		}
 		
@@ -280,9 +311,11 @@ export default {
 		//相机授权
 		this.getCameraSetting()
 		this.$api.getbaseprofiletplists({ goodsId: self.goodsId }).then(res => {
+			console.log(res,'res')
 			if (res.data.code === 200 && res.data.rows.length) {
 				if (res.data.rows[0].keyValue) {
 					self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId }).then(result => {
+						console.log(result,'result')
 						if (result.data.code === 200) {
 							if (!result.data.data || (result.data.data.status === 3 && result.data.data.changeStatus === 1)) {								
 								if (!result.data.data) {
@@ -318,8 +351,9 @@ export default {
 										}
 									});
 								}
-							} else if (result.data.data.status === 1 && res.data.rows[0].keyValue2) {
+							} else if (result.data.data.status === 1 && JSON.parse(res.data.rows[0].keyValue2)[0]) {
 								self.$api.getbaseprofileStampgetInfo({ goodsId: self.goodsId }).then(k => {
+									
 									if (k.data.code === 200) {
 										if (!k.data.data || (k.data.data.status === 3 && k.data.data.changeStatus === 1)) {
 											if (!k.data.data) {
@@ -381,6 +415,7 @@ export default {
 		this.$store.commit('setPlayChannelId', { playChannelId: 0 });
 		this.$store.commit('setPlayVID', { playVID: null });
 		this.closePlv()
+		console.log('onUnload')
 		//移除所有的事件监听器
 		uni.$off();
 		if (this.timer) {
@@ -421,8 +456,205 @@ export default {
 			this.$store.commit('setPlayVID', {playVID  :null});
 			this.playChannel(item);
 		});
+		uni.$on('isRebuild',item => {
+			console.log(item)
+			this.isRebuild = item;
+		})
 	},
 	methods: {
+		/**
+		 * 模块大节播放完毕,刷新列表 
+		 */
+		sectionPlayEnd(isRebuild,index) {
+			console.log('sectionPlayEnd')
+			console.log('isRebuild',isRebuild)
+			if(this.reMenuList.length>0) {  //有重修目录
+				if(isRebuild.isRebuild) { //从重修点击
+					this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
+						console.log('Rebuild1')
+						if (res.data.code == 200) {
+							if(res.data.rows.length) {
+								// res.data.rows[index].name = res.data.rows[index].menuName;
+								// this.$set(this.reMenuList,index,res.data.rows[index])
+								for (let i = 0; i < res.data.rows.length; i++) {
+									let item = res.data.rows[i];
+									item.down = true;
+									item.id = item.menuId;
+									item.name = item.menuName;
+								}
+								this.reMenuList = []
+								this.$nextTick(() => {
+									this.reMenuList = res.data.rows;
+									console.log(this.reMenuList)
+								})
+								
+							} else {
+								this.reMenuList = []
+							}
+							
+							this.$nextTick(() => {
+								if(this.reMenuList.length>0){
+									this.list = [
+										
+										{
+											name: '目录'
+										},
+										{
+											name: '讲义'
+										},
+										{
+											name: '笔记'
+										},
+										{
+											name: '答疑'
+										},
+										{name:'重修目录'}
+									];
+								} else {
+									this.list = [
+										
+										{
+											name: '目录'
+										},
+										{
+											name: '讲义'
+										},
+										{
+											name: '笔记'
+										},
+										{
+											name: '答疑'
+										}
+									];
+									if(this.current == 4) {
+										this.current = 0;
+									}
+									
+								}
+							})
+							
+							
+						}
+					});
+					
+					this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
+						console.log('noRebuild1')
+						if (res.data.code == 200) {
+							for (let i = 0; i < res.data.rows.length; i++) {
+								let item = res.data.rows[i];
+								item.down = true;
+								item.id = item.menuId;
+								item.name = item.menuName;
+							}
+							this.menuList = []
+							this.$nextTick(() => {
+								this.menuList = res.data.rows;
+							})
+							
+						}
+					});
+				} else {  //从普通目录点击
+					this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
+						console.log('noRebuild2')
+						if (res.data.code == 200) {
+							res.data.rows[index].name = res.data.rows[index].menuName;
+							this.$set(this.menuList,index,res.data.rows[index])
+						}
+					});
+					
+					this.$api.reMenuList({ courseId: this.courseId, rebuild: 1, gradeId: this.gradeId }).then(res => {
+						console.log('Rebuild2')
+						if (res.data.code == 200) {
+							for (let i = 0; i < res.data.rows.length; i++) {
+								let item = res.data.rows[i];
+								item.down = true;
+								item.id = item.menuId;
+								item.name = item.menuName;
+							}
+							this.reMenuList = []
+							this.$nextTick(() => {
+								this.reMenuList = res.data.rows;
+								if(this.reMenuList.length>0){
+									this.list = [
+										
+										{
+											name: '目录'
+										},
+										{
+											name: '讲义'
+										},
+										{  
+											name: '笔记'
+										},
+										{
+											name: '答疑'
+										},
+										{name:'重修目录'}
+									];
+								} else {
+									this.list = [
+										
+										{
+											name: '目录'
+										},
+										{
+											name: '讲义'
+										},
+										{
+											name: '笔记'
+										},
+										{
+											name: '答疑'
+										}
+									];
+									if(this.current == 4) {
+										this.current = 0;
+									}
+								}
+							})
+							
+						}
+					});
+				}
+				
+			} else { //没有重修目录
+				this.$api.reMenuList({ courseId: this.courseId, gradeId: this.gradeId }).then(res => {
+						console.log('noRebuild3')
+					if (res.data.code == 200) {
+						res.data.rows[index].name = res.data.rows[index].menuName;
+						res.data.rows[index].id = res.data.rows[index].menuId;
+						this.$set(this.menuList,index,res.data.rows[index])
+					}
+				});
+				
+				
+			}
+			
+			
+			
+		},
+		/**
+		 * 获取业务层次详情
+		 */
+		courseBusiness(){
+			this.$api.courseBusiness(this.goodsData.businessId).then(res => {
+				this.businessData = res.data.data;
+			})
+		},
+		/**
+		 * 计算tabs宽度
+		 */
+		itemWidth() {
+			return 100/this.list.length + '%'
+		},
+		/**
+		 * 获取讲义权限
+		 */
+		courseHandouts() {
+			this.$api.courseHandouts(this.goodsData.handoutsId).then(res => {
+				this.courseHandoutsData = res.data.data
+			})
+		},
 		findMenuNextSection(index){
 			for(let i=index+1;i<this.reMenuList.length;i++){
 				let item = this.reMenuList[i]
@@ -695,6 +927,7 @@ export default {
 		},
 		//播放笔记视频
 		async playNoteVideo(item) {
+			console.log(item,'noteItem')
 			if (this.timer) {
 				clearInterval(this.timer);
 			}
@@ -706,16 +939,16 @@ export default {
 				this.vid = item.recordingUrl;
 			}
 			this.recordObj = {videoCurrentTime:item.noteSecond}
-			if (this.recordObj.studyDuration) {
+			if (this.recordObj.videoCurrentTime) {
 				this.needSeek = true; //需要跳转到播放记录
 			}
 			this.startStatus = true;
-		
 			//获取节笔记
 			this.getNoteList();
 		},
 		//正常播放视频
 		async playVideo(item) {
+			console.log(item)
 			if (this.timer) {
 				clearInterval(this.timer);
 			}
@@ -755,11 +988,14 @@ export default {
 			this.noteId = item.noteId;
 			//没视频播放
 			if(this.playSectionId==0){
+				console.log('即将跳到笔记位置1')
 				this.$u.toast('即将跳到笔记位置');  
 				this.$store.commit('setPlaySectionId', {playSectionId  :item.sectionId});
+				this.$store.commit('setPlayVID', {playVID  :item.recordingUrl});
 				this.playNoteVideo(item);
 			}else{
 				//正在看当前笔记视频
+				console.log('即将跳到笔记位置2')
 				this.$u.toast('即将跳到笔记位置');
 				//跳到笔记时刻
 				var polyvPlayerContext = this.selectComponent('#playerVideo');
@@ -907,6 +1143,7 @@ export default {
 			this.postAnswer();
 		},
 		postStudyRecord(status = 0, sectionId = this.playSectionId) {
+			console.log('status',status)
 			let currentTime = 0;
 			let PlayDuration = 0
 			var polyvPlayerContext = this.selectComponent('#playerVideo');
@@ -930,12 +1167,27 @@ export default {
 				videoCurrentTime: parseInt(currentTime > 0 ? currentTime : self.studyDuration)
 			};
 			if (status > 0) {
+				console.log(sectionId,'sectionId')
 				data.status = status;
+				
+					
 			}
 			console.log('提交接口', data);
 			this.$api.studyRecord(data).then(res => {
+				if (status > 0) {
+					let moduleId = this.moduleId || 0;
+					let chapterId = this.chapterId || 0;
+					let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
+					let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}`;  //拼接对应章节唯一id
+					console.log(playNextId,'playNextId')
+					console.log(playNextIdisRebuild,'playNextIdisRebuild')
+					
+					uni.$emit('playNext'+playNextIdisRebuild,{fromRebuild:this.isRebuild}); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
+					uni.$emit('playNext'+playNextId); //通知播放结束
+				}
+				
 				self.ossAvatarUrl = ''
-				console.log(res);
+				console.log(res,'res');
 			});
 		},
 		uploadFile(options, int) {
@@ -1058,6 +1310,7 @@ export default {
 				if (this.needSeek) {  
 					var polyvPlayerContext = this.selectComponent('#playerVideo');
 					if(this.recordObj.videoCurrentTime){
+						console.log('seek')
 						polyvPlayerContext.seek(this.recordObj.videoCurrentTime);
 					}else{
 						polyvPlayerContext.seek(1);//避免相同节继续播放
@@ -1079,7 +1332,7 @@ export default {
 			}
 			if (newstate.detail.newstate == 'ended') {
 				this.postStudyRecord(1);
-				uni.$emit('playNext') //播放重修下一节
+				// uni.$emit('playNext') //播放重修下一节
 			}
 		},
 		//拍照
@@ -1135,6 +1388,8 @@ export default {
 				self.goodsData = res.data.data;
 				self.gradeId = self.goodsData.gradeId;
 				console.log(self.gradeId, "班级ID");
+				this.courseBusiness()
+				this.courseHandouts();
 				self.getMenuList();
 				self.getReMenuList(); //获取重修目录
 				setTimeout(function(){
@@ -1194,12 +1449,16 @@ export default {
 							{
 								name: '目录'
 							},
+							{
+								name: '讲义'
+							},
 							{
 								name: '笔记'
 							},
 							{
 								name: '答疑'
-							},{name:'重修目录'}
+							},
+							{name:'重修目录'}
 						];
 						this.current = 0;
 					} else {
@@ -1208,6 +1467,9 @@ export default {
 							{
 								name: '目录'
 							},
+							{
+								name: '讲义'
+							},
 							{
 								name: '笔记'
 							},
@@ -1239,6 +1501,9 @@ export default {
 			this.$api.courseDetail(this.courseId).then(res => {
 				if (res.data.code == 200) {
 					self.detail = res.data.data;
+					uni.setNavigationBarTitle({
+						title:self.detail.courseName
+					})
 				}
 			});
 		},
@@ -1247,6 +1512,39 @@ export default {
 		},
 		change(index) {
 			this.current = index;
+		},
+		openDocument() {
+			let self = this;
+			let url = this.$method.splitImgHost(this.courseHandoutsData.handoutsUrl)
+			console.log(url)
+			uni.downloadFile({
+			  url: url,
+			  success: function (res) {
+				  console.log(999)
+			    var filePath = res.tempFilePath;
+			    uni.openDocument({
+			      filePath: filePath,
+			      showMenu: self.courseHandoutsData.canDownload == 1 ? true : false,
+			      success: function (res) {
+			        console.log(res,'打开文档成功');
+			      },
+				  fail:function(err) {
+					  console.log(err)
+					uni.showToast({
+						icon:'none',
+						title:'文档地址错误'
+					})
+				  }
+			    });
+			  },
+			  fail:(err) => {
+				  uni.showModal({
+				  	title:'提示',
+					content:'文档错误,'+err.errMsg,
+					showCancel:false
+				  })
+			  }
+			});
 		}
 	}
 };
@@ -1285,6 +1583,42 @@ export default {
 	border-radius: 16rpx;
 	font-size: 24rpx;
 }
+.lecture-box {
+	display: flex;
+	align-items: center;
+	height: 80rpx;
+	background: #FFFFFF;
+	border-radius: 16rpx 16rpx 16rpx 16rpx;
+	
+	.title {
+		padding:10rpx;
+		flex:1;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		color:#333;
+		font-weight: bold;
+		font-size: 32rpx;
+	}
+	
+	.btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width:80rpx;
+		height:80rpx;
+		background: #FFFFFF;
+		box-shadow: -4rpx 0rpx 4rpx 0rpx rgba(0,0,0,0.1);
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+	}
+}
+
+.lecture-content {
+	background:#fff;
+	margin-top:10rpx;
+	padding:10rpx;
+	border-radius:16rpx;
+}
 .photoBox {
 	background-color: #FFFFFF;
 	border-radius: 32px 32px 0px 0px;

+ 1 - 1
pages3/static/polyv-sdk/components/polyv/polyv.wxss

@@ -100,7 +100,7 @@
   top: 0;
   right: 0;
   width: 124rpx;
-  background-color: green;
+  background-color: #36C75A;
   color: #fff;
   font-size: 26rpx;
   line-height: 31px;