chenxiong пре 3 година
родитељ
комит
32eb1e0636
42 измењених фајлова са 2527 додато и 622 уклоњено
  1. 16 0
      common/httpList/base.js
  2. 8 0
      common/httpList/course.js
  3. 53 1
      common/httpList/mock.js
  4. 1 0
      common/httpList/polyvVideo.js
  5. 9 1
      common/httpList/study.js
  6. 7 0
      common/methodTool.js
  7. 3 2
      common/request.js
  8. 88 17
      components/course/courseSection.vue
  9. 41 0
      pages.json
  10. 4 1
      pages/course/index.vue
  11. 2 2
      pages/index/index.vue
  12. 2 2
      pages/wd/index.vue
  13. 7 1
      pages2/appointment/index.vue
  14. 21 4
      pages2/appointment/order.vue
  15. 8 0
      pages2/bank/free_question.vue
  16. 10 2
      pages2/bank/my_question.vue
  17. 25 20
      pages2/learn/my_learn.vue
  18. 1 1
      pages2/order/confirm_success.vue
  19. 1 0
      pages2/register/bind.vue
  20. 1 0
      pages2/register/register.vue
  21. 181 153
      pages2/verify/input.vue
  22. 89 66
      pages2/wd/class.vue
  23. 27 24
      pages2/wd/course.vue
  24. 1 1
      pages3/course/detail.vue
  25. 65 18
      pages3/live/detail.vue
  26. 218 0
      pages3/live/playback.vue
  27. 237 164
      pages3/polyv/detail.vue
  28. 4 0
      pages4/login/login.vue
  29. 30 4
      pages5/exam/index.vue
  30. 47 17
      pages5/examAppointList/index.vue
  31. 57 17
      pages5/examBank/index.vue
  32. 18 13
      pages5/examCount/index.vue
  33. 160 47
      pages5/examList/index.vue
  34. 64 13
      pages5/examReport/index.vue
  35. 43 1
      pages5/liveDetail/list.vue
  36. 140 30
      pages5/liveList/index.vue
  37. 478 0
      pages5/mockRecord/mock_record.vue
  38. 336 0
      pages5/mockRecord/mock_record_list.vue
  39. BIN
      pages5/static/noliving.png
  40. BIN
      pages5/static/playback.png
  41. BIN
      static/icon/my_icon12.png
  42. 24 0
      store/index.js

+ 16 - 0
common/httpList/base.js

@@ -55,6 +55,22 @@ export default {
 			method: 'post',
 			data: data
 		})
+	},
+	
+	baseHandoutTipList(data) {
+		return myRequest({
+			url: '/base/handout/tip/list',
+			method: 'GET',
+			data: data
+		})
+	},
+	
+	baseHandoutTip(data) {
+		return myRequest({
+			url: '/base/handout/tip',
+			method: 'post',
+			data: data
+		})
 	}
 	
 	

+ 8 - 0
common/httpList/course.js

@@ -175,4 +175,12 @@ export default {
 		})
 	},
 	
+	courseMajorList (data) {
+		return myRequest({
+			url: '/course/major/list',
+			method: 'get',
+			data:data
+		})
+	},
+	
 }

+ 53 - 1
common/httpList/mock.js

@@ -17,10 +17,19 @@ export default {
 		})
 	},
 	
+ mockApplyListApplyName(data) {
+		return myRequest({
+			url: '/mock/apply/listApplyName',
+			method: 'get',
+			data
+		})
+	},
+	
 	mockApplyListApplyBusiness(data) {
 		return myRequest({
 			url: '/mock/apply/listApplyBusiness',
 			method: 'get',
+			data
 		})
 	},
 	
@@ -87,8 +96,51 @@ export default {
 	},
 	
 	
+	mockSubscribeEdit(data) {
+		return myRequest({
+			url: '/mock/subscribe/edit',
+			data:data,
+			method: 'POST',
+		})
+	},
 	
+	mockApplyListMockLive(data) {
+		return myRequest({
+			url: '/mock/apply/listMockLive',
+			data:data,
+			method: 'get',
+		})
+	},
 	
+	mockSubscribeInfo(data) {
+		return myRequest({
+			url: '/mock/subscribe/info/'+data,
+			method: 'get',
+		})
+	},
 	
-	
+	mockRecordGroupList(data) {
+			return myRequest({
+				url: '/mock/record/group_list',
+				method: 'get',
+	      params:data
+			})
+		},
+	  
+	  mockRecordList(data) {
+			return myRequest({
+				url: '/mock/record/list',
+				method: 'get',
+	      params:data
+			})
+		},
+
+		mockApplyMockLiving(data) {
+			return myRequest({
+				url: '/mock/apply/mockLiving',
+				method: 'get',
+		    params:data
+			})
+		},
+
 }

+ 1 - 0
common/httpList/polyvVideo.js

@@ -10,4 +10,5 @@ export default {
 			// noToken: true
 		})
 	},
+
 }

+ 9 - 1
common/httpList/study.js

@@ -36,7 +36,15 @@ export default {
 			method: 'get',
 			data: data
 		})
-	}
+	},
+	//获取保利威视频信息详细信息
+	studyRecordGetChannelBasicInfo(data) {
+		return myRequest({
+				url: `/study/record/getChannelBasicInfo`,
+				method: 'get',
+				data:data
+		})
+	},
 	
 	
 }

+ 7 - 0
common/methodTool.js

@@ -51,6 +51,13 @@ export default {
 		return url;
 
 	},
+	setUuid(id) {
+		uni.setStorageSync('uuid',id)
+	},
+
+	getUuid() {
+		return uni.getStorageSync('uuid')
+	},
 	exit() {
 		uni.removeStorageSync('user_account')
 		uni.removeStorageSync('token')

+ 3 - 2
common/request.js

@@ -6,7 +6,7 @@ var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
 export const BASE_URL = 'http://api.xyyxt.net:19009'   //预发布
-// export const BASE_URL = 'http://42.192.164.187:19005'    //test 
+// export const BASE_URL = 'http://42.192.164.187:19005'    //test
 // export const BASE_URL = 'http://192.168.1.222:5055'    //dev
 
  //图片上传api
@@ -16,6 +16,7 @@ export const BASE_IMG_URL = 'https://file-dev.xyyxt.net/'  //test
 
 // export const WEBVIEW_URL = 'http://192.168.1.38:8082/'  //test
 export const WEBVIEW_URL = 'http://api.xyyxt.net:6066/'  //预发布
+// export const WEBVIEW_URL = 'https://m.xyyxt.net/'  //release
 
 // export const socket_url = 'ws://42.192.164.187:19005/webSocket/'  //test
 // export const socket_url = 'ws://120.79.166.78:19009/webSocket/'  //预发布
@@ -28,7 +29,7 @@ RVQplIVs5z3MxcUa9ptKPHUTgh8xMCBvl8sUJKwkmn4vYWeDfHT22EL7Hr1pTMwU
 hF6WiNlWfQTVoF1rhwIDAQAB
 -----END PUBLIC KEY-----`;
 
-export const version = '5.2.5' 
+export const version = '6.0.0' 
 export const tenantId = '867735392558919680' 
 export const myRequest = (options) => {
 	if (store.state.allowLoading && !options.noLoading) {

+ 88 - 17
components/course/courseSection.vue

@@ -29,12 +29,17 @@
 							<text>回放</text>
 						</view> -->
 					</view>
+					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.sectionType == 3 && !menuItem.recordingUrl">
+						<view >
+							<text>当前直播回放视频请稍后再查看</text>
+						</view>
+					</view>
 				</view>
 				<view v-if="menuItem.sectionType==null">{{menuItem.name || ''}}</view>
 			</view>
 			<view style="font-size: 20rpx;color: #FF3B30;"  v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
 				
-				<template v-if="!isLast()">
+				<template v-if="!isLast() && !isLive">
 					<view class="tagWillPlay" v-if="menuItem.liveStartTime>nowTime">
 						<text>待开播</text>
 					</view>
@@ -70,7 +75,7 @@ import {WEBVIEW_URL} from '@/common/request.js'
 export default {
 	name: 'courseSection',
 	props: {
-		isLive:false,
+		isLive:false, //是否是直播课
 		orderGoodsId:{
 			default:0
 		},
@@ -194,11 +199,12 @@ export default {
 	},
 	methods: {
 		isLast() {
+			console.log(this.liveLast,'this.liveLast')
 			if(this.liveLast) {
 				let sectionASame = this.liveLast.sectionId == (this.menuItem.sectionId || this.menuItem.menuId)
 				let chapterSame = this.liveLast.chapterId == (this.menuItem.chapterId || 0)
 				let moduleSame = this.liveLast.moduleId == (this.menuItem.moduleId || 0);
-
+				console.log(sectionASame && chapterSame && moduleSame,'sectionASame && chapterSame && moduleSame')
 				return sectionASame && chapterSame && moduleSame
 			} else {
 				return false;
@@ -251,7 +257,7 @@ export default {
 
 			this.clickLock = true;
 			
-			if(this.learningOrder == 2 && !this.menuItem.isRebuild) { //要按从头到尾顺序学习, 且不是重修课程
+			if(this.learningOrder == 2 && !this.menuItem.isRebuild && !this.isLive) { //要按从头到尾顺序学习, 且不是重修课程
 				if(this.preItem) {
 					let rows = await this.studyRecordMenuAllList();
 					let newRows = [];
@@ -339,6 +345,17 @@ export default {
 			},3000)
 			
 		},
+		studyRecordGetChannelBasicInfo(channelId) {
+			return new Promise((resolve) => {
+				this.$api
+					.studyRecordGetChannelBasicInfo({
+						channelId,
+					})
+					.then((res) => {
+						resolve(res.data.data);
+					});
+			});
+		},
 		async playVideo() {
 			if(this.menuItem.sectionType==1||this.menuItem.sectionType==3){
 				//录播
@@ -376,7 +393,7 @@ export default {
 				if(!this.menuItem.recordingUrl){
 					uni.showToast({
 						title: '暂无播放地址数据',
-						icon: 'error'
+						icon: 'none'
 					});
 					this.clickLock = false;
 					return;
@@ -419,7 +436,7 @@ export default {
 				
 				console.log(this.sectionMaxNum,'this.sectionMaxNum')
 				console.log(learnNum,'learnNum')
-				if(this.sectionMaxNum > 0) {
+				if(this.sectionMaxNum > 0 && !this.isLive) {
 					if(learnNum >= this.sectionMaxNum && !hasLearn) {
 						uni.showToast({
 							icon:'none',
@@ -434,12 +451,66 @@ export default {
 						title: '暂无直播地址数据',
 						icon: 'error'
 					});
+					return;
 				}
-				if(this.playSectionId==this.newId){
-					//切换为同一频道
-					this.clickLock = false;
-					return
+				
+				let data = await this.studyRecordGetChannelBasicInfo(this.menuItem.liveUrl);
+				let nowTime = +this.$method.timest();
+				
+				if (this.menuItem.liveStartTime > nowTime) {
+					if (data.watchStatus == "end" || data.watchStatus == "playback") {
+						this.clickLock = false;
+						uni.showToast({
+							title: '直播未开始',
+							icon: 'none'
+						});
+						return;
+					}
+				} else if (
+					this.menuItem.liveStartTime < nowTime &&
+					this.menuItem.liveEndTime > nowTime
+				) {
+					if (data.watchStatus == "end" || data.watchStatus == "playback") {
+						this.clickLock = false;
+						uni.showToast({
+							title: '暂无直播',
+							icon: 'none'
+						});
+						return;
+					}
+				} else if (this.menuItem.liveEndTime < nowTime) {
+					if (data.watchStatus == "end" || data.watchStatus == "playback") {
+						this.clickLock = false;
+						uni.showToast({
+							title: '直播已结束',
+							icon: 'none'
+						});
+						return;
+					}
 				}
+				// if (data.watchStatus == "end" || data.watchStatus == "playback") {
+				// 	this.clickLock = false;
+				// 	uni.showToast({
+				// 		title: '直播已结束',
+				// 		icon: 'none'
+				// 	});
+				// 	return;
+				// }
+
+				// if (data.watchStatus == "waiting") {
+				// 	this.clickLock = false;
+				// 	uni.showToast({
+				// 		title: '直播未开始',
+				// 		icon: 'none'
+				// 	});
+				// 	return;
+				// }
+	
+				// if(this.playSectionId==this.newId){
+				// 	//切换为同一频道
+				// 	this.clickLock = false;
+				// 	return
+				// }
 				let moduleId = this.menuItem.moduleId || 0;
 				let chapterId = this.menuItem.chapterId || 0;
 				let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
@@ -450,13 +521,13 @@ export default {
 				
 				return;
 				//设置播放的节ID
-				this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
-				this.$store.commit('setPlayChannelId', {playChannelId  :this.menuItem.liveUrl});
-				this.$store.commit('updatePlayNextId',this.playId)
-				uni.$emit('levelId', this.levelId)
-				uni.$emit('getChannel', this.menuItem)
-				uni.$emit('isRebuild',this.isRebuild)
-				console.log(this.menuItem,'menuItem')
+				// this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
+				// this.$store.commit('setPlayChannelId', {playChannelId  :this.menuItem.liveUrl});
+				// this.$store.commit('updatePlayNextId',this.playId)
+				// 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')

+ 41 - 0
pages.json

@@ -755,6 +755,23 @@
 					  }
 				}
 			}
+		},{
+			"path": "live/playback",
+			"style": {
+				"navigationBarTitleText": "回放视频",
+				"navigationBarBackgroundColor": "#0386FD",
+				"navigationBarTextStyle": "white",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				},
+				"mp-weixin": {
+					"usingComponents": {
+						"polyv-player": "plugin://polyv-player/player"
+					  }
+				}
+			}
 		}],
 		"plugins": {
 			"polyv-player": {
@@ -793,6 +810,30 @@
 					"bounce": "none"
 				}
 			}
+		},{
+			"path": "mockRecord/mock_record",
+			"style": {
+				"navigationBarTitleText": "模考记录",
+				"navigationBarBackgroundColor": "#0386FD",
+				"navigationBarTextStyle": "white",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
+		},{
+			"path": "mockRecord/mock_record_list",
+			"style": {
+				"navigationBarTitleText": "模考记录",
+				"navigationBarBackgroundColor": "#0386FD",
+				"navigationBarTextStyle": "white",
+				"navigationStyle": "custom", // 隐藏系统导航栏
+				"app-plus": {
+					"titleNView": false, //禁用原生导航栏 
+					"bounce": "none"
+				}
+			}
 		},{
 			"path": "examCount/index",
 			"style": {

+ 4 - 1
pages/course/index.vue

@@ -58,7 +58,7 @@
 								<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="blackFont">{{item.classHours}}</text> 学时</view>
+								<text class="blackFont">{{item.classHours || '-'}}</text> 学时</view>
 								<view class="priceTag">¥ {{item.standPrice.toFixed(2)}}</view>
 							</view>
 						</view>
@@ -226,6 +226,9 @@ export default {
 			this.paramList[1].educationTypeId = this.selObj.eId
 			this.paramList[1].businessId = this.selObj.bId
 			this.paramList[1].subjectId = 0
+			this.paramList[2].educationTypeId = this.selObj.eId
+			this.paramList[2].businessId = this.selObj.bId
+			this.paramList[2].subjectId = 0
 		},
 		subjectList(data) {
 			var self = this;

+ 2 - 2
pages/index/index.vue

@@ -106,7 +106,7 @@
 						<view class="title">{{item.goodsName}}</view>
 						<view class="desc">
 							<view class="left">
-								{{item.classHours}}
+								{{item.classHours || '-'}}
 								<text>学时</text>
 							</view>
 							<view class="right">¥ {{toFixed(item.standPrice)}}</view>
@@ -125,7 +125,7 @@
 						<view class="title">{{item.goodsName}}</view>
 						<view class="desc">
 							<view class="left" v-if="false">
-								{{item.classHours}}
+								{{item.classHours || '-'}}
 								<text>学时</text>
 							</view>
 							<view class="right">¥ {{toFixed(item.standPrice)}}</view>

+ 2 - 2
pages/wd/index.vue

@@ -40,7 +40,7 @@
 				</view>
 				<navigator  hover-class="none" url="/pages5/liveDetail/list" class="menu_box" >
 					<view class="box_left">
-						<image src="/static/icon/my_icon2.png" class="my_icon"></image>
+						<image src="/static/icon/my_icon12.png" class="my_icon"></image>
 						<view>我的直播课</view>
 					</view>
 					<view class="box_right">
@@ -156,7 +156,7 @@ export default {
 		},
 		goodsLivingSectionList() {
 			this.$api.goodsLivingSectionList().then(res => {
-				this.total2 = res.data.total
+				this.total2 = res.data.data.length
 			})
 		},
 		goBank() {

+ 7 - 1
pages2/appointment/index.vue

@@ -87,6 +87,7 @@ export default {
 			gradeId: 0,
 			orderGoodsId:"",
 			applyStatus: '',
+			applyId:0,
 			listData: {
 				applyStatus: []
 			}, //页面数据
@@ -95,6 +96,7 @@ export default {
 		};
 	},
 	onLoad(option) {
+		this.applyId = option.applyId;
 		this.goodsId = Number(option.goodsId);
 		this.gradeId = Number(option.gradeId);
 		this.orderGoodsId = Number(option.orderGoodsId) || ''
@@ -105,7 +107,8 @@ export default {
 			var data = {
 				goodsId: this.goodsId,
 				gradeId: this.gradeId,
-				orderGoodsId:this.orderGoodsId
+				orderGoodsId:this.orderGoodsId,
+				applyId:this.applyId
 			};
 			this.$api.getApplysubscribe(data).then(res => {
 				if (res.data.data.applyStatus) {
@@ -126,6 +129,7 @@ export default {
 				applyId: this.listData.applyId,
 				applyStatus: this.radioInfo,
 				goodsId: this.goodsId,
+				applyId:this.applyId,
 				gradeId: this.gradeId,
 				orderGoodsId:this.orderGoodsId
 			};
@@ -142,6 +146,7 @@ export default {
 							applyStatus: this.radioInfo,
 							goodsId: this.goodsId,
 							dataId: res.data.data,
+							applyId:this.applyId,
 							orderGoodsId: this.orderGoodsId
 						});
 					}
@@ -171,6 +176,7 @@ export default {
 				goodsId: this.goodsId,
 				orderGoodsId:this.orderGoodsId,
 				gradeId: this.gradeId,
+				applyId:this.applyId
 			})
 			this.$navTo.togo('/pages2/order/confirm_list', {
 				id: this.goodsIdBK,

+ 21 - 4
pages2/appointment/order.vue

@@ -78,18 +78,30 @@ export default {
 			applyId: null, //考试计划ID
 			goodsId: null, //商品ID
 			applyStatus: null, //学员状态ID
+			sysTime:0,
 			dataId: null //跳转拷贝
 		};
 	},
-	onLoad(option) {
+	async onLoad(option) {
 		this.applyId = Number(option.applyId);
 		this.goodsId = Number(option.goodsId);
 		this.applyStatus = Number(option.applyStatus);
 		this.dataId = Number(option.dataId);
 		this.orderGoodsId = Number(option.orderGoodsId)
+		await this.commonSystemTime()
 		this.getInfo();
 	},
 	methods: {
+		commonSystemTime() {
+			return new Promise(resolve => {
+				
+				this.$api.commonSystemTime().then(res => {
+					this.sysTime = res.data.data;
+					
+					resolve();
+				})
+			})
+		},
 		//获取考试地点
 		getInfo() {
 			this.$api.getApplysubscribeApplySite({ applyId: this.applyId }).then(res => {
@@ -147,12 +159,12 @@ export default {
 			});
 			this.activeList = arrays.filter((item,index) => {
 				console.log(item)
-				const newTime = parseInt(new Date().getTime() / 1000)
+				// const newTime = parseInt(new Date().getTime() / 1000)
 				console.log(item.dataTime.replace(/-/g,'/') + '' + item.startTime + ':00')
 				const liTime = parseInt(new Date(item.dataTime.replace(/-/g,'/') + '' + item.startTime + ':00').getTime() / 1000)
 				console.log(liTime,'liTime')
-				console.log(newTime,'newTime')
-				if(liTime > newTime){
+				console.log(this.sysTime,'newTime')
+				if(liTime > this.sysTime){
 					return item
 				}
 			});
@@ -206,6 +218,11 @@ export default {
 								uni.reLaunch({
 									url: `/pages2/appointment/appointment_success?subscribeId=${res.data.data}`
 								});
+							} else {
+								uni.showToast({
+									icon:'none',
+									title:res.data.msg
+								})
 							}
 						});
 					}

+ 8 - 0
pages2/bank/free_question.vue

@@ -72,6 +72,14 @@
 			},
 			studyIn(item,index){
 				this.itemIndex = index;
+				let sysTime = this.$method.timest()
+				if (item.serviceStartTime && item.item.serviceEndTime && (sysTime <= item.serviceStartTime || this.sysTime >= item.serviceEndTime)) {
+					uni.showToast({
+						icon: 'none',
+						title: '不在学习服务期,不能进入学习'
+					})
+					return;
+				}
 				uni.navigateTo({
 					url:'/pages2/bank/question_detail?id='+item.goodsId+'&orderGoodsId='+item.orderGoodsId
 				})

+ 10 - 2
pages2/bank/my_question.vue

@@ -1,13 +1,13 @@
 <template>
 	<view style="padding: 30rpx;">
-		<nav-bar title="我的题库"></nav-bar>
+		<nav-bar title="自购题卷"></nav-bar>
 		<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" v-if="item.serviceStartTime && item.serviceEndTime">
+				<view class="content_box" v-if="item.serviceStartTime && item.serviceEndTime">
 					<image src="/static/icon/wk_icon2.png" class="wk_icon"></image>
 					学习服务期:<text class="content"> {{$method.timestampToTime(item.serviceStartTime,true,true)}}-{{$method.timestampToTime(item.serviceEndTime,true,true)}} </text>
 				</view>
@@ -72,6 +72,14 @@
 			},
 			studyIn(item,index){
 				this.itemIndex = index;
+				let sysTime = this.$method.timest()
+				if (item.serviceStartTime && item.serviceEndTime && (sysTime <= item.serviceStartTime || this.sysTime >= item.serviceEndTime)) {
+					uni.showToast({
+						icon: 'none',
+						title: '不在学习服务期,不能进入学习'
+					})
+					return;
+				}
 				uni.navigateTo({
 					url:'/pages2/bank/question_detail?id='+item.goodsId+'&orderGoodsId='+item.orderGoodsId
 				})

+ 25 - 20
pages2/learn/my_learn.vue

@@ -61,20 +61,23 @@
 							<view class="btnBox"><view class="btn" v-if="!showLearn(item)" @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="status">
-									<view class="label">审核状态:</view>
-									<view class="val green">
-										<text>
-											机构审核通过
-										</text>
-									</view>
-								</view> -->
-								<view class="btnBox"><view class="btn" @click="jumpPage(item, 2,index)">预约考试</view></view>
+							<view v-if="item.periodStatus === 1 && item.applyStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
+								<template v-for="apply in item.applyList">
+									<view class="subTitle">{{ apply.applyName }}</view>
+									<!-- <view class="status">
+										<view class="label">审核状态:</view>
+										<view class="val green">
+											<text>
+												机构审核通过
+											</text>
+										</view>
+									</view> -->
+									<view class="btnBox"><view class="btn" @click="jumpPage(item, 2,index,apply)">预约考试</view></view>
+								</template>
+								
 							</view>
 							<u-line color="#EEEEEE" v-if="item.periodStatus === 1 && item.applyStatus === 1" />
-							<view v-if="item.periodStatus === 1 && item.beforeStatus === 1">
+							<view v-if="item.periodStatus === 1 && item.beforeStatus === 1  && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
 								<view class="subTitle">{{ item.beforeName }}</view>
 								<!-- <view class="status">
 									<view class="label">审核状态:</view>
@@ -147,10 +150,10 @@ export default {
 		this.orderGoodsId = option.orderGoodsId||''
 		console.log(this.orderGoodsId)
 		this.param.orderGoodsId = option.orderGoodsId||''
-		this.sysTime = +this.$method.timest();
 		this.getcourseperiodlistGoods();
 	},
 	onShow() {
+		this.sysTime = +this.$method.timest();
 		if(this.itemIndex !== '') {
 			if(this.current == 0) {
 				this.refreshByIndex();
@@ -197,7 +200,7 @@ export default {
 				}
 			});
 		},
-		jumpPage(v, int,index) {
+		jumpPage(v, int,index,appoint) {
 			this.itemIndex = index;
 			//int 1.课程学习 2.预约考试 3.进入刷题 4.查看详情 5.重修目录
 			if (int === 1) {
@@ -206,7 +209,8 @@ export default {
 			if (int === 2) {
 				var data = {
 					goodsId: v.goodsId,
-					gradeId: v.gradeId
+					gradeId: v.gradeId,
+					applyId:appoint.applyId
 				};
 				this.$api.getApplysubscribe(data).then(res => {
 					if (res.data.code === 500) {
@@ -219,13 +223,14 @@ export default {
 						this.$navTo.togo('/pages2/appointment/index', {
 							goodsId: v.goodsId,
 							gradeId: v.gradeId,
-							orderGoodsId:v.orderGoodsId
+							orderGoodsId:v.orderGoodsId,
+							applyId:appoint.applyId
 						});
 					}
 				});
 			}
 			if (int === 3) {
-				this.appBeforeAddress(v.goodsId)
+				this.appBeforeAddress(v)
 			}
 			if (int === 4) {
 
@@ -259,10 +264,10 @@ export default {
 				this.loading = false;
 			})
 		},
-		appBeforeAddress(goodsId) {
+		appBeforeAddress(v) {
 			this.$api.appBeforeAddress({
-				goodsId,
-				orderGoodsId:this.orderGoodsId
+				goodsId:v.goodsId,
+				orderGoodsId:v.orderGoodsId
 			}).then(res => {
 				if(res.data.code == 200) {
 					uni.navigateToMiniProgram({

+ 1 - 1
pages2/order/confirm_success.vue

@@ -102,7 +102,7 @@ export default {
 		// 继续本次的考试预约
 		gots(){
 			uni.redirectTo({
-			    url: `/pages2/appointment/index?goodsId=${this.getDatas.goodsId}&gradeId=${this.getDatas.gradeId}&orderGoodsId=${this.getDatas.orderGoodsId}`
+			    url: `/pages2/appointment/index?goodsId=${this.getDatas.goodsId}&gradeId=${this.getDatas.gradeId}&orderGoodsId=${this.getDatas.orderGoodsId}&applyId=${this.getDatas.applyId}`
 			});
 		},
 		goCourse(){

+ 1 - 0
pages2/register/bind.vue

@@ -67,6 +67,7 @@ export default {
 						uni.reLaunch({
 							url:'/pages/index/index'
 						})
+						this.$method.setUuid(new Date().valueOf() + "")
 						that.$api.getInfo().then(resdata => {
 							if(resdata.data.code == 200){
 								that.$store.state.userInfo = resdata.data.data;

+ 1 - 0
pages2/register/register.vue

@@ -433,6 +433,7 @@ export default {
 																uni.reLaunch({
 																	url:'/pages/index/index'
 																})
+																this.$method.setUuid(new Date().valueOf() + "")
 															}else{
 																uni.navigateBack();
 															}

+ 181 - 153
pages2/verify/input.vue

@@ -295,7 +295,7 @@
 									<image src="@/static/icon/jy_icon.png" style="width: 168rpx; height: 168rpx;"></image>
 									<text>{{ titleName }}</text>
 								</view>
-								<image v-else :src="form[item.fieldKey]" style="width: 100%; height: 100%;" mode="aspectFit" @click="seePhotos(form[item.fieldKey])"></image>
+								<image v-else :src="$method.splitImgHost(form[item.fieldKey])" style="width: 100%; height: 100%;" mode="aspectFit" @click="seePhotos(form[item.fieldKey])"></image>
 								<u-icon name="close-circle-fill" color="red" size="44" class="optionsAbs" @click="clearWord"></u-icon>
 							</view>
 						</u-form-item>
@@ -332,7 +332,7 @@
 
 <script>
 import * as baseUrls from '@/common/request.js';
-import { mapGetters } from 'vuex';
+import { mapGetters,mapActions } from 'vuex';
 import Handwriting from '@/common/signature.js';
 export default {
 	data() {
@@ -413,13 +413,13 @@ export default {
 						message: '请输入身份证号',
 						trigger: ['change', 'blur']
 					},
-					{
-						validator: (rule, value, callback) => {
-							return this.$u.test.idCard(value);
-						},
-						message: '身份证号不正确',
-						trigger: ['change', 'blur']
-					}
+					// {
+					// 	validator: (rule, value, callback) => {
+					// 		return this.$u.test.idCard(value);
+					// 	},
+					// 	message: '身份证号不正确',
+					// 	trigger: ['change', 'blur']
+					// }
 				],
 				telphone: [
 					{
@@ -427,18 +427,18 @@ export default {
 						message: '请输入手机号码',
 						trigger: ['change', 'blur']
 					},
-					{
-						validator: (rule, value, callback) => {
-							var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
-							if (this.$u.test.mobile(value) || vartest.test(value)) {
-								return true;
-							} else {
-								return false;
-							}
-						},
-						message: '手机号码不正确',
-						trigger: ['change', 'blur']
-					}
+					// {
+					// 	validator: (rule, value, callback) => {
+					// 		var vartest = /^([0-9]{3,4}-)?[0-9]{7,8}$/;
+					// 		if (this.$u.test.mobile(value) || vartest.test(value)) {
+					// 			return true;
+					// 		} else {
+					// 			return false;
+					// 		}
+					// 	},
+					// 	message: '手机号码不正确',
+					// 	trigger: ['change', 'blur']
+					// }
 				],
 				education: [
 					{
@@ -566,8 +566,8 @@ export default {
 		this.orderGoodsId = Number(option.orderGoodsId)
 		this.goodsId = Number(option.id);
 		this.gradeId = Number(option.gradeId)
+		await this.getInfo();
 		await this.getGoodsDetail()
-		this.getInfo();
 	},
 	onReady(res) {
 		this.handwriting = new Handwriting({
@@ -581,7 +581,7 @@ export default {
 	watch:{
 		userInfo(val, oldVal){//普通的watch监听
 		     if(val){
-				 
+				 console.log(val,'val')
 				 this.listData.forEach(item => {
 				 	if(item.fieldKey == "idcard") {
 				 		this.form.idcard = this.userInfo.idCard;
@@ -598,7 +598,7 @@ export default {
 		 },
 	},
 	methods: {
-		
+		...mapActions(['getUserInfo']),
 		clickIndex(inds){
 			if(inds === 0){
 				this.uploadImgs()
@@ -727,11 +727,16 @@ export default {
 				}).then(res => {
 					this.goodsData = res.data.data;
 					if(this.goodsData.categoryName) {
-						this.form.apply_post = this.goodsData.categoryName;
+						this.$set(this.form,'apply_post',this.goodsData.categoryName)
+						console.log(this.form)
 						if(this.goodsData.categoryName) {
 							this.apply_post_disabled = true;
 						}
 					}
+					
+					if(this.userInfo.companyName) {
+						this.$set(this.form,'work_unit',this.userInfo.companyName)
+					}
 					resolve()
 				})
 			})
@@ -911,6 +916,7 @@ export default {
 																this.isUploading = false;
 																if (res.data.code === 200) {
 																	this.$method.showToast('提交成功');
+																	this.getUserInfo();
 																	uni.navigateBack();
 																} else {
 																	this.$method.showToast(res.data.msg);
@@ -948,6 +954,7 @@ export default {
 																this.isUploading = false;
 																if (res.data.code === 200) {
 																	this.$method.showToast('提交成功');
+																	this.getUserInfo();
 																	uni.navigateBack();
 																} else {
 																	this.$method.showToast(res.data.msg);
@@ -1044,6 +1051,7 @@ export default {
 					this.isUploading = false;
 					if (res.data.code === 200) {
 						this.$method.showToast('提交成功');
+						this.getUserInfo();
 						uni.navigateBack();
 					} else {
 						this.$method.showToast(res.data.msg);
@@ -1081,6 +1089,7 @@ export default {
 					this.isUploading = false;
 					if (res.data.code === 200) {
 						this.$method.showToast('提交成功');
+						this.getUserInfo();
 						uni.navigateBack();
 					} else {
 						this.$method.showToast(res.data.msg);
@@ -1342,144 +1351,163 @@ export default {
 		 */
 		getInfo() {
 			console.log('getInfo')
-			var self = this;
-			this.$api.getbaseprofiletpId(this.goodsId).then(res => {
-				self.listData = JSON.parse(res.data.data.keyValue);
-				var ast = JSON.parse(res.data.data.keyValue2);
-				self.listData = [...self.listData,...ast]
-				console.log(self.listData,'listData')
-				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;
-				});
-				console.log(self.isRequired ,'self.isRequired ')
-				this.$nextTick(() => {
-					this.agreementModal = true;
-				})
-				self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId ,orderGoodsId:self.orderGoodsId}).then(result => {
-					if (result.data.code === 200) {
-						if (!result.data.data) {
-							self.$api.getbaseprofiletplistProfile({ pageNum: 1, pageSize: 1, status: 1 }).then(kit => {
-								if (kit.data.rows.length) {
-									var ajson = JSON.parse(kit.data.rows[0].keyValue);
-									self.listData.forEach((zyitem, zyindex) => {
-										for (let k in ajson) {
-											if (zyitem.fieldKey == k && ajson[k].value) {
-												if (k === 'sex') {
-													const sexIndex = self.dictObj['sys_user_sex'].indexOf(ajson[k].value) + '';
-													self.$set(self.form, k, sexIndex);
-												} else if (k === 'education') {
-													const sexIndex = self.dictObj['edu_level'].indexOf(ajson[k].value) + '';
-													self.$set(self.form, k, sexIndex);
-												} else if (k === 'working_years') {
-													const sexIndex = self.dictObj['working_years'].indexOf(ajson[k].value) + '';
-													self.$set(self.form, k, sexIndex);
-												} else if (k === 'recent_photos') {
-													self.$set(self.form, k, ajson[k].value);
-													if (ajson[k].value) {
-														self.fileList1 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
-													}
-												} else if (k === 'idcard_face_photo') { 
-													self.$set(self.form, k, ajson[k].value);
-													if (ajson[k].value) {
-														self.fileList2 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
-													}
-												} else if (k === 'idcard_national_photo') {
-													self.$set(self.form, k, ajson[k].value);
-													if (ajson[k].value) {
-														self.fileList3 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
-													}
-												} else {
-													if(k === 'name'){
-														self.$set(self.form, k, this.$store.state.userInfo.realname);
-													} else if(k === 'idcard'){
-														self.$set(self.form, k, this.$store.state.userInfo.idCard);
-													} else if(k === 'telphone'){
-														self.$set(self.form, k, this.$store.state.userInfo.telphone);
-													} else if(k !== 'commitment_electr_signature'){
+			return new Promise(resolve => {
+				var self = this;
+				this.$api.getbaseprofiletpId(this.goodsId).then(res => {
+					self.listData = JSON.parse(res.data.data.keyValue);
+					var ast = JSON.parse(res.data.data.keyValue2);
+					self.listData = [...self.listData,...ast]
+					console.log(self.listData,'listData')
+					self.listData.forEach(item => {
+						if(item.fieldKey == "idcard") {
+							console.log(this.userInfo.idCard,'this.userInfo.idCard')
+							this.form.idcard = this.userInfo.idCard;
+							console.log(this.form.idcard)
+						}
+						if(item.fieldKey == "telphone") {
+							console.log(this.userInfo.telphone,'this.userInfo.telphone')
+							this.form.telphone = this.userInfo.telphone;
+							console.log(this.form.telphone)
+						}
+						
+						if(item.fieldKey == "name") {
+							console.log(this.userInfo.realname,'this.userInfo.realname')
+							this.form.name = this.userInfo.realname
+							console.log(this.form.name)
+						}
+					})
+					self.isRequired = self.listData.every(ims => {
+						return ims.required === false;
+					});
+					console.log(self.isRequired ,'self.isRequired ')
+					this.$nextTick(() => {
+						this.agreementModal = true;
+					})
+					self.$api.getbaseprofiletpgetInfo({ goodsId: self.goodsId ,orderGoodsId:self.orderGoodsId}).then(result => {
+						if (result.data.code === 200) {
+							if (!result.data.data) {
+								self.$api.getbaseprofiletplistProfile({ pageNum: 1, pageSize: 1, status: 1 }).then(kit => {
+									if (kit.data.rows.length) {
+										var ajson = JSON.parse(kit.data.rows[0].keyValue);
+										self.listData.forEach((zyitem, zyindex) => {
+											for (let k in ajson) {
+												if (zyitem.fieldKey == k && ajson[k].value) {
+													if (k === 'sex') {
+														const sexIndex = self.dictObj['sys_user_sex'].indexOf(ajson[k].value) + '';
+														self.$set(self.form, k, sexIndex);
+													} else if (k === 'education') {
+														const sexIndex = self.dictObj['edu_level'].indexOf(ajson[k].value) + '';
+														self.$set(self.form, k, sexIndex);
+													} else if (k === 'working_years') {
+														const sexIndex = self.dictObj['working_years'].indexOf(ajson[k].value) + '';
+														self.$set(self.form, k, sexIndex);
+													} else if (k === 'recent_photos') {
+														self.$set(self.form, k, ajson[k].value);
+														if (ajson[k].value) {
+															self.fileList1 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
+														}
+													} else if (k === 'idcard_face_photo') { 
 														self.$set(self.form, k, ajson[k].value);
+														if (ajson[k].value) {
+															self.fileList2 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
+														}
+													} else if (k === 'idcard_national_photo') {
+														self.$set(self.form, k, ajson[k].value);
+														if (ajson[k].value) {
+															self.fileList3 = [{ url: baseUrls.BASE_IMG_URL + ajson[k].value }];
+														}
+													} else {
+														if(k === 'name'){
+															self.$set(self.form, k, this.$store.state.userInfo.realname);
+														} else if(k === 'idcard'){
+															self.$set(self.form, k, this.$store.state.userInfo.idCard);
+														} else if(k === 'telphone'){
+															self.$set(self.form, k, this.$store.state.userInfo.telphone);
+														} else if(k !== 'commitment_electr_signature'){
+															self.$set(self.form, k, ajson[k].value);
+														}
 													}
 												}
 											}
-										}
-									});
-								}
-							});
-						}
-						console.log(result.data.data,'result.data.data')
-						if (result.data.data && result.data.data.status === 3) {
-							self.remark = result.data.data.text;
-							self.remarkStatus = true;
-							self.id = result.data.data.id;
-							console.log(result.data.data,'result.data.data')
-							var arrays = JSON.parse(result.data.data.keyValue);
-							// var arrays1 = JSON.parse(result.data.data.keyValue2);
-							self.copyData = JSON.parse(JSON.stringify(arrays));
-							for (let k in arrays) {
-								if (k === 'sex') {
-									if (arrays[k].value) {
-										const sexIndex = self.dictObj['sys_user_sex'].indexOf(arrays[k].value) + '';
-										self.$set(self.form, k, sexIndex);
-									}
-								} else if (k === 'education') {
-									if (arrays[k].value) {
-										const sexIndex = self.dictObj['edu_level'].indexOf(arrays[k].value) + '';
-										self.$set(self.form, k, sexIndex);
-									}
-								} else if (k === 'working_years') {
-									if (arrays[k].value) {
-										const sexIndex = self.dictObj['working_years'].indexOf(arrays[k].value) + '';
-										self.$set(self.form, k, sexIndex);
-									}
-								} else if (k === 'recent_photos') {
-									self.$set(self.form, k, arrays[k].value);
-									if (arrays[k].value) {
-										self.fileList1 = [{ url: baseUrls.BASE_IMG_URL + arrays[k].value }];
-									}
-								} else if (k === 'idcard_face_photo') {
-									self.$set(self.form, k, arrays[k].value);
-									if (arrays[k].value) {
-										self.fileList2 = [{ url: baseUrls.BASE_IMG_URL + arrays[k].value }];
-									}
-								} else if (k === 'idcard_national_photo') {
-									self.$set(self.form, k, arrays[k].value);
-									if (arrays[k].value) {
-										self.fileList3 = [{ url: baseUrls.BASE_IMG_URL + arrays[k].value }];
+										});
+										resolve()
+									} else {
+										resolve()
 									}
-								} else {
-									self.$set(self.form, k, arrays[k].value);
-								}
+								});
 							}
-						} else if (result.data.data && (result.data.data.status === 1 || result.data.data.status === 2)) {
-							uni.showModal({
-								showCancel: false,
-								content:
-									result.data.data.status === 1
-										? '该商品审核资料已通过,不可重复提交资料'
-										: result.data.data.status === 2
-										? '该商品审核资料处于待审核状态,不可重复提交资料'
-										: '请联系管理员',
-								success: function(k) {
-									if (k.confirm) {
-										uni.navigateBack();
+							console.log(result.data.data,'result.data.data')
+							if (result.data.data && result.data.data.status === 3) {
+								self.remark = result.data.data.text;
+								self.remarkStatus = true;
+								self.id = result.data.data.id;
+								console.log(result.data.data,'result.data.data')
+								var arrays = JSON.parse(result.data.data.keyValue);
+								// var arrays1 = JSON.parse(result.data.data.keyValue2);
+								self.copyData = JSON.parse(JSON.stringify(arrays));
+								for (let k in arrays) {
+									if (k === 'sex') {
+										if (arrays[k].value) {
+											const sexIndex = self.dictObj['sys_user_sex'].indexOf(arrays[k].value) + '';
+											self.$set(self.form, k, sexIndex);
+										}
+									} else if (k === 'education') {
+										if (arrays[k].value) {
+											const sexIndex = self.dictObj['edu_level'].indexOf(arrays[k].value) + '';
+											self.$set(self.form, k, sexIndex);
+										}
+									} else if (k === 'working_years') {
+										if (arrays[k].value) {
+											const sexIndex = self.dictObj['working_years'].indexOf(arrays[k].value) + '';
+											self.$set(self.form, k, sexIndex);
+										}
+									} else if (k === 'recent_photos') {
+										self.$set(self.form, k, arrays[k].value);
+										if (arrays[k].value) {
+											self.fileList1 = [{ url: baseUrls.BASE_IMG_URL + arrays[k].value }];
+										}
+									} else if (k === 'idcard_face_photo') {
+										self.$set(self.form, k, arrays[k].value);
+										if (arrays[k].value) {
+											self.fileList2 = [{ url: baseUrls.BASE_IMG_URL + arrays[k].value }];
+										}
+									} else if (k === 'idcard_national_photo') {
+										self.$set(self.form, k, arrays[k].value);
+										if (arrays[k].value) {
+											self.fileList3 = [{ url: baseUrls.BASE_IMG_URL + arrays[k].value }];
+										}
+									} else if(k === 'name'){
+										self.$set(self.form, k, this.$store.state.userInfo.realname);
+									} else if(k === 'idcard'){
+										self.$set(self.form, k, this.$store.state.userInfo.idCard);
+									} else if(k === 'telphone'){
+										self.$set(self.form, k, this.$store.state.userInfo.telphone);
+									}else {
+										self.$set(self.form, k, arrays[k].value);
 									}
 								}
-							});
+								resolve()
+							} else if (result.data.data && (result.data.data.status === 1 || result.data.data.status === 2)) {
+								uni.showModal({
+									showCancel: false,
+									content:
+										result.data.data.status === 1
+											? '该商品审核资料已通过,不可重复提交资料'
+											: result.data.data.status === 2
+											? '该商品审核资料处于待审核状态,不可重复提交资料'
+											: '请联系管理员',
+									success: function(k) {
+										if (k.confirm) {
+											uni.navigateBack();
+										}
+									}
+								});
+							}
 						}
-					}
+					});
 				});
-			});
+			})
+			
 		},
 		bindPickerChange(key, e) {
 			this.$set(this.form, key, e.detail.value);

+ 89 - 66
pages2/wd/class.vue

@@ -14,7 +14,7 @@
 						课程
 						<text class="content">{{ item.secAllNum+item.examNum }}</text>
-						<text class="content">{{ item.classHours }}</text>
+						<text class="content">{{ item.classHours || '-'}}</text>
 						学时
 					</view>
 					<view class="content_box" v-if="item.serviceStartTime && item.serviceEndTime">
@@ -200,21 +200,23 @@
 
 						<view>
 							<u-button
-								:class="{disabled:(item.interfacePushId > 0 && item.officialStatus != 1) || sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart)}"
+								:class="{disabled:sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (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 && !((item.interfacePushId > 0 && item.officialStatus != 1) || sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
-						<view style="flex:1;margin-right:10rpx;">
-							<text style="color: #333333;">{{ item.applyName }}</text>
-						</view>
-						<view>
-							<u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item)">预约考试
-							</u-button>
+					<template v-for="(appoint,appointIndex) in item.examApplyGoodsList">
+						<view class="box_progress" :key="appointIndex" v-if="item.applyStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
+							<view style="flex:1;margin-right:10rpx;">
+								<text style="color: #333333;">{{ appoint.applyName }}</text>
+							</view>
+							<view>
+								<u-button :plain="true" type="primary" size="mini" @click.stop="appointment(item,appoint)">预约考试
+								</u-button>
+							</view>
 						</view>
-					</view>
-					<view class="box_progress" v-if="item.beforeStatus === 1 && !((item.interfacePushId > 0 && item.officialStatus != 1) || sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
+					</template>
+					<view class="box_progress" v-if="item.beforeStatus === 1 && !( sysTime <= item.serviceStartTime || sysTime >= item.serviceEndTime || (item.classStartTime && sysTime <= item.classStartTime) || (item.classEndTime && sysTime >= item.classEndTime) || item.learningStatus == 2 || item.classStatus == 0 || (item.learningStatus == 3 && sysTime < item.learningTimeStart))">
 						<view style="flex:1;margin-right:10rpx;">
 							<text style="color: #2979ff;">{{ item.beforeName }}</text>
 						</view>
@@ -315,7 +317,7 @@
 </template>
 
 <script>
-	import {mapGetters} from 'vuex'
+	import {mapGetters,mapActions} from 'vuex'
 	export default {
 		computed:{
 			...mapGetters(['userInfo'])
@@ -345,14 +347,15 @@
 			};
 		},
 		onLoad(option) {
-			this.sysTime = +this.$method.timest();
+			// this.sysTime = +this.$method.timest();
 			this.courseGoodsList();
 		},
-		onShow() {
+		async onShow() {
+			this.getUserInfo()
 			if (this.itemIndex !== '') {
 				this.refreshByIndex();
 			}
-			// this.commonSystemTime()
+			await this.commonSystemTime()
 			this.sysTime = +this.$method.timest();
 		},
 		onReachBottom() {
@@ -362,6 +365,7 @@
 			}
 		},
 		methods: {
+			...mapActions(['getUserInfo']),
 			/**
 			 * 复制网址
 			 */
@@ -388,8 +392,10 @@
 				});
 			},
 			commonSystemTime() {
-				this.$api.commonSystemTime().then(res => {
-					this.sysTime = res.data.data;
+				return new Promise(resolve => {
+					this.$api.commonSystemTime().then(res => {
+						this.sysTime = res.data.data;
+					})
 				})
 			},
 			selectClass(item, index) {
@@ -423,13 +429,14 @@
 						} else {
 							
 							if(res.data.data.pushInfo) {
-								resolve()
+								resolve(true)
 							} else {
 								uni.showModal({
 									showCancel:false,
 									title:'提示',
 									content:'开通信息推送不成功,无法进入学习,请联系020-87085982!'
 								})
+								resolve(false)
 							}
 							
 						}
@@ -561,15 +568,7 @@
 
 					return;
 				}
-
-				//内部系统
-				if (item.interfacePushId > 0 && item.officialStatus != 1) {
-					uni.showModal({
-						showCancel: false,
-						content: '机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
-					});
-					return;
-				}
+				
 				if (this.sysTime <= item.serviceStartTime || this.sysTime >= item.serviceEndTime) {
 					uni.showToast({
 						icon: 'none',
@@ -611,6 +610,26 @@
 					})
 					return;
 				}
+				
+				var confirmDetail = true;
+				if (item.educationName == '继续教育') { 
+					if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') { 
+						confirmDetail = await this.userConfirmInfoDetail()
+					}
+				}
+				
+				if(!confirmDetail) {
+					return;
+				}
+				
+				// //内部系统
+				// if (item.interfacePushId > 0 && item.officialStatus != 1) {
+				// 	uni.showModal({
+				// 		showCancel: false,
+				// 		content: '机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!'
+				// 	});
+				// 	return;
+				// }
 
 
 				this.itemIndex = index;
@@ -634,9 +653,10 @@
 					return;
 				}
 
-				if (item.educationName == '继续教育') {
+				// if (item.educationName == '继续教育') {
 					this.$api.lockLockStatus({
-						action: 'jxjy'
+						action: 'jxjy',
+						uuid:this.$method.getUuid()
 					}).then(res => {
 						if (res.data.code == 200) { //有其他端在操作,不能学习
 							uni.showToast({
@@ -657,17 +677,17 @@
 									orderGoodsId: item.orderGoodsId,
 								}).then(res => {
 									if (res.data.code == 200) {
-										if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-											this.userConfirmInfoDetail().then(() => {
-													uni.navigateTo({
-															url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-														})
-											})
-										} else {
+										// if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
+										// 	this.userConfirmInfoDetail().then(() => {
+										// 			uni.navigateTo({
+										// 					url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+										// 				})
+										// 	})
+										// } else {
 											uni.navigateTo({
 													url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
 												})
-										}
+										// }
 									
 					  			
 									}
@@ -675,38 +695,38 @@
 								return;
 							}
 							
-							if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
-								// this.userConfirmInfoDetail().then(() => {
-										this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-								// })
-							} else {
+							// if(item.officialName && item.businessName == '二级' && item.projectName == '建造师') {
+							// 	// this.userConfirmInfoDetail().then(() => {
+							// 			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
+							// 	// })
+							// } else {
 								this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
-							}
+							// }
 							
 						}
 					})
-				} else {
-					if (item.courseNum == 1) {
-
-						this.$api.courseCourseList({
-							pageNum: 1,
-							pageSize: 1,
-							goodsId: item.goodsId,
-							gradeId: item.gradeId,
-							orderGoodsId: item.orderGoodsId,
-						}).then(res => {
-							if (res.data.code == 200) {
-								uni.navigateTo({
-										url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
-									})
+				// } else {
+				// 	if (item.courseNum == 1) {
+
+				// 		this.$api.courseCourseList({
+				// 			pageNum: 1,
+				// 			pageSize: 1,
+				// 			goodsId: item.goodsId,
+				// 			gradeId: item.gradeId,
+				// 			orderGoodsId: item.orderGoodsId,
+				// 		}).then(res => {
+				// 			if (res.data.code == 200) {
+				// 				uni.navigateTo({
+				// 						url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
+				// 					})
 								
-							}
-						});
-						return;
-					}
-					this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
+				// 			}
+				// 		});
+				// 		return;
+				// 	}
+				// 	this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
 					
-				}
+				// }
 
 
 			},
@@ -724,10 +744,12 @@
 					})
 				})
 			},
-			appointment(item) {
+			appointment(item,appoint) {
 				var data = {
 					goodsId: item.goodsId,
-					gradeId: item.gradeId
+					gradeId: item.gradeId,
+					applyId:appoint.applyId,
+					orderGoodsId:item.orderGoodsId
 				};
 				this.$api.getApplysubscribe(data).then(res => {
 					if (res.data.code === 500) {
@@ -740,7 +762,8 @@
 						this.$navTo.togo('/pages2/appointment/index', {
 							goodsId: item.goodsId,
 							gradeId: item.gradeId,
-							orderGoodsId: item.orderGoodsId
+							orderGoodsId: item.orderGoodsId,
+							applyId:appoint.applyId
 						});
 					}
 				});

+ 27 - 24
pages2/wd/course.vue

@@ -129,10 +129,11 @@ export default {
 				
         this.$api.courseDetail(item.courseId).then((res) => {
           if (res.data.code == 200) {
-            if (res.data.data.educationName == "继续教育") {
+            // if (res.data.data.educationName == "继续教育") {
               this.$api
                 .lockLockStatus({
                   action: "jxjy",
+                  uuid:this.$method.getUuid()
                 })
                 .then((res) => {
                   if (res.data.code == 200) {
@@ -154,13 +155,13 @@ export default {
                 });
 
               // websocket.sendMsg("doCourse");
-            } else {
-              this.$navTo.togo("/pages3/polyv/detail", {
-                id: item.courseId,
-                goodsId: this.goodsId,
-                orderGoodsId: this.orderGoodsId,
-              });
-            }
+            // } else {
+            //   this.$navTo.togo("/pages3/polyv/detail", {
+            //     id: item.courseId,
+            //     goodsId: this.goodsId,
+            //     orderGoodsId: this.orderGoodsId,
+            //   });
+            // }
           }
         });
       } else {
@@ -185,10 +186,11 @@ export default {
 
             this.$api.courseDetail(item.courseId).then((res) => {
               if (res.data.code == 200) {
-                if (res.data.data.educationName == "继续教育") {
+                // if (res.data.data.educationName == "继续教育") {
                   this.$api
                     .lockLockStatus({
                       action: "jxjy",
+											uuid:this.$method.getUuid()
                     })
                     .then((res) => {
                       if (res.data.code == 200) {
@@ -210,13 +212,13 @@ export default {
                     });
 
                   // websocket.sendMsg("doCourse");
-                } else {
-                  this.$navTo.togo("/pages3/polyv/detail", {
-                    id: item.courseId,
-                    goodsId: this.goodsId,
-                    orderGoodsId: this.orderGoodsId,
-                  });
-                }
+                // } else {
+                //   this.$navTo.togo("/pages3/polyv/detail", {
+                //     id: item.courseId,
+                //     goodsId: this.goodsId,
+                //     orderGoodsId: this.orderGoodsId,
+                //   });
+                // }
               }
             });
           } else {
@@ -239,10 +241,11 @@ export default {
 					
           this.$api.courseDetail(item.courseId).then((res) => {
             if (res.data.code == 200) {
-              if (res.data.data.educationName == "继续教育") {
+              // if (res.data.data.educationName == "继续教育") {
                 this.$api
                   .lockLockStatus({
                     action: "jxjy",
+										uuid:this.$method.getUuid()
                   })
                   .then((res) => {
                     if (res.data.code == 200) {
@@ -264,13 +267,13 @@ export default {
                   });
 
                 // websocket.sendMsg("doCourse");
-              } else {
-								this.$navTo.togo("/pages3/polyv/detail", {
-								  id: item.courseId,
-								  goodsId: this.goodsId,
-								  orderGoodsId: this.orderGoodsId,
-								});
-							}
+       //        } else {
+							// 	this.$navTo.togo("/pages3/polyv/detail", {
+							// 	  id: item.courseId,
+							// 	  goodsId: this.goodsId,
+							// 	  orderGoodsId: this.orderGoodsId,
+							// 	});
+							// }
             }
           });
         }

+ 1 - 1
pages3/course/detail.vue

@@ -29,7 +29,7 @@
 					</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">{{courseList.length}} 课程 {{detail.classHours}}</text> 学时</view>
+						共 <text class="blackFont">{{courseList.length}} 课程 {{detail.classHours || '-'}}</text> 学时</view>
 						
 					</view>
 				</view>

+ 65 - 18
pages3/live/detail.vue

@@ -770,17 +770,51 @@ export default {
 					} else if(res.data.data.sectionType == 2) { //直播
 						this.studyRecordGetLastLive();
 					} else if(res.data.data.sectionType == 3) { //回放
-					this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
-					this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
+						this.$store.commit("setPlaySectionId", { playSectionId: res.data.data.sectionId });
+						this.$store.commit("setPlayVID", { playVID: res.data.data.recordingUrl });
 						this.sectionItem = res.data.data;
 						this.polyvLiveHistoryChatMsgList();
+						if(!res.data.data.recordingUrl) {
+							return;
+						}
 						this.playVideo(res.data.data)
 					}
 					
 				}
 			})
 		},
-    goLive(item) {
+    async goLive(item) {
+			let data = await this.studyRecordGetChannelBasicInfo(item.liveUrl);
+			let nowTime = +this.$method.timest();
+			
+			if (item.liveStartTime > nowTime) {
+				if (data.watchStatus == "end" || data.watchStatus == "playback") {
+					uni.showToast({
+						title: '直播未开始',
+						icon: 'none'
+					});
+					return;
+				}
+			} else if (
+				item.liveStartTime < nowTime &&
+				item.liveEndTime > nowTime
+			) {
+				if (data.watchStatus == "end" || data.watchStatus == "playback") {
+					uni.showToast({
+						title: '暂无直播',
+						icon: 'none'
+					});
+					return;
+				}
+			} else if (item.liveEndTime < nowTime) {
+				if (data.watchStatus == "end" || data.watchStatus == "playback") {
+					uni.showToast({
+						title: '直播已结束',
+						icon: 'none'
+					});
+					return;
+				}
+			}
 			let moduleId = item.moduleId || 0;
 			let chapterId = item.chapterId || 0;
 			let sectionId = item.sectionId || item.menuId;
@@ -800,6 +834,17 @@ export default {
 				this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
 			})
 		},
+		studyRecordGetChannelBasicInfo(channelId) {
+			return new Promise((resolve) => {
+				this.$api
+					.studyRecordGetChannelBasicInfo({
+						channelId,
+					})
+					.then((res) => {
+						resolve(res.data.data);
+					});
+			});
+		},
 		polyvLiveHistoryChatMsgList() {
 			this.$api.polyvLiveHistoryChatMsgList({
 				sectionId:this.playSectionId,
@@ -1871,22 +1916,24 @@ export default {
       let self = this;
       this.$api.courseDetail(this.courseId).then((res) => {
         if (res.data.code == 200) {
-          if (res.data.data.educationName == "继续教育") {
-            // this.$api
-            //   .lockLockAction({
-            //     action: "jxjy",
-            //   })
-            //   .then((res) => {});
-            // this.lockTimer = setInterval(() => {
-            //   this.$api
-            //     .lockLockAction({
-            //       action: "jxjy",
-            //     })
-            //     .then((res) => {});
-            // }, 10000);
+          // if (res.data.data.educationName == "继续教育") {
+            this.$api
+              .lockLockAction({
+                action: "jxjy",
+								uuid:this.$method.getUuid()
+              })
+              .then((res) => {});
+            this.lockTimer = setInterval(() => {
+              this.$api
+                .lockLockAction({
+                  action: "jxjy",
+									uuid:this.$method.getUuid()
+                })
+                .then((res) => {});
+            }, 10000);
 
-            // websocket.sendMsg("doCourse");
-          }
+            websocket.sendMsg("doCourse");
+          // }
           self.detail = res.data.data;
         }
       });

+ 218 - 0
pages3/live/playback.vue

@@ -0,0 +1,218 @@
+<template>
+	<view>
+		<nav-bar title="回放"></nav-bar>
+		<view class="videoBox" >
+			<view >
+				<view class="video_box" style="width: 100%;height: 460rpx;">
+					<polyv-player
+						id="playerVideo"
+						playerId="playerVideo"
+						height="460rpx"
+						:vid="vid"
+						:showSettingBtn="true"
+						:enablePlayGesture="true"
+						:playbackRate="playbackRate"
+						:isAllowSeek="isAllowSeek"
+						:autoplay="autoplay"
+					></polyv-player>
+				</view>
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+import { mapGetters,mapMutations  } from 'vuex';
+export default {
+	data() {
+		return {
+			id:0,
+			list: [],
+			menuIndex:[],
+			current:0,
+			detail:{},
+			courseList:[],
+			menuList:[],
+			freeMenuList:[],
+			startStatus:false,
+			playbackRate: [1.0,1.5,2.0],
+			isAllowSeek:'yes',
+			vid:'',
+			autoplay:true,
+		};
+	},
+	computed: { ...mapGetters(['userInfo']) },
+	onLoad(option) {
+		this.vid = option.vid;
+	},
+	mounted() {
+		
+	},
+	methods: {
+		 
+	}
+};
+</script>
+<style >
+	page{
+		background-color: #EAEEF1;
+	}
+</style>
+<style scope>
+	.video_t2 {
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+	.video_t1 {
+		height: 80rpx;
+		color: #333333;
+		line-height: 80rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+		overflow: hidden;
+		text-overflow:ellipsis;
+		white-space: nowrap;
+	}
+	.video_t1_t {
+		display: flex;
+		flex-direction: column;
+		height: 80rpx;
+		color: #333333;
+		text-align: center;
+		align-items: center;
+		border-left: solid 1px #d6d6db;
+	}
+	.video_play {
+		position: absolute;
+		width: 95rpx;
+		height: 95rpx;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		margin: auto;
+	}
+	.video_box {
+		position: relative;
+	}
+	.courseName{
+		white-space:nowrap;
+		overflow:hidden;
+		text-overflow:ellipsis; 
+	}
+	.videoBox{
+		background-color: #FFFFFF;
+		width: 100%;
+		/* height: 680rpx; */
+		z-index: 999;
+	}
+	.icon_up{
+		width: 32rpx;
+		height: 32rpx;
+	}
+	.contentBox{
+		
+	}
+	.courseItemBox{
+		background: #FFFFFF;
+		border-radius: 16rpx;
+		padding: 0 10rpx;
+		margin-bottom: 20rpx;
+	}
+	.courseItem{
+		height: 80rpx;
+		color: #333333;
+		font-size: 32rpx;
+		line-height: 80rpx;
+		font-weight: bold;
+		display: flex;
+		justify-content: space-between;
+
+	}
+	.content{
+		background-color: #FFFFFF;
+		width: 100%;
+	}
+	.btn2{
+		width: 200rpx;
+		height: 64rpx;
+		background: linear-gradient(0deg, #FFB102, #FD644F);
+		box-shadow: 0rpx 10rpx 16rpx 4rpx rgba(1, 99, 235, 0.04);
+		border-radius: 32rpx;
+		line-height: 64rpx;
+		text-align: center;
+	}
+	.btn1{
+		width: 200rpx;
+		height: 64rpx;
+		background: linear-gradient(0deg, #015EEA, #00C0FA);
+		border-radius: 32rpx;
+		line-height: 64rpx;
+		text-align: center;
+		margin-right: 20rpx;
+	}
+	.bottomBox{
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		left: 0;
+		height:98rpx ;
+		background-color: #FFFFFF;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30rpx;
+	}
+	.blackFont{
+		color: #333333;
+		margin: 0 4rpx;
+	}
+	.wk_icon{
+		width: 24rpx;
+		height: 24rpx;
+		margin-right: 12rpx;
+	}
+	.noteTag{
+		ont-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+		align-items: center;
+	}
+	.priceTag{
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FF2D55;
+	}
+	.titleTag{
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #333333;
+		margin-left: 8rpx;
+	}
+	.yearTag{
+		width: 80rpx;
+		height: 32rpx;
+		background: #EBF5FF;
+		border: 2rpx solid #007AFF;
+		border-radius: 16rpx;
+		font-size: 24rpx;
+		color: #007AFF;
+		text-align: center;
+		line-height: 32rpx;
+	}
+	.itemBox{
+		background: #FFFFFF;
+		box-shadow: 0rpx 10rpx 9rpx 1rpx rgba(165, 196, 239, 0.1);
+		border-radius: 24rpx;
+		width: 100%;
+		padding: 20rpx;
+		margin-bottom: 20rpx;
+	}
+</style>

+ 237 - 164
pages3/polyv/detail.vue

@@ -491,6 +491,7 @@
     <u-popup
       v-model="noticeShow"
       class="notice_modal"
+			@close="closeNotice"
       mode="center"
       border-radius="14"
       width="700rpx"
@@ -614,6 +615,7 @@ export default {
 			isFocus:false,
 			clearTimer:null,
 			livingItem:'',
+			option:null,
     };
   },
   computed: {
@@ -623,34 +625,35 @@ export default {
     this.courseId = Number(option.id);
     this.goodsId = Number(option.goodsId);
     this.orderGoodsId = Number(option.orderGoodsId) || '';
-    this.courseDetail();
-    this.getGoodsDetail();
-    this.getAnswerList();
-		this.studyRecordMenuAllList();
-    this.answerTimer = setInterval(() => {
-      this.getAnswerList();
-    }, 5000);
-    let noteSecond = Number(option.noteSecond);
-    if (noteSecond > 0) {
-      //我的消息跳过来,播放节
-      let item = {
-        sectionId: Number(option.sectionId),
-        recordingUrl: option.recordingUrl,
-        noteSecond: noteSecond,
-        studyDuration: noteSecond,
-      };
-      let playNextId = `moduleId${option.moduleId}chapterId${
-        option.chapterId
-      }sectionId${option.sectionId}${option.isRebuild ? "isRebuild" : ""}`;
-      this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
-      this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
-      this.$store.commit("updatePlayNextId", playNextId);
-      console.log("this.playNoteVideo");
+		this.option = option
+  //   this.courseDetail();
+  //   this.getGoodsDetail();
+  //   this.getAnswerList();
+		// this.studyRecordMenuAllList();
+  //   this.answerTimer = setInterval(() => {
+  //     this.getAnswerList();
+  //   }, 5000);
+  //   let noteSecond = Number(option.noteSecond);
+  //   if (noteSecond > 0) {
+  //     //我的消息跳过来,播放节
+  //     let item = {
+  //       sectionId: Number(option.sectionId),
+  //       recordingUrl: option.recordingUrl,
+  //       noteSecond: noteSecond,
+  //       studyDuration: noteSecond,
+  //     };
+  //     let playNextId = `moduleId${option.moduleId}chapterId${
+  //       option.chapterId
+  //     }sectionId${option.sectionId}${option.isRebuild ? "isRebuild" : ""}`;
+  //     this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
+  //     this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
+  //     this.$store.commit("updatePlayNextId", playNextId);
+  //     console.log("this.playNoteVideo");
 			
-			this.playNoteVideo(item)
-    } else {
-			this.studyRecordQueryLiveLast();
-		}
+		// 	this.playNoteVideo(item)
+  //   } else {
+		// 	this.studyRecordQueryLiveLast();
+		// }
   },
   onShow() {
     var self = this;
@@ -659,14 +662,39 @@ export default {
 			
 		// })
 		
-		this.getbaseprofiletplists();
+		this.getbaseprofiletplists().then(res => {
+			this.courseDetail();
+			this.getGoodsDetail();
+			this.getAnswerList();
+			this.studyRecordMenuAllList();
+			this.answerTimer = setInterval(() => {
+			  this.getAnswerList();
+			}, 5000);
+			let noteSecond = Number(this.option.noteSecond);
+			if (noteSecond > 0) {
+			  //我的消息跳过来,播放节
+			  let item = {
+			    sectionId: Number(this.option.sectionId),
+			    recordingUrl: this.option.recordingUrl,
+			    noteSecond: noteSecond,
+			    studyDuration: noteSecond,
+			  };
+			  let playNextId = `moduleId${this.option.moduleId}chapterId${
+			    this.option.chapterId
+			  }sectionId${this.option.sectionId}${this.option.isRebuild ? "isRebuild" : ""}`;
+			  this.$store.commit("setPlaySectionId", { playSectionId: item.sectionId });
+			  this.$store.commit("setPlayVID", { playVID: item.recordingUrl });
+			  this.$store.commit("updatePlayNextId", playNextId);
+			  console.log("this.playNoteVideo");
+				
+				this.playNoteVideo(item)
+			} else {
+				this.studyRecordQueryLiveLast();
+			}
+		});
     
     console.log(this.gradeId, 7512);
-    if (this.gradeId > 0) {
-      //提交完资料返回判断是否已开班
-
-      this.getGradeInfo();
-    }
+    
   },
 	onHide() {
 		
@@ -695,6 +723,7 @@ export default {
       this.$api
         .lockDelLock({
           action: "jxjy",
+					uuid:this.$method.getUuid()
         })
         .then((res) => {});
     }
@@ -750,6 +779,22 @@ export default {
   },
   methods: {
     ...mapMutations(["updateChapterOpen","updateLiveLast"]),
+		closeNotice() {
+			this.$api.baseHandoutTip({
+				orderGoodsId:this.orderGoodsId
+			}).then(res => {
+				
+			})
+		},
+		baseHandoutTipList() {
+			this.$api.baseHandoutTipList({
+				orderGoodsId:this.orderGoodsId
+			}).then(res => {
+				if(res.data.rows.length == 0) {
+					this.noticeShow = true;
+				}
+			})
+		},
 		/**
 		 * 获取上次观看的直播
 		 */
@@ -993,135 +1038,158 @@ export default {
 			})
 		},
 		getbaseprofiletplists() {
-			let self = this;
-			this.getCameraSetting();
-			this.$api.getbaseprofiletplists({ goodsId: self.goodsId,orderGoodsId: this.orderGoodsId, }).then((res) => {
-			  console.log(res, "res1");
-			  if (res.data.code === 200 && res.data.rows.length) {
-			    if (res.data.rows[0].keyValue) {
-			      self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
-			        if (baseRes.data.code === 200) {
-			          if (baseRes.data.data) {
-			            self.$api
-			              .getbaseprofiletpgetInfo({
-			                goodsId: self.goodsId,
-			                orderGoodsId: self.orderGoodsId,
-			              })
-			              .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) {
-			                      self.needProfileModal = true;
-			                      uni.showModal({
-			                        content: "请前往填写资料",
-			                        cancelText: "返回",
-			                        success: function (resultst) {
-			                          if (resultst.confirm) {
-			                            self.$navTo.togo("/pages2/verify/input", {
-			                              id: self.goodsId,
-			                              orderGoodsId: self.orderGoodsId,
-			                            });
-			                          }
-			                          if (resultst.cancel) {
-			                            uni.navigateBack();
-			                          }
-			                        },
-			                      });
-			                    } else {
-			                      self.needProfileModal = true;
-			                      uni.showModal({
-			                        content: "资料审核不通过,请前往重新填写",
-			                        cancelText: "返回",
-			                        success: function (resultst) {
-			                          if (resultst.confirm) {
-			                            self.$navTo.togo("/pages2/verify/input", {
-			                              id: self.goodsId,
-			                              orderGoodsId: self.orderGoodsId,
-			                            });
-			                          }
-			                          if (resultst.cancel) {
-			                            uni.navigateBack();
-			                          }
-			                        },
-			                      });
-			                    }
-			                  } 
-												
-												// else if (
-			         //            result.data.data.status === 1 &&
-			         //            JSON.parse(res.data.rows[0].keyValue2)[0]
-			         //          ) {
-			         //            self.$api
-			         //              .getbaseprofileStampgetInfo({
-			         //                goodsId: self.goodsId,
-			         //                orderGoodsId: self.orderGoodsId,
-			         //              })
-			         //              .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) {
-			         //                      self.needProfileModal = true;
-			         //                      uni.showModal({
-			         //                        cancelText: "返回",
-			         //                        content: "请前往填写盖章资料",
-			         //                        success: function (resultst) {
-			         //                          if (resultst.confirm) {
-			         //                            self.$navTo.togo(
-			         //                              "/pages2/verify/input2",
-			         //                              {
-			         //                                id: self.goodsId,
-			         //                                orderGoodsId: self.orderGoodsId,
-			         //                              }
-			         //                            );
-			         //                          }
-			         //                          if (resultst.cancel) {
-			         //                            uni.navigateBack();
-			         //                          }
-			         //                        },
-			         //                      });
-			         //                    } else {
-			         //                      self.needProfileModal = true;
-			         //                      uni.showModal({
-			         //                        cancelText: "返回",
-			         //                        content:
-			         //                          "资料盖章审核不通过,请前往重新填写",
-			         //                        success: function (resultst) {
-			         //                          if (resultst.confirm) {
-			         //                            self.$navTo.togo(
-			         //                              "/pages2/verify/input2",
-			         //                              {
-			         //                                id: self.goodsId,
-			         //                                orderGoodsId: self.orderGoodsId,
-			         //                              }
-			         //                            );
-			         //                          }
-			         //                          if (resultst.cancel) {
-			         //                            uni.navigateBack();
-			         //                          }
-			         //                        },
-			         //                      });
-			         //                    }
-			         //                  }
-			         //                }
-			         //              });
-			         //          }
-			                }
-			              });
-			          }
-			        }
-			      });
-			    }
-			  }
-			});
+			return new Promise(resolve => {
+				let self = this;
+				this.getCameraSetting();
+				this.$api.getbaseprofiletplists({ goodsId: self.goodsId,orderGoodsId: this.orderGoodsId, }).then((res) => {
+				  console.log(res, "res1");
+				  if (res.data.code === 200 && res.data.rows.length) {
+				    if (res.data.rows[0].keyValue) {
+				      self.$api.getbaseprofiletpId(self.goodsId).then((baseRes) => {
+				        if (baseRes.data.code === 200) {
+				          if (baseRes.data.data) {
+				            self.$api
+				              .getbaseprofiletpgetInfo({
+				                goodsId: self.goodsId,
+				                orderGoodsId: self.orderGoodsId,
+				              })
+				              .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) {
+				                      self.needProfileModal = true;
+				                      uni.showModal({
+				                        content: "请前往填写资料",
+				                        cancelText: "返回",
+				                        success: function (resultst) {
+				                          if (resultst.confirm) {
+				                            self.$navTo.togo("/pages2/verify/input", {
+				                              id: self.goodsId,
+				                              orderGoodsId: self.orderGoodsId,
+				                            });
+				                          }
+				                          if (resultst.cancel) {
+				                            uni.navigateBack();
+				                          }
+				                        },
+				                      });
+				                    } else {
+				                      self.needProfileModal = true;
+				                      uni.showModal({
+				                        content: "资料审核不通过,请前往重新填写",
+				                        cancelText: "返回",
+				                        success: function (resultst) {
+				                          if (resultst.confirm) {
+				                            self.$navTo.togo("/pages2/verify/input", {
+				                              id: self.goodsId,
+				                              orderGoodsId: self.orderGoodsId,
+				                            });
+				                          }
+				                          if (resultst.cancel) {
+				                            uni.navigateBack();
+				                          }
+				                        },
+				                      });
+				                    }
+				                  }  
+													
+													else if (
+				                    result.data.data.status === 1 &&
+				                    JSON.parse(res.data.rows[0].keyValue2)[0]
+				                  ) {
+				                    self.$api
+				                      .getbaseprofileStampgetInfo({
+				                        goodsId: self.goodsId,
+				                        orderGoodsId: self.orderGoodsId,
+				                      })
+				                      .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) {
+				                              self.needProfileModal = true;
+				                              uni.showModal({
+				                                cancelText: "返回",
+				                                content: "请前往填写盖章资料",
+				                                success: function (resultst) {
+				                                  if (resultst.confirm) {
+				                                    self.$navTo.togo(
+				                                      "/pages2/verify/input2",
+				                                      {
+				                                        id: self.goodsId,
+				                                        orderGoodsId: self.orderGoodsId,
+				                                      }
+				                                    );
+				                                  }
+				                                  if (resultst.cancel) {
+				                                    uni.navigateBack();
+				                                  }
+				                                },
+				                              });
+				                            } else {
+				                              self.needProfileModal = true;
+				                              uni.showModal({
+				                                cancelText: "返回",
+				                                content:
+				                                  "资料盖章审核不通过,请前往重新填写",
+				                                success: function (resultst) {
+				                                  if (resultst.confirm) {
+				                                    self.$navTo.togo(
+				                                      "/pages2/verify/input2",
+				                                      {
+				                                        id: self.goodsId,
+				                                        orderGoodsId: self.orderGoodsId,
+				                                      }
+				                                    );
+				                                  }
+				                                  if (resultst.cancel) {
+				                                    uni.navigateBack();
+				                                  }
+				                                },
+				                              });
+				                            }
+				                          } else {
+																		
+																			resolve();
+																	}
+				                        }
+				                      });
+				                  } else {
+														
+															resolve();
+													}
+				                }
+				              });
+				          } else {
+										
+											resolve();
+									}
+				        }
+				      });
+				    } else {
+							
+								resolve();
+						}
+				  } else {
+						resolve();
+					}
+				});
+				
+				if (this.gradeId > 0) {
+				  //提交完资料返回判断是否已开班
+				
+				  this.getGradeInfo();
+				}
+			})
+			
 		},
 		
     /**
@@ -2136,6 +2204,9 @@ export default {
       let self = this;
       this.$api.goodsDetail(this.goodsId).then((res) => {
         self.goodsData = res.data.data;
+				if(self.goodsData.buyNote) {
+						this.baseHandoutTipList()
+				}
         self.gradeId = self.goodsData.gradeId;
         console.log(self.gradeId, "班级ID");
         this.courseBusiness();
@@ -2273,22 +2344,24 @@ export default {
       let self = this;
       this.$api.courseDetail(this.courseId).then((res) => {
         if (res.data.code == 200) {
-          if (res.data.data.educationName == "继续教育") {
+          // if (res.data.data.educationName == "继续教育") {
             this.$api
               .lockLockAction({
                 action: "jxjy",
+								uuid:this.$method.getUuid()
               })
               .then((res) => {});
             this.lockTimer = setInterval(() => {
               this.$api
                 .lockLockAction({
                   action: "jxjy",
+									uuid:this.$method.getUuid()
                 })
                 .then((res) => {});
             }, 10000);
 
             // websocket.sendMsg("doCourse");
-          }
+          // }
           self.detail = res.data.data;
         }
       });

+ 4 - 0
pages4/login/login.vue

@@ -159,14 +159,18 @@ export default {
 									uni.redirectTo({
 										url:'/pages2/wd/class'
 									})
+									this.$method.setUuid(new Date().valueOf() + "")
 								} else if(goPath == 'bank') {
 									uni.redirectTo({
 										url:'/pages2/wd/question_bank'
 									})
+									this.$method.setUuid(new Date().valueOf() + "")
 								} else {
 									uni.reLaunch({
 										url:'/pages/index/index'
 									})
+									
+									this.$method.setUuid(new Date().valueOf() + "")
 								}
 							}else{
 								uni.navigateBack();

+ 30 - 4
pages5/exam/index.vue

@@ -14,13 +14,17 @@
 				<view class="item">已结束</view>
 				<view class="item"><text class="num">{{total2}}</text>个<u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 			</view>
-			<view class="examItem" @click="goResult">
+			<view class="examItem">
 				<view class="item">
-					<view>模拟考试讲解直播</view>
-					<view class="desc"><text class="num">二建模考-法律讲解正在直播中,立即前往查看</text></view>
+					<view  @click="goResult">模拟考试讲解直播</view>
+					<view class="desc" v-if="livingInfo"><text class="num">二建模考-法律讲解正在直播中,立即前往查看</text></view>
 				</view>
 				<view class="item"><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
 			</view>
+			<view class="examItem" @click="mockRecord()">
+				<view class="item">模考记录</view>
+				<view class="item"><u-icon name="arrow-right" color="#999999" size="28"></u-icon></view>
+			</view>
 		</view>
 	</view>
 </template>
@@ -34,25 +38,47 @@ export default {
 		return {
 			yyNum:0,
 			total1:0,
-			total2:0
+			total2:0,
+			livingInfo:null
 		};
 	},
 	onLoad(){
 		this.getCount()
+		this.mockApplyMockLiving();
 	},
 	onShow() {
 		// this.getInfo()
 	},
 	methods: {
+		mockApplyMockLiving() {
+			this.$api.mockApplyMockLiving().then(res => {
+				if(res.data.data) {
+					this.livingInfo = res.data.data;
+				}
+			})
+		},
+		mockRecord() {
+			uni.navigateTo({
+				url:'../mockRecord/mock_record'
+			})
+		},
 		getCount() {
 			this.$api.mockSubscribeListSubscribe({
+				pageNum:1,
+				pageSize:10,
 				mockStatus:0,
+				endTime:'',
+				startTime:''
 			}).then(res => {
 				this.total1 = res.data.total
 			})
 			
 			this.$api.mockSubscribeListSubscribe({
+				pageNum:1,
+				pageSize:10,
 				mockStatus:1,
+				endTime:'',
+				startTime:''
 			}).then(res => {
 				this.total2 = res.data.total
 			})

+ 47 - 17
pages5/examAppointList/index.vue

@@ -21,7 +21,7 @@
 		<view class="scroll">
 			<scroll-view scroll-x="true" class="scroll-x" >
 				<view class="content">
-					<view v-for="(item,index) in sList" :key="index" class="scroll-tag" :class="{active:param.subjectId == item.id}" @click="tagSelect(item)">{{item.subjectName}}</view>
+					<view v-for="(item,index) in sList" :key="index" class="scroll-tag" :class="{active:param.majorId == item.id}" @click="tagSelect(item)">{{item.categoryName}}</view>
 				</view>
 				
 			</scroll-view>
@@ -30,7 +30,7 @@
 
 		<view class="record">
 			<view class="item" v-for="(item,index) in mockList" :key="index">
-				<view class="item__header">{{item.applyName}}</view>
+				<view class="item__header">{{item.subjectName}}</view>
 				<view class="item__body">
 					<view class="title">
 						<image class="img" mode="widthFix" src="/pages5/static/time.png"></image>
@@ -55,7 +55,7 @@
 				<scroll-view scroll-y="true" style="height:100%">
 					<view class="list">
 						<view class="item" :class="param.businessId == listItem.businessId ? 'activesty' : ''" v-for="(listItem,listIndex) in businesslist" :key="listIndex" @click="testClick(listItem)">
-							{{ listItem.businessName }} {{listItem.projectName}}
+							{{ listItem.educationName }}:{{ listItem.businessName }}-{{listItem.projectName}}
 						</view>
 					</view>
 				</scroll-view>
@@ -148,10 +148,10 @@
 </template>
 
 <script>
-	import {mapGetters} from 'vuex'
+	import {mapGetters,mapActions} from 'vuex'
 export default {
 	computed:{
-		...mapGetters(['userInfo'])
+		...mapGetters(['userInfo','sysTime'])
 	},
 	data() {
 		return {
@@ -170,7 +170,7 @@ export default {
 				pageNum: 1,
 				pageSize: 10,
 				businessId:'',
-				subjectId:''
+				majorId:''
 			},
 			isRepeat:false,
 			total: 0,
@@ -180,6 +180,7 @@ export default {
 			modalTop:0,
 			endDate:'',
 			businessName:'',
+			subscribeId:0,
 			nowTime:'',
 			sList:[],
 			showItem:{},
@@ -188,6 +189,7 @@ export default {
 	async onLoad(option) {
 		this.endDate = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
 		this.nowTime = +this.$method.timest();
+			await this.setSystemTime();
 		await this.mockApplyListApplyBusiness();
 		
 		this.mockApplyListApply();
@@ -222,7 +224,9 @@ export default {
 		
 	},
 	methods: {
+		...mapActions(['setSystemTime']),
 		closeNotice() {
+			this.mockSubscribeEdit();
 			this.openAppoint = false;
 			this.param.pageNum = 1;
 			this.mockList = [];
@@ -232,15 +236,16 @@ export default {
 			console.log(item)
 			let startTime = item.applyStartTime
 			let endTime = item.applyEndTime
+			let examTime = item.examTime
 			
-			if(this.nowTime >= startTime && this.nowTime <= endTime) {
+			if(this.sysTime >= startTime && this.sysTime <= endTime && this.sysTime < examTime) {
 				return true;
 			} else {
 				return false;
 			}
 		},
 		tagSelect(item) {
-			this.param.subjectId = item.id;
+			this.param.majorId = item.id;
 			this.mockList = []
 			this.mockApplyListApply()
 		},
@@ -255,9 +260,10 @@ export default {
 			}
 			console.log(item,'item')
 			this.param.businessId = item.businessId
-			this.businessName = item.businessName + item.projectName
+			this.businessName = item.educationName  +':'+item.businessName +'-'+ item.projectName
 			this.index = 0;
 			this.mockList = []
+			this.courseMajorList({businessId:item.businessId,projectId:item.projectId,status:1})
 			this.mockApplyListApply();
 			
 			console.log(this.b)
@@ -268,7 +274,7 @@ export default {
 					this.businesslist = res.data.rows;
 					this.param.businessId = res.data.rows[0].businessId;
 					this.businessName = res.data.rows[0].businessName + res.data.rows[0].projectName
-					await this.subjectList({businessId:res.data.rows[0].businessId,projectId:res.data.rows[0].projectId})
+					await this.courseMajorList({businessId:res.data.rows[0].businessId,projectId:res.data.rows[0].projectId,status:1})
 					resolve()
 				})
 			})
@@ -293,16 +299,16 @@ export default {
 		refreshByIndex() {
 			
 		},
-		subjectList(data) {
+		courseMajorList(data) {
 			return new Promise(resolve => {
 				
 				let self = this;
-				this.$api.subjectList(data).then(res => {
+				this.$api.courseMajorList(data).then(res => {
 					if(res.data.code==200){
 						self.sList = res.data.rows
-						let allItem = {id:'',subjectName:'全部'}
+						let allItem = {id:'',categoryName:'全部'}
 						self.sList.unshift(allItem)
-						this.param.subjectId = '';
+						this.param.majorId = '';
 						
 						resolve()
 					}
@@ -312,6 +318,7 @@ export default {
 		
 		appoint(item) {
 			let canApply = this.canApply(item);
+			console.log(canApply)
 			if(!canApply) {
 				uni.showToast({
 					icon:'none',
@@ -343,13 +350,22 @@ export default {
 				// mockMajorSubjectId:49
 			}).then(res => {
 				console.log(res)
-				this.showItem = item;
-				this.appointModal = true;
+				if(res.data.code == 200) {
+					this.showItem = item;
+					this.appointModal = true;
+					this.subscribeId = res.data.data;
+				} else {
+					uni.showToast({
+						icon:'none',
+						title:res.data.msg
+					})
+				}
+				
 				
 			}).catch(err => {
 				uni.showToast({
 					icon:'none',
-					title:err.msg
+					title:err.data.msg
 				})
 			})
 			
@@ -370,6 +386,20 @@ export default {
 			this.mockApplyListApply();
 		},
 		
+		 mockSubscribeEdit() {
+			this.$api
+				.mockSubscribeEdit({
+					mockRemind: 1,
+					subscribeId: this.subscribeId,
+				})
+				.then((res) => {
+					uni.showToast({
+						icon:'none',
+						title:'开启成功'
+					})
+				});
+		},
+		
 		bindDateToChange(e) {
 			this.param.endTime = e.detail.value
 			this.param.pageNum = 1;

+ 57 - 17
pages5/examBank/index.vue

@@ -855,6 +855,7 @@
 export default {
   data() {
     return {
+			subscribeId:0,
       showpopups: false,
       examId: "",
       current: 0,
@@ -882,10 +883,14 @@ export default {
       gradeId: "",
       examData: {},
 			eachExamId:0,
+			normal:'',
+			isAutoSubmit:false,
       cgType: 0, //对应设计稿弹窗编码
     };
   },
   async onLoad(option) {
+		console.log(option)
+		this.subscribeId = option.subscribeId || ''
     this.current = +option.current || 0;
 		this.eachExamId = option.eachExamId
     this.examId = option.examId;
@@ -919,6 +924,8 @@ export default {
             title: "考试时间已到,系统将自动交卷",
             duration: 10000,
           });
+					
+					this.isAutoSubmit = true;
 
           this.submit();
           return;
@@ -947,7 +954,9 @@ export default {
           this.examId +
           "&eachExamId=" +
           this.eachExamId +
-          "&isback=true"
+          "&isback=true"+
+					"&subscribeId="+
+					this.subscribeId
       });
     } else {
       //点击返回按钮确认允许退出,记录答题记录
@@ -1075,6 +1084,14 @@ export default {
 
       return count;
     },
+		mockSubscribeEdit() {
+			this.$api.mockSubscribeEdit({
+				subscribeId:this.subscribeId,
+				handStatus:this.isAutoSubmit ? 2 : 1
+			}).then(res => {
+				
+			})
+		},
     /**
      * 是否做完所有题目
      */
@@ -1125,6 +1142,8 @@ export default {
         // passScore = item.passScore
         if (item.type == 1) {
           //正确
+					
+					console.log(item.ques, item.ans)
           if (item.ques == item.ans) {
             item.scoreResult = item.score;
             score += item.score;
@@ -1249,6 +1268,10 @@ export default {
       } else {
         reportStatus = 0;
       }
+			
+			if(this.subscribeId) {
+				this.mockSubscribeEdit();
+			}
 
       //交卷
       this.$api
@@ -1276,13 +1299,17 @@ export default {
         });
 				
 				//错题集id提交(客观题)
-				this.$api
-				  .mockWrongRecord({
-				    examId: this.examId,
-				    questionIds: doWrongQuestionIds,
-				    recordId: this.recordId,
-				  })
-				  .then((res) => {});
+				if(doWrongQuestionIds.length) {
+					
+					this.$api
+					  .mockWrongRecord({
+							eachExamId:this.eachExamId,
+					    examId: this.examId,
+					    questionIds: doWrongQuestionIds,
+					    recordId: this.recordId,
+					  })
+					  .then((res) => {});
+				}
 
     },
     /**
@@ -1391,6 +1418,10 @@ export default {
             }
           }
         });
+				
+				if(this.subscribeId) {
+					this.mockSubscribeEdit();
+				}
 
         this.$api
           .mockRecordEdit({
@@ -1400,7 +1431,7 @@ export default {
             recordId: this.recordId,
             doQuestionIds: doQuestionIds.join(","),
             rightQuestionNum: number,
-            status: 0,
+            status: 1,
             doQuestionNum: doQuestionNum,
             historyExamJson: JSON.stringify(this.questionList),
           })
@@ -1952,6 +1983,10 @@ export default {
       } else {
         reportStatus = 0;
       }
+			
+			if(this.subscribeId) {
+				this.mockSubscribeEdit();
+			}
 
       //交卷
       this.$api
@@ -1988,20 +2023,25 @@ export default {
                   this.examId +
                   "&id=" +
                   this.recordId+
-									"&eachExamId"+this.eachExamId
+									"&eachExamId="+this.eachExamId +
+									"&subscribeId="+this.subscribeId
               });
             }, 1000);
           }
         });
 				
 				//错题集id提交(客观题)
-				this.$api
-				  .mockWrongRecord({
-				    examId: this.examId,
-				    questionIds: doWrongQuestionIds,
-				    recordId: this.recordId,
-				  })
-				  .then((res) => {});
+				if(doWrongQuestionIds.length) {
+					
+					this.$api
+					  .mockWrongRecord({
+							eachExamId:this.eachExamId,
+					    examId: this.examId,
+					    questionIds: doWrongQuestionIds,
+					    recordId: this.recordId,
+					  })
+					  .then((res) => {});
+				}
 
     },
 

+ 18 - 13
pages5/examCount/index.vue

@@ -4,7 +4,7 @@
 		<view class="examWrap">
 			<view class="title">距离管理开考还有</view>
 			<view class="circle">
-				<image class="img" mode="widthFix" src="../static/time-circle.png"></image>
+				<u-circle-progress class="img" width="448" bg-color="rgba(0,0,0,0)" type="primary" :percent="percent"></u-circle-progress>
 				<view class="time">{{timeText}}</view>
 			</view>
 			
@@ -20,6 +20,7 @@ export default {
 	},
 	data() {
 		return {
+			mockName:'',
 			state:1,
 			start:0,
 			timer:null,
@@ -28,12 +29,17 @@ export default {
 			timeLimit:0,
 			examId:0,
 			eachExamId:0,
+			subscribeId:0,
+			end:0,
+			percent:0,
 		};
 	},
 	onLoad(option){
+		this.mockName = option.mockName || ''
+		this.subscribeId = option.subscribeId
 		this.eachExamId = option.eachExamId
 		this.examId = option.examId
-		this.timeLimit = +option.timeLimit || 0
+		this.timeLimit = +option.limit || 0
 		this.start = +option.start;
 		this.end = (this.timeLimit* 60) + this.start ;
 		this.timer = setInterval(() => {
@@ -53,6 +59,7 @@ export default {
 		getDuring() {
 			this.nowTime = +this.$method.timest();
 			let during = this.start - this.nowTime;
+			this.percent = during <= 0 ? 100 : during >= 600 ? 0 :  (600 - during) / 600 * 100;
 			if(during <= 0) {
 				return '00:00'
 			}
@@ -66,16 +73,16 @@ export default {
 			
 		},
 		examBank() {
-			// if(((this.nowTime > this.start) && (this.nowTime < this.end ))) {
-				uni.navigateTo({
-					url:'../examBank/index?examId='+this.examId+'&eachExamId='+this.eachExamId
+			if(((this.nowTime > this.start) && (this.nowTime < this.end ))) {
+				uni.redirectTo({
+					url:'../examBank/index?examId='+this.examId+'&eachExamId='+this.eachExamId+'&subscribeId='+this.subscribeId
 				})
-			// } else {
-			// 	uni.showToast({
-			// 		icon:'none',
-			// 		title:'不在考试时间'
-			// 	})
-			// }
+			} else {
+				uni.showToast({
+					icon:'none',
+					title:'不在考试时间'
+				})
+			}
 		}
 	},
 	onReachBottom() {},
@@ -108,8 +115,6 @@ export default {
 		border-radius:50%;
 		
 		.img {
-			width:448rpx;
-			height:448rpx;
 			position:absolute;
 			left:50%;
 			top:50%;

+ 160 - 47
pages5/examList/index.vue

@@ -41,7 +41,11 @@
 							</view>
 						</view>
 						<view class="btn-wrap">
-							<view class="btn" :class="{disabled:goTest(item)}" @click="goExamCount(item)">去考试</view>
+							<view class="btn-line">
+								<view class="btn test-disabled" v-if="goTest(item)" @click="goExamCount(item,index)">去考试</view>
+								<view class="btn test-disabled"  v-else-if="item.handStatus">已考试</view>
+								<view class="btn" v-else @click="goExamCount(item,index)">去考试</view>
+							</view>
 						</view>
 					</view>
 				</view>
@@ -72,19 +76,29 @@
 								{{ item.applySiteStartTime }} - {{ item.applySiteEndTime }}
 							</view>
 						</view>
-						
 						<view class="btn-wrap">
-							<view class="text">当前报告含主观题需人工阅卷,阅卷完成后显示完整报告</view>
-							<view class="btn border">重新预约</view>
-							<view class="btn btn--half diabled">去考试</view>
-							<view class="btn btn--half border">查看报告</view>
-							<view class="text-half">
-								<view>模考讲解直播时间</view>
-								<view>2022年4月28日 20:00-21:00</view>
-								
+							<view class="btn-line" v-if="item.reSubscribe == 1">
+								<view class="btn border" @click="reApply(item)">重新预约</view>
 							</view>
-							<view class="btn btn--half border">去查看</view>
+							<template v-else>
+								<view class="btn-line">
+									<view class="text" v-if="item.handStatus">当前报告含主观题需人工阅卷,阅卷完成后显示完整报告</view>
+									<view class="text" v-if="!item.handStatus">由于未按时参加考试,主观题将不会提交至后台进行人工阅卷</view>
+									<view class="btn border" :class="{disabled : item.canDo === 0,'btn--half':item.handStatus}" @click="doQuestion(item)">去做题</view>
+									<view class="btn btn--half border" @click="report(item)" v-if="item.handStatus">查看报告</view>
+								</view>
+								<view class="btn-line" v-if="item.liveEndTime && item.liveStartTime && item.liveUrl">
+									<view class="text-half">
+										<view>模考讲解直播时间</view>
+										<view>{{$method.timestampToTime(item.liveStartTime,false)}} - {{$method.timestampToTime(item.liveEndTime,false)}}</view>
+										
+									</view>
+									<view class="btn btn--half border" @click="goLive(item)">去查看</view>
+								</view>
+							</template>
+							
 						</view>
+						
 					</view>
 				</view>
 			</template>
@@ -98,11 +112,11 @@
 					<view class="item__box">
 						<view class="text">
 							<picker mode="date"  :value="param.startTime" :end="endDate" @change="bindDateFromChange">
-								<view class="uni-input">{{dateFrom}}</view>
+								<view class="uni-input">{{param.startTime || '开始时间'}}</view>
 							</picker>
 							- 
 							<picker mode="date" :value="param.endTime" :end="endDate"  @change="bindDateToChange">
-								<view class="uni-input">{{dateTo}}</view>
+								<view class="uni-input">{{param.endTime || '结束时间'}}</view>
 							</picker>
 						</view>
 						<u-icon class="icon" name="calendar"></u-icon>
@@ -112,8 +126,8 @@
 				<view class="item">
 					<view class="item__title">考试标题</view>
 					<view class="item__box">
-							<picker class="text" mode="selector" :range="rangeArr"  :value="titleName" @change="bindTitleChange">
-								<view style="width:650rpx">{{titleName}}</view>
+							<picker class="picker" mode="selector" :range="listApplyName" range-key="applyName" :value="param.applyName" @change="bindTitleChange">
+								<view style="width:650rpx;height:40rpx;">{{param.applyName}}</view>
 							</picker>
 						<u-icon class="icon" name="arrow-down"></u-icon>
 					</view>
@@ -127,6 +141,8 @@
 </template>
 
 <script>
+import { mapGetters } from 'vuex';
+import {WEBVIEW_URL} from '@/common/request.js'
 export default {
 	data() {
 		return {
@@ -142,7 +158,9 @@ export default {
 				mockStatus:0,
 				endTime:'',
 				startTime:'',
+				applyName:''
 			},
+			nowTime:0,
 			dateFrom:'',
 			dateTo:'',
 			isRepeat:false,
@@ -153,14 +171,15 @@ export default {
 			modalTop:0,
 			endDate:'',
 			titleName:3,
-			rangeArr: [1,2,3,4,5]
+			listApplyName:[],
 		};
 	},
+	computed:{
+		...mapGetters(['userInfo'])
+	},
 	onLoad(option) {
 		this.param.mockStatus = option.state || 0
 		
-		this.dateFrom = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
-		this.dateTo = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
 		this.endDate = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
 			
 		this.mockSubscribeListSubscribe();
@@ -196,23 +215,75 @@ export default {
 		}
 	},
 	onShow() {
-		if(this.isRepeat) {
-			this.addRecord();
-		} else {
-			if(this.itemIndex !== '') {
-				// this.refreshByIndex();
-			}
+		this.nowTime = +this.$method.timest();
+		if(this.itemIndex !== '') {
+			this.refreshByIndex();
 		}
 		
 	},
 	methods: {
+		mockApplyListApplyName() {
+			let param = JSON.parse(JSON.stringify(this.param));
+			if(param.endTime) {
+				param.endTime = this.$method.TimeTotimestamp(param.endTime)
+			}
+			
+			if(param.startTime) {
+				param.startTime = this.$method.TimeTotimestamp(param.startTime)
+			}
+			console.log(param,'param')
+			this.$api.mockApplyListApplyName(param).then((res) => {
+				this.listApplyName = res.data.rows;
+				console.log(this.listApplyName,'listApplyName')
+				this.param.applyName = "";
+				this.mockSubscribeListSubscribe();
+			});
+		},
+		reApply(item){
+			uni.redirectTo({
+				url:'/pages5/examAppointList/index'
+			})
+		},
+		report(item) {
+			uni.navigateTo({
+			  url:
+			    "/pages5/examReport/index?&examId=" +
+			    item.examId +
+			    "&id=" +
+			    item.recordId+
+					"&eachExamId="+item.eachExamId+
+					"&subscribeId="+item.subscribeId
+			});
+		},
+		doQuestion(item) {
+			if(item.canDo === 0) {
+				uni.showToast({
+					icon:'none',
+					msg:'请等待所有科目考试结束后再进入刷题'
+					
+				})
+				return;
+			}
+			
+			uni.navigateTo({
+				url:'../examBank/index?examId='+item.examId+'&eachExamId='+item.eachExamId
+			})
+		},
 		goTest(item) {
-			let nowTime = +this.$method.timest();
 			let startTime = this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + item.applySiteStartTime)
-			let canGo = (startTime-nowTime) <= (600) && (startTime-nowTime) >= (-(item.timeLimit * 60)  || 0)
+			let canGo = (startTime-this.nowTime) <= (600) && (startTime-this.nowTime) >= (-(item.timeLimit * 60)  || 0)
 			
 			return !canGo
 		},
+		isStart(item) {
+			let startTime = this.$method.TimeTotimestamp(
+				this.$method.timestampToTime(item.applySiteExamTime) +
+					" " +
+					item.applySiteStartTime
+			);
+
+			return startTime - this.nowTime <= 600;
+		},
 		mockSubscribeListSubscribe() {
 			let param = JSON.parse(JSON.stringify(this.param))
 			if(param.endTime) {
@@ -222,22 +293,37 @@ export default {
 			if(param.startTime) {
 				param.startTime = this.$method.TimeTotimestamp(param.startTime)
 			}
+			
 			this.$api.mockSubscribeListSubscribe(param).then(res => {
 				this.recordList.push(...res.data.rows)
 				this.total = res.data.total
 			})
 		},
 		refreshByIndex() {
-			this.$api.examRecordGroupList({
-				pageNum: this.itemIndex+1,
-				pageSize: 1
-			}).then(res => {
+			let param = JSON.parse(JSON.stringify(this.param))
+			if(param.endTime) {
+				param.endTime = this.$method.TimeTotimestamp(param.endTime)
+			}
+			
+			if(param.startTime) {
+				param.startTime = this.$method.TimeTotimestamp(param.startTime)
+			}
+			param.pageNum = this.itemIndex+1;
+			param.pageSize =  1
+			this.$api.mockSubscribeListSubscribe(param).then(res => {
 				this.$set(this.recordList,this.itemIndex,res.data.rows[0])
 				this.itemIndex = ''
-			});
+			})
+		},
+		
+		goLive(item) {
+			let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+item.liveUrl)
+			uni.navigateTo({
+				url:`../../pages/webview/index?url=`+encode
+			})
 		},
 		
-		goExamCount(item) {
+		goExamCount(item,index) {
 			if(this.goTest(item)) {
 				uni.showToast({
 					icon:'none',
@@ -245,8 +331,10 @@ export default {
 				})
 				return;
 			}
+			
+			this.itemIndex = index;
 			uni.navigateTo({
-				url:'../examCount/index?start='+this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + item.applySiteStartTime)+'&limit='+item.timeLimit+'&examId='+item.examId+'&eachExamId='+item.eachExamId
+				url:'../examCount/index?start='+this.$method.TimeTotimestamp(this.$method.timestampToTime(item.applySiteExamTime) + ' ' + item.applySiteStartTime)+'&limit='+item.timeLimit+'&examId='+item.examId+'&eachExamId='+item.eachExamId+'&subscribeId='+item.subscribeId+'&mockName='+item.applyName
 			})
 		},
 		
@@ -262,26 +350,40 @@ export default {
 				return;
 			}
 			this.recordList = [];
+			this.param.endTime = '';
+			this.param.startTime = '';
+			this.param.applyName = '';
 			this.param.pageNum = 1;
 			this.param.mockStatus = state;
 			this.mockSubscribeListSubscribe()
 		},
 		bindDateFromChange(e) {
-			this.dateFrom = e.detail.value
+			this.param.startTime = e.detail.value
+			this.param.pageNum = 1;
+			this.param.applyName = '';
+			this.recordList = []
+			this.mockApplyListApplyName();
 		},
 		
 		bindDateToChange(e) {
-				this.param.startTime = e.detail.value
+				this.param.endTime = e.detail.value
 				this.param.pageNum = 1;
+				this.param.applyName = '';
 				this.recordList = []
-				this.mockSubscribeListSubscribe();
+				this.mockApplyListApplyName();
 		},
 		
 		bindTitleChange(e) {
-				this.param.startTime = e.detail.value
-				this.param.pageNum = 1;
-				this.recordList = []
-				this.mockSubscribeListSubscribe();
+			if (this.listApplyName.length) {
+				let index = e.detail.value;
+				this.param.applyName = this.listApplyName[index].applyName
+				
+			} else {
+				this.param.applyName  =''
+			}
+			this.param.pageNum = 1;
+			this.recordList = []
+			this.mockSubscribeListSubscribe();
 		}
 	}
 };
@@ -378,13 +480,16 @@ page {
 		}
 		
 		.btn-wrap {
-			display: flex;
-			align-items: center;
-			justify-content: center;
 			padding:24rpx 16rpx ;
-			flex-wrap: wrap;
 			border-bottom:1px solid #EEEEEE;
 			
+			.btn-line {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				flex-wrap: wrap;
+			}
+			
 			.text {
 				width:100%;
 				color:#F5222D;
@@ -413,15 +518,23 @@ page {
 					width:320rpx;
 				}
 				
-				&.disabled {
-					background:#D9D9D9;
-				}
 				
 				&.border {
 					background:#fff;
 					color:#007AFF;
 					border:1px solid #007AFF;
 				}
+				
+				
+				&.disabled {
+					color:#D9D9D9;
+					border-color:#D9D9D9;
+				}
+				
+				&.test-disabled {
+					color:#fff;
+					background:#D9D9D9;
+				}
 			}
 		}
 	}

+ 64 - 13
pages5/examReport/index.vue

@@ -88,13 +88,34 @@
 			</view>
 		</view>
 		
-		<view class="notice">
-			<image class="img" mode="widthFix" src="../static/notice1.png"></image>
-			<view class="text">
-				模考讲解直播将在<text class="blue">2022年4月20日20:00</text>开始 开启模考讲解直播提醒,不错过每一个考点
+		
+		<template v-if="subscribeInfo.liveStartTime <= sysTime && subscribeInfo.liveEndTime >= sysTime">
+			<view class="notice" v-if="subscribeInfo.liveSubscribe == 0">
+				<image class="img" mode="widthFix" src="../static/notice1.png"></image>
+				<view class="text">
+					模考讲解正在直播中
+				</view>
+				<view class="btn" @click="goLive()">立即前往查看直播</view>
 			</view>
-			<view class="btn" @click="noticeModal = true">开启模考讲解直播提醒</view>
-		</view>
+		</template>
+		
+		<template v-else>
+			<view class="notice" v-if="subscribeInfo.liveSubscribe == 0">
+				<image class="img" mode="widthFix" src="../static/notice1.png"></image>
+				<view class="text">
+					模考讲解直播将在<text class="blue">{{$method.timestampToTime(subscribeInfo.liveStartTime,false,true)}}</text>开始 开启模考讲解直播提醒,不错过每一个考点
+				</view>
+				<view class="btn" @click="noticeModal = true">开启模考讲解直播提醒</view>
+			</view>
+			
+			<view class="notice" v-if="subscribeInfo.liveSubscribe == 1">
+				<image class="img" mode="widthFix" src="../static/notice2.png"></image>
+				<view class="text">
+					模考讲解直播将在<text class="blue">{{$method.timestampToTime(subscribeInfo.liveStartTime,false,true)}}</text>开始
+				</view>
+			</view>
+		</template>
+		
 		
 		<u-popup class="notice__modal" v-model="noticeModal" mode="center" border-radius="24" :mask-close-able="false">
 			<view class="notice__content">
@@ -104,14 +125,14 @@
 							<view class="bold center">开启模考讲解直播提醒</view>
 							
 							<view class="center text">
-								此科目模考分析将在<text class="blue">4月20日 20:00</text>进行直播讲解,开启直播提醒,不错过名师讲解
+								此科目模考分析将在<text class="blue">{{$method.timestampToTime(subscribeInfo.liveStartTime,false,true)}}</text>进行直播讲解,开启直播提醒,不错过名师讲解
 							</view>
 							
 						</view>
 				</view>
 				<view class="footer">
 					<view class="btn close" @click="noticeModal = false">暂不开启</view>
-					<view class="btn" @click="noticeModal = false">开启提醒</view>
+					<view class="btn" @click="openRemind">开启提醒</view>
 				</view>
 			</view>
 		</u-popup>
@@ -119,7 +140,8 @@
 </template>
 
 <script>
-import { mapGetters } from 'vuex';
+import { mapGetters,mapActions } from 'vuex';
+import {WEBVIEW_URL} from '@/common/request.js'
 export default {
 	data() {
 		return {
@@ -133,11 +155,12 @@ export default {
 			context1: null,
 			context2: null,
 			eachExamId:'',
-			wrongRecordWrongNum:0
+			wrongRecordWrongNum:0,
+			subscribeInfo:{}
 		};
 	},
 	onUnload() {},
-	computed: { ...mapGetters(['userInfo']) },
+	computed: { ...mapGetters(['userInfo','sysTime']) },
 	async onShow() {
 		
 	},
@@ -148,7 +171,9 @@ export default {
 		this.recordId = option.id;
 		this.examId = option.examId;
 		this.eachExamId = option.eachExamId
-		
+    this.subscribeId = option.subscribeId;
+		await this.setSystemTime();
+		this.mockSubscribeInfo();
 		this.mockWrongRecordWrongNum();
 		await this.bankExam();
 		await this.mockReport();
@@ -244,7 +269,33 @@ export default {
 		
 	},
 	methods: {
-		
+		...mapActions(['setSystemTime']),
+		goLive() {
+			let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+this.subscribeInfo.liveUrl)
+			uni.navigateTo({
+				url:`../../pages/webview/index?url=`+encode
+			})
+		},
+		mockSubscribeInfo(){
+			this.$api.mockSubscribeInfo(this.subscribeId).then(res => {
+				this.subscribeInfo = res.data.data
+			})
+		},
+		openRemind() {
+			this.noticeModal = false
+			this.$api.mockSubscribeEdit({
+				subscribeId:this.subscribeId,
+				liveSubscribe:1,
+			}).then(res => {
+				if(res.data.code == 200) {
+					this.mockSubscribeInfo()
+					uni.showToast({
+						icon:'none',
+						title:'开启成功'
+					})
+				}
+			})
+		},
 		bankExam(){
 			return new Promise(resolve =>{
 				this.$api.bankExam(this.examId).then(res => {

+ 43 - 1
pages5/liveDetail/list.vue

@@ -63,6 +63,17 @@ export default {
 		}
 	},
 	methods: {
+		studyRecordGetChannelBasicInfo(channelId) {
+			return new Promise((resolve) => {
+				this.$api
+					.studyRecordGetChannelBasicInfo({
+						channelId,
+					})
+					.then((res) => {
+						resolve(res.data.data);
+					});
+			});
+		},
 		goodsLivingSectionList() {
 			this.$api.goodsLivingSectionList().then(res => {
 				this.livingSectionList = res.data.data;
@@ -74,7 +85,38 @@ export default {
 				this.total = res.data.total
 			})
 		},
-		goLive(item) {
+		async goLive(item) {
+			let data = await this.studyRecordGetChannelBasicInfo(item.liveUrl);
+			let nowTime = +this.$method.timest();
+			
+			if (item.liveStartTime > nowTime) {
+				if (data.watchStatus == "end" || data.watchStatus == "playback") {
+					uni.showToast({
+						title: '直播未开始',
+						icon: 'none'
+					});
+					return;
+				}
+			} else if (
+				item.liveStartTime < nowTime &&
+				item.liveEndTime > nowTime
+			) {
+				if (data.watchStatus == "end" || data.watchStatus == "playback") {
+					uni.showToast({
+						title: '暂无直播',
+						icon: 'none'
+					});
+					return;
+				}
+			} else if (item.liveEndTime < nowTime) {
+				if (data.watchStatus == "end" || data.watchStatus == "playback") {
+					uni.showToast({
+						title: '直播已结束',
+						icon: 'none'
+					});
+					return;
+				}
+			}
 			let moduleId = item.moduleId || 0;
 			let chapterId = item.chapterId || 0;
 			let sectionId = item.sectionId || item.menuId;

+ 140 - 30
pages5/liveList/index.vue

@@ -4,38 +4,52 @@
 		<view class="tabs">
 			<view class="tab" :class="{ active: index == 2 }" data-index="2">
 				<view class="dateRange">
-					<picker mode="date" :value="dateFrom" :start="startDate" :end="endDate" @change="bindDateFromChange">
-						<view class="uni-input">{{dateFrom}}</view>
+					<picker mode="date" :value="param.startTime" :end="endDate" @change="bindDateFromChange">
+						<view class="uni-input">{{param.startTime || '开始时间'}}</view>
 					</picker>
 					- 
-					<picker mode="date" :value="dateTo" :start="startDate" :end="endDate" @change="bindDateToChange">
-						<view class="uni-input">{{dateTo}}</view>
-					</picker></view>
+					<picker mode="date" :value="param.endTime" :end="endDate" @change="bindDateToChange">
+						<view class="uni-input">{{param.endTime || '结束时间'}}</view>
+					</picker>
+				</view>
 				<u-icon class="icon" name="calendar"></u-icon>
 			</view>
-			<view class="tab" :class="{ active: index == 1 }" data-index="1" @click="tab(1)">
-				<view>全部</view>
+			<view class="tab" :class="{ active: index == 1 }" data-index="1">
+				<view class="dateRange">
+					<picker class="picker" mode="selector" :range="listApplyName" range-key="applyName" :value="param.applyName" @change="bindTitleChange">
+						<view style="width:300rpx;height:40rpx;">{{param.applyName}}</view>
+					</picker>
+				</view>
 				<u-icon class="icon" :class="index ==1? 'animals':''" name="arrow-down"></u-icon>
 			</view>
+					
 			
 		</view>
 		
 
 		<view class="record">
-			<view class="item" v-for="(item,index) in 5" :key="index">
+			<view class="item" v-for="(item,index) in liveList" :key="index" @click="goLive(item)">
 				<view class="item__header">
-					<view class="note">
-						<image src="../static/living.png" mode="widthFix"></image>
-						直播中
+					<view class="note" :class="{blue:item.liveStatus == 1,green:item.liveStatus == 2,gray:item.liveStatus == 3}">
+						<image v-if="item.liveStatus == 0" src="../static/living.png" mode="widthFix"></image>
+						<image v-if="item.liveStatus == 1" src="../static/noliving.png" mode="widthFix"></image>
+						<image v-if="item.liveStatus == 2" src="../static/playback.png" mode="widthFix"></image>
+						{{item.liveStatus == 0? '直播中' : ''}}
+						
+						{{item.liveStatus == 1? '未开播' :''}}
+						
+						{{item.liveStatus == 2? '回放中' :''}}
+						
+						{{item.liveStatus == 3? '已结束' :''}}
 					</view>
 					<image class="img" src="/static/questionBank.png" ></image>
 				</view>
 				<view class="item__body">
 					<view class="title">
-						二建模考-法律讲解直播-三级标题
+						{{item.sectionName}}
 					</view>
 					<view class="desc">直播时间</view>
-					<view class="desc">2022/4/15 20:00-21:00 </view>
+					<view class="desc">{{$method.timestampToTime(item.liveStartTime,false)}} - {{$method.timestampToTime(item.liveEndTime,false)}} </view>
 				</view>
 			</view>
 		</view>
@@ -72,6 +86,8 @@
 </template>
 
 <script>
+import {WEBVIEW_URL} from '@/common/request.js'
+import { mapGetters } from 'vuex';
 export default {
 	data() {
 		return {
@@ -79,16 +95,19 @@ export default {
 			appointModal:false,
 			noticeModal:false,
 			index: 0,
+			liveList:[],
 			list: [],
 			list1: [],
 			recordList: [],
+			listApplyName:[],
 			goodsData: {},
 			param: {
 				pageNum: 1,
-				pageSize: 10
+				pageSize: 10,
+				startTime:'',
+				endTime:'',
+				applyName:'',
 			},
-			dateFrom:'',
-			dateTo:'',
 			isRepeat:false,
 			total: 0,
 			activeIndex: 0,
@@ -98,11 +117,11 @@ export default {
 			endDate:'',
 		};
 	},
+	computed: { ...mapGetters(['userInfo']) },
 	onLoad(option) {
-		this.dateFrom = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
-		this.dateTo = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
 		this.endDate = this.$method.timestampToTime(new Date().getTime() / 1000).replace(/-/g,'/');
 		
+		this.mockApplyListMockLive();
 		uni.getSystemInfo({
 			success:(e) => {
 				let info = uni.createSelectorQuery().select(".nav");
@@ -120,32 +139,63 @@ export default {
 	},
 	onPullDownRefresh() {
 		let that = this;
+		this.liveList = [];
 		this.param = {
 			pageNum: 1,
 			pageSize: 10
 		};
-		this.getExamRecordList();
+		this.mockApplyListMockLive();
 		setTimeout(function() {
 			uni.stopPullDownRefresh();
 		}, 500);
 	},
 	onReachBottom() {
-		if (this.recordList.length < this.total) {
+		console.log('go')
+		if (this.liveList.length < this.total) {
 			this.param.pageNum++;
-			this.getExamRecordList();
+			this.mockApplyListMockLive();
 		}
 	},
 	onShow() {
-		if(this.isRepeat) {
-			this.addRecord();
-		} else {
-			if(this.itemIndex !== '') {
-				this.refreshByIndex();
-			}
-		}
 		
 	},
 	methods: {
+		goLive(item) {
+			if(item.liveStatus == 0) { //直播中
+				let encode = encodeURIComponent(WEBVIEW_URL+'pages/live/index?token='+uni.getStorageSync('token')+'&userInfo='+JSON.stringify(this.userInfo)+'&channelId='+item.liveUrl)
+				uni.navigateTo({
+					url:`../../pages/webview/index?url=`+encode
+				})
+			} else if(item.liveStatus == 1) { //未开播
+				uni.showToast({
+					icon:'none',
+					title:'暂未开播,请在开播后查看'
+				})
+			} else if(item.liveStatus == 2) { //回放中
+				uni.navigateTo({
+					url:'/pages3/live/playback?vid='+item.recordingUrl
+				})
+			} else if(item.liveStatus == 3) { //已结束
+				uni.showToast({
+					icon:'none',
+					title:'直播已结束,不能查看回放'
+				})
+			}
+		},
+		mockApplyListMockLive() {
+			let param = JSON.parse(JSON.stringify(this.param))
+			if(param.endTime) {
+				param.endTime = this.$method.TimeTotimestamp(param.endTime)
+			}
+			
+			if(param.startTime) {
+				param.startTime = this.$method.TimeTotimestamp(param.startTime)
+			}
+			this.$api.mockApplyListMockLive(param).then(res => {
+				this.liveList.push(...res.data.rows)
+				this.total = res.data.total;
+			})
+		},
 		refreshByIndex() {
 			this.$api.examRecordGroupList({
 				pageNum: this.itemIndex+1,
@@ -168,12 +218,52 @@ export default {
 			this.index = index;
 			console.log(this.index);
 		},
+		
+		mockApplyListApplyName() {
+			let param = JSON.parse(JSON.stringify(this.param));
+			if(param.endTime) {
+				param.endTime = this.$method.TimeTotimestamp(param.endTime)
+			}
+			
+			if(param.startTime) {
+				param.startTime = this.$method.TimeTotimestamp(param.startTime)
+			}
+			console.log(param,'param')
+			this.$api.mockApplyListApplyName(param).then((res) => {
+				this.listApplyName = res.data.rows;
+				console.log(this.listApplyName,'listApplyName')
+				this.param.applyName = "";
+				this.mockApplyListMockLive();
+			});
+		},
+
 		bindDateFromChange(e) {
-			this.dateFrom = e.detail.value
+			this.param.startTime = e.detail.value
+			this.param.pageNum = 1;
+			this.param.applyName = '';
+			this.liveList = []
+			this.mockApplyListApplyName();
 		},
 		
 		bindDateToChange(e) {
-			this.dateTo = e.detail.value
+				this.param.endTime = e.detail.value
+				this.param.pageNum = 1;
+				this.param.applyName = '';
+				this.liveList = []
+				this.mockApplyListApplyName();
+		},
+		
+		bindTitleChange(e) {
+			if (this.listApplyName.length) {
+				let index = e.detail.value;
+				this.param.applyName = this.listApplyName[index].applyName
+				
+			} else {
+				this.param.applyName  =''
+			}
+			this.param.pageNum = 1;
+			this.liveList = []
+			this.mockApplyListMockLive();
 		}
 	}
 };
@@ -200,6 +290,7 @@ page {
 		padding:0 18rpx;
 		flex: 1;
 		display: flex;
+			align-items: center;
 		justify-content: space-between;
 		background: #ffffff;
 		font-size: 24rpx;
@@ -209,7 +300,14 @@ page {
 			border-right:1px solid #EEEEEE;
 		}
 		
+		.picker {
+			width:100%;
+			display: flex;
+			align-items: center;
+		}
+		
 		.dateRange {
+			width:100%;
 			display: flex;
 			justify-content: space-between;
 		}
@@ -258,6 +356,18 @@ page {
 				text-align: center;
 				color:#fff;
 				
+				&.blue {
+					background: linear-gradient(90deg, #40A9FF, #096DD9);
+				}
+				
+				&.green {
+					background: linear-gradient(90deg, #24F2C1, #00B9A0);
+				}
+				
+				&.gray {
+					background: linear-gradient(90deg, #BFBFBF, #8C8C8C);
+				}
+				
 				image {
 					width:24rpx;
 					vertical-align: middle;

+ 478 - 0
pages5/mockRecord/mock_record.vue

@@ -0,0 +1,478 @@
+<template>
+	<view>
+		<nav-bar title="做题记录" class="nav"></nav-bar>
+		<!-- <view class="tabs">
+			<view class="tab" :class="{ active: index == 1 }" data-index="1" @click="tab(1)">
+				全部题库记录
+				<u-icon class="icon" :class="index ==1? 'animals':''" name="arrow-down"></u-icon>
+			</view>
+			<view class="tab" :class="{ active: index == 2 }" data-index="2" @click="tab(2)">
+				全部试卷类型
+				<u-icon class="icon" :class="index ==2? 'animals':''" name="arrow-down"></u-icon>
+			</view>
+		</view> -->
+		
+
+		<view class="record">
+			<view class="item" v-for="(record,index) in recordList" :key="index">
+				<view class="note">{{ record.paperName }}</view>
+				<view class="title">{{ record.examName }}</view>
+				<view class="desc">
+					<view>
+						<image src="/static/icon/wk_icon2.png"></image>
+						<text>{{ $method.timestampToTime(record.updateTime, false) }}</text>
+					</view>
+					<view>
+						<image src="/static/icon/wk_icon2.png"></image>
+						<text>总共 {{ record.totalQuestionNum }} 题 做对 {{ record.rightQuestionNum }} 题</text>
+					</view>
+				</view>
+				<view class="btns">
+					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.examId, record.goodsId, record.moduleExamId, record.chapterExamId,index,record)">重做</view>
+					<view class="btn" @click="questionBankExplain(record)" v-if="record.status == 1">解析</view>
+					<view class="btn" @click="questionReport(record)" v-if="record.status == 1">报告</view>
+					<view class="btn continue" @click="moreRecord(record,index)" >更多记录</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="modal" :style="{top:modalTop+'px'}" v-if="index == 1">
+			<view class="content">
+				<scroll-view scroll-y="true" style="height:100%">
+					<view class="top" :class="activeIndex === 0 ? 'activesty' : ''" @click="testClick(3)">全部题库记录</view>
+					<view class="list">
+						<view class="item" :class="activeIndex == listItem.goodsId ? 'activesty' : ''" v-for="(listItem,listIndex) in list" :key="listIndex" @click="testClick(listItem)">
+							{{ listItem.goodsName }}
+						</view>
+					</view>
+				</scroll-view>
+				
+			</view>
+			<view class="modal_wrap" @click="index = 0"></view>
+		</view>
+		
+		<view class="modal" :style="{top:modalTop+'px'}" v-if="index == 2">
+			<view class="content">
+				<scroll-view scroll-y="true" style="height:100%">
+					<view class="top" :class="typeIndex === 0 ? 'activesty' : ''" @click="paperClick(3)">全部试卷类型</view>
+					<view class="list">
+						<view class="item" :class="typeIndex == listItem.paperId ? 'activesty' : ''" v-for="(listItem,listIndex) in list1" :key="listIndex" @click="paperClick(listItem)">{{ listItem.paperName }}</view>
+					</view>
+				</scroll-view>
+			</view>
+			<view class="modal_wrap" @click="index = 0"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			index: 0,
+			list: [],
+			list1: [],
+			recordList: [],
+			goodsData: {},
+			param: {
+				pageNum: 1,
+				pageSize: 10
+			},
+			isRepeat:false,
+			total: 0,
+			activeIndex: 0,
+			typeIndex:0,
+			itemIndex:'',
+			modalTop:0,
+		};
+	},
+	onLoad(option) {
+		// this.listGoodsUserQuestion();
+		// this.examaperList();
+		this.mockRecordGroupList();
+		
+		// uni.getSystemInfo({
+		// 	success:(e) => {
+		// 		let info = uni.createSelectorQuery().select(".nav");
+		// 		info.boundingClientRect((navData) => { //data - 各种参数
+				
+		// 			let info = uni.createSelectorQuery().select(".tabs");
+		// 			info.boundingClientRect((tabData) => { //data - 各种参数
+		// 				this.modalTop = navData.height + tabData.height
+		// 				console.log(navData) // 获取元素宽度
+		// 				console.log(tabData) // 获取元素宽度
+		// 			}).exec()
+		// 		}).exec()
+		// 	}
+		// })
+	},
+	onPullDownRefresh() {
+		let that = this;
+		this.param = {
+			pageNum: 1,
+			pageSize: 10
+		};
+		this.mockRecordGroupList();
+		setTimeout(function() {
+			uni.stopPullDownRefresh();
+		}, 500);
+	},
+	onReachBottom() {
+		if (this.recordList.length < this.total) {
+			this.param.pageNum++;
+			this.mockRecordGroupList();
+		}
+	},
+	onShow() {
+		if(this.isRepeat) {
+			this.addRecord();
+		} else {
+			if(this.itemIndex !== '') {
+				this.refreshByIndex();
+			}
+		}
+		
+	},
+	methods: {
+		questionBankExplain(record) {
+			uni.navigateTo({
+				url:'/pages5/examReport/questionBankAllExplain?id=' +
+							record.examId +
+							'&recordId='+ record.recordId +
+							'&eachExamId='+record.eachExamId
+				
+			})
+		},
+		questionReport(record) {
+			uni.navigateTo({
+				url:
+				  "/pages5/examReport/index?examId=" +
+				  record.examId +
+				  "&id=" +
+				  record.recordId+
+					"&eachExamId="+record.eachExamId+
+					"&subscribeId="+record.subscribeId
+			})
+		},
+		/**
+		 * 更多记录
+		 */
+		moreRecord(record) {
+			uni.navigateTo({
+				url:'./mock_record_list?goodsId='+record.goodsId+'&examId='+record.examId+'&id=' + record.recordId + '&eachExamId='+record.eachExamId
+			})
+		},
+		addRecord() {
+			this.$api.examRecordList({
+				pageNum: 1,
+				pageSize: 1
+			}).then(res => {
+				this.recordList.unshift(res.data.rows[0])
+			});
+			this.isRepeat = false;
+		},
+		refreshByIndex() {
+			this.$api.examRecordGroupList({
+				pageNum: this.itemIndex+1,
+				pageSize: 1
+			}).then(res => {
+				this.$set(this.recordList,this.itemIndex,res.data.rows[0])
+				this.itemIndex = ''
+			});
+		},
+		mockRecordGroupList() {
+			if (this.param.pageNum == 1) {
+				this.recordList = [];
+			}
+			this.$api.mockRecordGroupList(this.param).then(res => {
+				this.recordList.push.apply(this.recordList, res.data.rows);
+				this.total = res.data.total;
+			});
+		},
+		/**
+		 * 去做题
+		 */
+		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0,index,record) {
+			uni.navigateTo({
+				url:'../examBank/index?examId='+record.examId+'&eachExamId='+record.eachExamId
+			})
+			return
+			// await this.getDetail(goodsId);
+			this.itemIndex = '';
+			this.isRepeat = true;
+			let count = await this.examRecordCount(id,goodsId);
+			let answerNum = await this.getExamDetail(id);
+			//超过答题次数
+			if (answerNum > 0 && count >= answerNum) {
+				this.$u.toast('该试卷只能答题' + answerNum + '次!');
+				return;
+			}
+
+			uni.navigateTo({
+				url: '/pages2/bank/questionBank?id=' + id + '&goodsid=' + goodsId + '&moduleId=' + moduleId + '&chapterId=' + chapterId + '&orderGoodsId=' + record.orderGoodsId
+			});
+		},
+		/**
+		 * @param {Object} exam_id
+		 * 获取试卷可以做的次数
+		 */
+		getExamDetail(exam_id) {
+			return new Promise(resolve => {
+				this.$api.getExamDetail(exam_id).then(res => {
+					resolve(res.data.data.answerNum);
+				});
+			});
+		},
+		/**
+		 * 查询试卷历史做题次数
+		 */
+		examRecordCount(examId,goodsId) {
+			return new Promise(resolve => {
+				this.$api
+					.examRecordCount({
+						examId: examId,
+						goodsId: goodsId
+					})
+					.then(res => {
+						resolve(res.data.data);
+					});
+			});
+		},
+
+		getDetail(id) {
+			return new Promise(resolve => {
+				this.$api.goodsDetail(id).then(res => {
+					this.goodsData = res.data.data;
+					resolve();
+				});
+			});
+		},
+		testClick(item) {
+			if (item === 3) {
+				this.index = 0;
+				this.activeIndex = 0;
+				this.param.goodsId = '';
+				this.param.pageNum = 1;
+				this.mockRecordGroupList();
+			} else {
+				this.index = 0;
+				this.activeIndex = item.goodsId;
+				this.param.goodsId = item.goodsId;
+				this.param.pageNum = 1;
+				this.mockRecordGroupList();
+			}
+		},
+		paperClick(item) {
+			if (item === 3) {
+				this.index = 0;
+				this.typeIndex = 0;
+				this.param.paperId = '';
+				this.param.pageNum = 1;
+				this.mockRecordGroupList();
+			} else {
+				this.index = 0;
+				this.typeIndex = item.paperId;
+				this.param.paperId = item.paperId;
+				this.param.pageNum = 1;
+				this.mockRecordGroupList();
+			}
+		},
+		tab(index) {
+			console.log(index,this.index)
+			if(this.index == index) {
+				this.index = 0;
+				return;
+			}
+			this.index = index;
+			console.log(this.index);
+		},
+
+		examaperList() {
+			this.$api.examaperList({}).then(res => {
+				this.list1 = res.data.rows;
+			});
+		},
+
+		listGoodsUserQuestion() {
+			this.$api.listGoodsUserQuestion({}).then(res => {
+				this.list = res.data.rows;
+			});
+		}
+	}
+};
+</script>
+<style>
+page {
+	background: #eaeef1;
+}
+</style>
+<style lang="scss" scope>
+	.animals{
+		transition: all 0.3s;
+		transform: rotate(180deg);
+	}
+.tabs {
+	position: fixed;
+	left: 0;
+	width: 100%;
+	display: flex;
+	z-index: 10;
+	.tab {
+		flex: 1;
+		height: 80rpx;
+		text-align: center;
+		line-height: 80rpx;
+		background: #ffffff;
+		font-size: 32rpx;
+		color: #999999;
+
+		&.active {
+			color: #333333;
+			.icon{
+				transform: rotate(180deg);
+			}
+		}
+	}
+}
+
+.record {
+	margin-top: 20rpx;
+	padding: 16rpx 8rpx;
+	display: flex;
+	flex-wrap: wrap;
+	.item {
+		margin-bottom: 16rpx;
+		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;
+			position: absolute;
+			left: 0;
+			top: 0;
+			// width: 112rpx;
+			padding: 0rpx 10rpx;
+			height: 40rpx;
+			text-align: center;
+			line-height: 40rpx;
+			background: linear-gradient(180deg, #4facfe, #007aff);
+			border-radius: 16rpx 0px 16rpx 0rpx;
+		}
+
+		.title {
+			font-size: 32rpx;
+			color: #333333;
+			font-weight: bold;
+		}
+
+		.desc {
+			margin-top: 26rpx;
+			view {
+				margin: 16rpx 0;
+
+				image {
+					width: 23rpx;
+					height: 24rpx;
+				}
+
+				text {
+					margin-left: 15rpx;
+					font-size: 24rpx;
+					color: #999999;
+					line-height: 36rpx;
+				}
+			}
+		}
+
+		.btns {
+			margin-top: 26rpx;
+			display: flex;
+			justify-content: space-around;
+			flex-wrap: wrap;
+			.btn {
+				margin:5rpx 0;
+				width:150rpx;
+				height: 48rpx;
+				line-height: 48rpx;
+				text-align: center;
+				color: #007aff;
+				background: #ffffff;
+				border: 1rpx solid #007aff;
+				border-radius: 16rpx;
+				
+			}
+		}
+	}
+}
+
+.modal {
+	bottom:0;
+	z-index: 199999999;
+	position: fixed;
+	left: 0;
+	width: 100%;
+
+	.content {
+		height:80%;
+		overflow: hidden;
+		position: relative;
+		z-index: 10;
+		background: #fff;
+		padding: 8rpx 12rpx 20rpx;
+		display: flex;
+		flex-wrap: wrap;
+
+		.top {
+			margin: 0 auto;
+			width: 726rpx;
+			height: 80rpx;
+			background: #f5f5f5;
+			color: #666666;
+			border-radius: 16rpx;
+			text-align: center;
+			line-height: 80rpx;
+			font-size: 32rpx;
+		}
+
+		.list {
+			width:100%;
+			margin-top: 16rpx;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.item {
+				padding: 25rpx 20rpx;
+				width: 49%;
+				background: #f5f5f5;
+				border-radius: 16rpx;
+				font-size: 32rpx;
+				color: #666666;
+				margin: 8rpx 0;
+			}
+		}
+	}
+
+	.modal_wrap {
+		position: absolute;
+		left: 0;
+		width: 100%;
+		top: 0;
+		height: 100%;
+		background: rgba(0, 0, 0, 0.3);
+	}
+}
+.activesty {
+	background: #007aff !important;
+	color: #fff !important;
+}
+</style>

+ 336 - 0
pages5/mockRecord/mock_record_list.vue

@@ -0,0 +1,336 @@
+<template>
+	<view>
+		<nav-bar title="做题记录" class="nav"></nav-bar>
+		
+		<view class="record">
+			<view class="item" v-for="(record,index) in recordList" :key="index">
+				<view class="note">{{ record.paperName }}</view>
+				<view class="title">{{ record.examName }}</view>
+				<view class="desc">
+					<view>
+						<image src="/static/icon/wk_icon2.png"></image>
+						<text>{{ $method.timestampToTime(record.updateTime, false) }}</text>
+					</view>
+					<view>
+						<image src="/static/icon/wk_icon2.png"></image>
+						<text>总共 {{ record.totalQuestionNum }} 题 做对 {{ record.rightQuestionNum }} 题</text>
+					</view>
+				</view>
+				<view class="btns">
+					<view class="btn" v-if="record.status == 1" @click="doRepeat(record.examId, record.goodsId, record.moduleExamId, record.chapterExamId,index,record)">重做</view>
+					<view class="btn" @click="questionBankExplain(record)" v-if="record.status == 1">解析</view>
+					<view class="btn" @click="questionReport(record)" v-if="record.status == 1">报告</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			index: 0,
+			list: [],
+			list1: [],
+			recordList: [],
+			goodsData: {},
+			param: {
+				moduleExamId:0,
+				chapterExamId:0,
+				examId:0,
+				goodsId:0,
+				pageNum: 1,
+				pageSize: 10
+			},
+			isRepeat:false,
+			total: 0,
+			activeIndex: 0,
+			typeIndex:0,
+			itemIndex:'',
+		};
+	},
+	onLoad(option) {
+		
+		this.param.moduleExamId = option.moduleId,
+		this.param.chapterExamId = option.chapterId,
+		this.param.examId = option.examId,
+		this.param.goodsId = option.goodsId,
+		this.mockRecordList();
+	},
+	onPullDownRefresh() {
+		let that = this;
+		this.param = {
+			moduleExamId:this.param.moduleId,
+			chapterExamId:this.param.chapterId,
+			examId:this.param.examId,
+			goodsId:this.param.goodsId,
+			pageNum: 1,
+			pageSize: 10
+		};
+		this.mockRecordList();
+		setTimeout(function() {
+			uni.stopPullDownRefresh();
+		}, 500);
+	},
+	onReachBottom() {
+		if (this.recordList.length < this.total) {
+			this.param.pageNum++;
+			this.mockRecordList();
+		}
+	},
+	onShow() {
+		// if(this.isRepeat) {
+		// 	this.addRecord();
+		// } else {
+		// 	if(this.itemIndex !== '') {
+		// 		this.refreshByIndex();
+		// 	}
+		// }
+		
+	},
+	methods: {
+		questionBankExplain(record) {
+			uni.navigateTo({
+				url:'/pages5/examReport/questionBankAllExplain?id=' +
+						record.examId +
+						'&recordId='+ record.recordId +
+						'&eachExamId='+record.eachExamId
+				
+			})
+		},
+		questionReport(record) {
+			uni.navigateTo({
+				url:
+				  "/pages5/examReport/index?&examId=" +
+				  record.examId +
+				  "&id=" +
+				  record.recordId+
+					"&eachExamId="+record.eachExamId+
+					"&subscribeId="+record.subscribeId
+			})
+		},
+		refreshByIndex() {
+			
+		},
+		mockRecordList() {
+			if (this.param.pageNum == 1) {
+				this.recordList = [];
+			}
+			this.$api.mockRecordList(this.param).then(res => {
+				this.recordList.push.apply(this.recordList, res.data.rows);
+				this.total = res.data.total;
+			});
+		},
+		/**
+		 * 去做题
+		 */
+		async doRepeat(id, goodsId, moduleId = 0, chapterId = 0,index,record) {
+			uni.navigateTo({
+				url:'../examBank/index?examId='+record.examId+'&eachExamId='+record.eachExamId
+			})
+			return;
+			// await this.getDetail(goodsId);
+			this.itemIndex = '';
+			this.isRepeat = true;
+			let count = await this.examRecordCount(id,goodsId);
+			let answerNum = await this.getExamDetail(id);
+			//超过答题次数
+			if (answerNum > 0 && count >= answerNum) {
+				this.$u.toast('该试卷只能答题' + answerNum + '次!');
+				return;
+			}
+
+			uni.navigateTo({
+				url: '/pages2/bank/questionBank?id=' + id + '&goodsid=' + goodsId + '&moduleId=' + moduleId + '&chapterId=' + chapterId + '&orderGoodsId='+record.orderGoodsId
+			});
+		},
+		/**
+		 * @param {Object} exam_id
+		 * 获取试卷可以做的次数
+		 */
+		getExamDetail(exam_id) {
+			return new Promise(resolve => {
+				this.$api.getExamDetail(exam_id).then(res => {
+					resolve(res.data.data.answerNum);
+				});
+			});
+		},
+		/**
+		 * 查询试卷历史做题次数
+		 */
+		examRecordCount(examId,goodsId) {
+			return new Promise(resolve => {
+				this.$api
+					.examRecordCount({
+						examId: examId,
+						goodsId: goodsId
+					})
+					.then(res => {
+						resolve(res.data.data);
+					});
+			});
+		},
+
+		getDetail(id) {
+			return new Promise(resolve => {
+				this.$api.goodsDetail(id).then(res => {
+					this.goodsData = res.data.data;
+					resolve();
+				});
+			});
+		}
+	}
+};
+</script>
+<style>
+page {
+	background: #eaeef1;
+}
+</style>
+<style lang="scss" scope>
+	.animals{
+		transition: all 0.3s;
+		transform: rotate(180deg);
+	}
+
+.record {
+	padding: 16rpx 8rpx;
+	display: flex;
+	flex-wrap: wrap;
+	.item {
+		margin-bottom: 16rpx;
+		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;
+			position: absolute;
+			left: 0;
+			top: 0;
+			// width: 112rpx;
+			padding: 0rpx 10rpx;
+			height: 40rpx;
+			text-align: center;
+			line-height: 40rpx;
+			background: linear-gradient(180deg, #4facfe, #007aff);
+			border-radius: 16rpx 0px 16rpx 0rpx;
+		}
+
+		.title {
+			font-size: 32rpx;
+			color: #333333;
+			font-weight: bold;
+		}
+
+		.desc {
+			margin-top: 26rpx;
+			view {
+				margin: 16rpx 0;
+
+				image {
+					width: 23rpx;
+					height: 24rpx;
+				}
+
+				text {
+					margin-left: 15rpx;
+					font-size: 24rpx;
+					color: #999999;
+					line-height: 36rpx;
+				}
+			}
+		}
+
+		.btns {
+			margin-top: 26rpx;
+			display: flex;
+			justify-content: space-around;
+			.btn {
+				flex:1;
+				margin:0 5rpx;
+				height: 48rpx;
+				line-height: 48rpx;
+				text-align: center;
+				color: #007aff;
+				background: #ffffff;
+				border: 1rpx solid #007aff;
+				border-radius: 16rpx;
+				
+				&.continue {
+					width:317rpx;
+				}
+			}
+		}
+	}
+}
+
+.modal {
+	bottom:0;
+	z-index: 199999999;
+	position: fixed;
+	left: 0;
+	width: 100%;
+
+	.content {
+		position: relative;
+		z-index: 10;
+		background: #fff;
+		padding: 8rpx 12rpx 20rpx;
+		display: flex;
+		flex-wrap: wrap;
+
+		.top {
+			margin: 0 auto;
+			width: 726rpx;
+			height: 80rpx;
+			background: #f5f5f5;
+			color: #666666;
+			border-radius: 16rpx;
+			text-align: center;
+			line-height: 80rpx;
+			font-size: 32rpx;
+		}
+
+		.list {
+			width:100%;
+			margin-top: 16rpx;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: space-between;
+
+			.item {
+				padding: 25rpx 20rpx;
+				width: 49%;
+				background: #f5f5f5;
+				border-radius: 16rpx;
+				font-size: 32rpx;
+				color: #666666;
+				margin: 8rpx 0;
+			}
+		}
+	}
+
+	.modal_wrap {
+		position: absolute;
+		left: 0;
+		width: 100%;
+		top: 0;
+		height: 100%;
+		background: rgba(0, 0, 0, 0.3);
+	}
+}
+.activesty {
+	background: #007aff !important;
+	color: #fff !important;
+}
+</style>

BIN
pages5/static/noliving.png


BIN
pages5/static/playback.png


BIN
static/icon/my_icon12.png


+ 24 - 0
store/index.js

@@ -1,6 +1,7 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 import api from '@/common/api.js'
+import method from '@/common/methodTool'
 Vue.use(Vuex);
 const store = new Vuex.Store({
 	state: {
@@ -23,8 +24,12 @@ const store = new Vuex.Store({
 		playChannelId: 0, //正在播放的直播频道号
 		playVID: 0, //正在播放的保利威视频ID
 		liveLast:null,
+		sysTime:0 //系统时间
 	},
 	getters: {
+		sysTime: state => {
+			return state.sysTime
+		},
 		userInfo: state => {
 			// if (state.userInfo == null) {
 			// 	if (uni.getStorageSync('user_account')) {
@@ -86,6 +91,9 @@ const store = new Vuex.Store({
 		liveLast: state => state.liveLast,
 	},
 	mutations: {
+		commonSystemTime(state,time) {
+			state.sysTime = time;
+		},
 		tabNum(state, nums) {
 			if (nums) {
 				uni.setTabBarBadge({
@@ -140,6 +148,21 @@ const store = new Vuex.Store({
 		},
 	},
 	actions: {
+		/**
+		 * 设置系统时间
+		 */
+		setSystemTime({
+			commit
+		}) {
+			return new Promise(resolve => {
+				api.commonSystemTime().then(res => {
+					if(res.data.code == 200) {
+						commit('commonSystemTime', res.data.data)
+						resolve()
+					}
+				})
+			})
+		},
 		changeTabsNum({
 			commit
 		}) {
@@ -156,6 +179,7 @@ const store = new Vuex.Store({
 				const resdata = await api.getInfo()
 				if (resdata.data.code == 200) {
 					context.state.userInfo = resdata.data.data;
+					method.setUuid(new Date().valueOf() + "")
 					resolve()
 				}
 			})