Ver código fonte

Merge branch 'master' into stage-4

# Conflicts:
#	components/course/courseModule.vue
#	pages2/order/index.vue
chenxiong 3 anos atrás
pai
commit
574c141042

+ 1 - 1
components/course/courseModule.vue

@@ -19,7 +19,7 @@ import courseChapter from '@/components/course/courseChapter.vue';
 export default {
 	name: 'courseModule',
 	props: {
-		learningOrder:{
+		learningOrder:{ //是否设置学习顺序 1 设置 0不设置
 			type:String,
 			defaule:'0'
 		},

+ 46 - 7
components/course/courseSection.vue

@@ -1,15 +1,15 @@
 <template>
 	<view style="display: flex;justify-content: space-between;align-items: center;" @click="getVideo">
 		<view style="display: flex;justify-content: space-between;margin: 20rpx 0;width: 100%;">
-			<view style="display: flex;align-items: center;">
+			<view style="display: flex;align-items: center;flex:1;">
 				<view class="tag tagColor1" v-if="menuItem.sectionType==1">录播</view>
 				<view class="tag tagColor2" v-if="menuItem.sectionType==2">直播</view>
 				<view class="tag tagColor3" v-if="menuItem.sectionType==3">回放</view>
 				<view class="t_content">
-				<view v-if="menuItem.sectionType==1" :class="playSectionId==newId?'color1':''">{{menuItem.name}}</view>
-				<view v-if="menuItem.sectionType==2" :class="playSectionId==newId?'color2':''">{{menuItem.name}}</view>
-				<view v-if="menuItem.sectionType==3" :class="playSectionId==newId?'color3':''">{{menuItem.name}}</view>
-					<view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.liveStartTime">
+					<view v-if="menuItem.sectionType==1" :class="playSectionId==newId?'color1':''">{{menuItem.name}}</view>
+					<view v-if="menuItem.sectionType==2" :class="playSectionId==newId?'color2':''">{{menuItem.name}}</view>
+					<view v-if="menuItem.sectionType==3" :class="playSectionId==newId?'color3':''">{{menuItem.name}}</view>
+					<!-- <view style="font-size: 20rpx;color: #FF3B30;" v-if="menuItem.liveStartTime">
 						<view v-if="menuItem.liveStartTime>nowTime">
 							<text>{{$method.timestampToTime(menuItem.liveStartTime, isDay =false)}}</text>-
 							<text>{{$method.timestampToTime(menuItem.liveEndTime, isDay =false).substr(11,9)}}</text>
@@ -20,10 +20,21 @@
 						<view v-if="menuItem.liveEndTime<nowTime">
 							<text>回放</text>
 						</view>
-					</view>
+					</view> -->
 				</view>
 				<view v-if="menuItem.sectionType==null">{{menuItem.name}}</view>
 			</view>
+			<view style="font-size: 20rpx;color: #FF3B30;"  v-if="menuItem.liveStartTime">
+				<view class="tagWillPlay" v-if="menuItem.liveStartTime>nowTime">
+					<text>待开播</text>
+				</view>
+				<view class="tagPlaying" v-if="menuItem.liveStartTime<=nowTime&&menuItem.liveEndTime>nowTime">
+					<text>直播中</text>
+				</view>
+				<view class="tagPlayed" v-if="menuItem.liveEndTime<nowTime">
+					<text>已结束</text>
+				</view>
+			</view>
 			<view v-if="isRebuild||menuItem.rebuild>0" class="tagRe">待重修</view>
 			<view v-else>
 				<view v-if="menuItem.learning==1" class="tagGreen">已看完</view>
@@ -138,6 +149,7 @@ export default {
 				this.$store.commit('setPlaySectionId', {playSectionId  :this.newId});
 				this.$store.commit('setPlayChannelId', {playChannelId  :this.menuItem.liveUrl});
 				uni.$emit('getChannel', this.menuItem)
+				uni.$emit('levelId', this.levelId)
 				console.log(this.menuItem,"频道")
 				
 			}
@@ -149,7 +161,7 @@ export default {
 };
 </script>
 
-<style scoped>
+<style scoped lang="scss">
 	.tagGreen{
 		width: 80rpx;
 		height: 28rpx;
@@ -159,6 +171,33 @@ export default {
 		color: #FFFFFF;
 		text-align: center;
 	}
+	.tagWillPlay{
+		width: 80rpx;
+		height: 28rpx;
+		background: #EBF4FF;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #007AFF;
+		text-align: center;
+	}
+	.tagPlaying{
+		width: 80rpx;
+		height: 28rpx;
+		background: #FFF7EB;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #FF9500;
+		text-align: center;
+	}
+	.tagPlayed{
+		width: 80rpx;
+		height: 28rpx;
+		background: #EEEEEE;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #666666;
+		text-align: center;
+	}
 	.tagRe{
 		width: 80rpx;
 		height: 28rpx;

+ 5 - 1
pages/course/index.vue

@@ -64,7 +64,11 @@
 							<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
 							<view style="display: flex;margin-top: 13rpx;">
 								<view class="yearTag" v-if="item.year">{{item.year}}</view>
-								<view class="titleTag">{{item.goodsName}}</view>
+								<view class="titleTag" style="display: flex;justify-content: space-between;flex:1;">
+									<view>{{item.goodsName}}</view>
+									
+									<view class="priceTag">¥ {{item.standPrice.toFixed(2)}}</view>
+								</view>
 							</view>
 							<view style="display: flex;justify-content: space-between;margin-top: 13rpx;" v-if="false">
 								<view class="noteTag"><image src="/static/icon/wk_icon1.png" class="wk_icon"></image>

+ 19 - 11
pages/index/index.vue

@@ -17,11 +17,13 @@
 		</view>
 		<view class="content">
 			<view class="notice" v-if="infoNums">
-				<image src="/static/icon/msg_icon1.png" class="icon"></image>
-				<view class="text">
-					您有{{infoNums}}条新的通知
+				<view class="notice__content">
+					<image src="/static/icon/msg_icon1.png" class="icon"></image>
+					<view class="text">
+						您有{{infoNums}}条新的通知
+					</view>
+					<view class="btn" @click="jumpPage">立即查看</view>
 				</view>
-				<view class="btn" @click="jumpPage">立即查看</view>
 			</view>
 			<view>
 				<!-- 日历-->
@@ -502,16 +504,22 @@ export default {
 	}
 	
 	.content {
-		padding:16rpx;
+		overflow: hidden;
+		padding:0 16rpx 16rpx;
 		background: rgba(234, 238, 241, 1);
 		
 		.notice {
-			padding:0 8rpx;
-			height: 56rpx;
-			background: linear-gradient(-90deg, rgba(255, 209, 0, 0.3), rgba(255, 255, 255, 0.3));
+			background:#fff;
 			border-radius: 16rpx;
-			display: flex;
-			align-items: center;
+			margin-top:16rpx;
+			overflow: hidden;
+			&__content {
+				padding:0 8rpx;
+				height: 56rpx;
+				background: linear-gradient(-90deg, rgba(255, 209, 0, 0.3), rgba(255, 255, 255, 0.3));
+				display: flex;
+				align-items: center;
+			}
 			
 			.icon {
 				width: 40rpx;
@@ -800,7 +808,7 @@ page {
 	background: #ffffff;
 	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.1);
 	border-radius: 22rpx;
-	margin-top: 25rpx;
+	margin-top: 16rpx;
 	padding-bottom: 15rpx;
 }
 .calendar_card .card_box {

+ 43 - 23
pages/shopping/shoppingCart.vue

@@ -6,7 +6,7 @@
 		<view v-show="isLogin">
 			<view v-if="!list.length"><u-empty text="购物车为空" margin-top="500" mode="car"></u-empty></view>
 			<view v-else>
-				<view style="padding: 30rpx;padding-bottom: 98rpx;">
+				<view style="padding: 8rpx;padding-bottom: 98rpx;">
 					<uni-swipe-action>
 						<u-checkbox-group @change="checkboxGroupChange" placement="column" >
 							<view>
@@ -65,7 +65,7 @@
 					</view>
 					<view style="display: flex;align-items: center;">
 						<view style="color: #999999;margin-right: 8rpx;">合计</view>
-						<view class="priceTag">¥ {{ totalPrice }}</view>
+						<view class="priceTag">¥ {{ toFixed(totalPrice) }}</view>
 						<view style="display: flex;color: #FFFFFF;align-items: center;"><view class="btn2" @click="goBuy()">结算</view></view>
 					</view>
 				</view>
@@ -192,6 +192,10 @@ export default {
 		}
 	},
 	methods: {
+		toFixed(num) {
+			console.log(num)
+			return num.toFixed(2)
+		},
 		bindChangeE(e) {
 			console.log(e.detail.value);
 			this.examIndex = e.detail.value[0];
@@ -359,9 +363,6 @@ export default {
 			console.log(this.checkboxList)
 		},
 		countPrice(list) {},
-		checkboxChange1(e) {
-			//console.log(e);
-		},
 
 		login() {
 			uni.navigateTo({ url: '/pages/login/login' });
@@ -441,26 +442,35 @@ export default {
 		},
 		checkboxChange(n) {
 			console.log('change', n);
-			if (n.value) {
-				this.totalPrice += this.list[n.name].standPrice;
-			} else {
-				this.totalPrice -= this.list[n.name].standPrice;
-			}
-		},
-		checkboxAllChange(n) {
-			this.totalPrice = 0.0;
-			this.checkboxList = [];
-			if (n.value) {
+			this.$nextTick(() => {
+				
+				this.totalPrice = 0.0;
 				for (let i = 0; i < this.list.length; i++) {
-					this.list[i].checked = true;
-					this.totalPrice += this.list[i].standPrice;
-					this.checkboxList.push(i);
+					if(this.list[i].checked) {
+						console.log(this.list[i],999)
+						this.totalPrice += this.list[i].standPrice;
+					}
+					
 				}
-			} else {
-				for (let i = 0; i < this.list.length; i++) {
-					this.list[i].checked = false;
+			})
+		},
+		checkboxAllChange(n) {
+			this.$nextTick(() => {
+				this.totalPrice = 0.0;
+				this.checkboxList = [];
+				if (n.value) {
+					for (let i = 0; i < this.list.length; i++) {
+						this.list[i].checked = true;
+						this.totalPrice += this.list[i].standPrice;
+						this.checkboxList.push(i);
+					}
+				} else {
+					for (let i = 0; i < this.list.length; i++) {
+						this.list[i].checked = false;
+					}
 				}
-			}
+			})
+			
 		}
 	}
 };
@@ -564,7 +574,7 @@ page {
 	width: 100%;
 	background: #ffffff;
 	border-radius: 16rpx;
-	margin-bottom: 20rpx;
+	margin-bottom: 16rpx;
 	padding: 15rpx 0;
 	display: flex;
 	
@@ -655,5 +665,15 @@ page {
 	justify-content: space-between;
 	align-items: center;
 	padding: 0 30rpx;
+	
+	.priceTag {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ff2d55;
+		display: flex;
+		flex-direction: row-reverse;
+		margin-right: 20rpx;
+	}
 }
 </style>

+ 17 - 13
pages2/class/questionBank.vue

@@ -467,7 +467,7 @@
 					<view style="width: 100%; height: 979rpx;position: fixed;" v-if="photoPopup">
 						<camera device-position="front" flash="off" @error="error" style="width: 100%; height: 100%;" ></camera>
 					</view>
-					<view class="custom"><image src="@/pages2/static/zhezhao.png" mode=""></image></view>
+					<view class="custom"><image src="/static/zhezhao.png" mode=""></image></view>
 				</view>
 				<view class="btnResult" @click="takePhoto">拍照</view>
 			</view>
@@ -519,7 +519,7 @@ export default {
 			needPhoto:false //是否需要拍照
 		};
 	},
-	onLoad(option) {
+	async onLoad(option) {
 		this.id = option.id;
 		this.goodsId = option.goodsid;
 		this.chapterId = option.chapterId;
@@ -571,9 +571,9 @@ export default {
 				}
 			}
 		} else {
+			await this.getGoodsDetail()
 			this.goodsQuestionList();
 			this.bankExam();
-			this.getGoodsDetail()
 		}
 	},
 	onUnload() {
@@ -597,17 +597,21 @@ export default {
 	},
 	methods: {
 		getGoodsDetail() {
-			let self = this
-			this.$api.goodsDetail(this.goodsId).then(res => {
-				self.goodsDetail = res.data.data;
-				if (self.goodsDetail.goodsPhotoExamConfig) {
-					let goodsPhotoExamConfig = JSON.parse(self.goodsDetail.goodsPhotoExamConfig);
-					if (goodsPhotoExamConfig.photograph > 0) {
-						self.needPhoto = true;
-					}
-				}
+			return new Promise((resolve) => {
 				
-			});
+				let self = this
+				this.$api.goodsDetail(this.goodsId).then(res => {
+					self.goodsDetail = res.data.data;
+					if (self.goodsDetail.goodsPhotoExamConfig) {
+						let goodsPhotoExamConfig = JSON.parse(self.goodsDetail.goodsPhotoExamConfig);
+						if (goodsPhotoExamConfig.photograph > 0) {
+							self.needPhoto = true;
+						}
+					}
+					
+					resolve()
+				});
+			})
 		},
 		postStudyRecord() {
 			let self = this

+ 16 - 4
pages2/order/confirm_list.vue

@@ -52,6 +52,7 @@
 											<u-radio
 												shape="circle"
 												:name="index"
+												:disabled="item.studentNum > 0 && item.studentNum == item.studentUpper"
 											>
 												<view :class="index==gradeValue?'white-box blue-box':'white-box'" >
 													<view>
@@ -250,14 +251,14 @@ export default {
 				}
 			}
 			else if(this.detail.templateType=='apply'&&this.detail.goodsType==1){
-				if(!this.applyObj.examDateJson){
+				/* if(!this.applyObj.examDateJson){
 					uni.showModal({
 						title: "提示",
 						content: '请选择考期',
 						showCancel: false
 					})
 					return false
-				}
+				} */
 			}
 			return true;
 		},
@@ -281,14 +282,14 @@ export default {
 				// 	})
 				// 	return false
 				// }
-				if(!this.applyObj.examDateJson){
+				/* if(!this.applyObj.examDateJson){
 					uni.showModal({
 						title: "提示",
 						content: '请选择考期',
 						showCancel: false
 					})
 					return false
-				}
+				} */
 			}
 			return true;
 		},
@@ -300,12 +301,23 @@ export default {
 			this.$api.goodsGradeList({goodsId:this.id}).then(res => {
 				if(res.data.code==200){
 					self.gradeList = res.data.rows
+					
 					if(self.gradeList.length==0){
 						let item = {
 							className:'系统分班',
 							gradeId:0
 						}
 						self.gradeList.push(item)
+					} else {
+						let isGradeFull = self.gradeList.every(item => (item.studentNum > 0 && item.studentNum == item.studentUpper))
+						//所有班级都满了
+						if(isGradeFull) {
+							let item = {
+								className:'系统分班',
+								gradeId:0
+							}
+							self.gradeList.unshift(item)
+						}
 					}
 				}
 			});

+ 2 - 2
pages2/order/index.vue

@@ -29,8 +29,8 @@
 								</view>
 							</view>
 							<view style="display: flex;flex-direction: row-reverse;padding: 10rpx 0;">
-								<view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
-							</view>	
+								<view class="btn2" v-if="items.refundStatus === 0&&item.orderFrom === 2&&(item.orderStatus === 1 || item.orderStatus === 2 || item.orderStatus === 3)&&(items.goodsType == '1' || items.goodsType == '2')" @click.stop="refund(item.orderSn,items.goodsId)">退款</view>
+							</view>
 						</view>
 						<u-line color="#D6D6DB" />
 						<view class="footer">

+ 1 - 1
pages2/plan/create.vue

@@ -7,7 +7,7 @@
 					<text >{{ item.goodsName }}</text>
 					<text style="color:#999;margin-left:12rpx;">{{ item.secAllNum }}节</text>
 				</view>
-				<view class="del_icon"><u-icon name="close" color="#fff" size="20" @click="delItem(index)"></u-icon></view>
+				<view class="del_icon"><u-icon  name="close" color="#fff" size="20" @click="delItem(index)"></u-icon></view>
 			</view>
 			<view class="item" style="vertical-align: top;">
 				<view class="item_add" @click="openSel"><u-icon name="plus-circle-fill" color="#007AFF" size="32"></u-icon></view>

+ 161 - 61
pages2/plan/edit.vue

@@ -1,22 +1,22 @@
 <template>
-	<view style="padding: 30rpx;">
+	<view style="padding: 16rpx;">
 		<view class="list_box">
 			<view class="item" v-for="(item, index) in list" :key="index">
 				<image :src="$method.splitImgHost(item.coverUrl)"></image>
 				<text>{{ item.goodsName }}</text>
 				<text style="color:#999;margin-left:12rpx;">{{ item.secAllNum }}节</text>
-				<view class="del_icon"><u-icon name="minus-circle-fill" color="#EB4D3D" size="40" @click="delItem(index, item.goodsId)"></u-icon></view>
+				<view class="del_icon"><u-icon name="close" color="#fff" size="20" @click="delItem(index, item.goodsId)"></u-icon></view>
 			</view>
 			<view class="item" style="vertical-align: top;">
-				<view class="item_add" @click="openSel"><u-icon name="plus-circle-fill" color="#32467B" size="32"></u-icon></view>
+				<view class="item_add" @click="openSel"><u-icon name="plus-circle-fill" color="#007AFF" size="32"></u-icon></view>
 				<view style="color:#999;text-align: center;">添加网课</view>
 			</view>
 		</view>
 		<view class="list_box form">
 			<u-form :model="form" ref="uForm">
 				<u-form-item label="课程类型" :label-width="auto">
-					<view style="line-height: 40rpx;" v-if="form.category">{{ form.category }}</view>
-					<view v-else style="text-align: end;">请添加网课</view>
+					<view style="line-height: 40rpx;text-align: right;" v-if="form.category">{{ form.category }}</view>
+					<view v-else style="text-align: right;">请添加网课</view>
 				</u-form-item>
 				<u-form-item label="考试日期" prop="birth" :label-width="auto">
 					<picker mode="date" :value="form.date" @change="bindDateChange">
@@ -66,33 +66,43 @@
 		</u-popup>
 		<u-popup v-model="show" mode="bottom">
 			<view class="popup_box">
-				<view class="popup_title">
-					<u-row>
-						<u-col span="6"><view class="title_r">我的课程</view></u-col>
-						<u-col span="3" offset="3"><view class="title_l" @click="submit">确认</view></u-col>
-					</u-row>
+				<view>
+					<view class="line1"></view>
+					<view class="grade">选择课程</view>
+					<u-line></u-line>
 				</view>
 				<view class="popup_list" v-if="list2.length !== 0">
-					<view class="popup_item" v-for="(item, index) in list2" :key="index">
-						<view style="display: flex;align-items: center;">
-							<u-checkbox
-								:disabled="item.disabled"
-								@change="checkboxChange"
-								shape="circle"
-								active-color="#32467B"
-								v-model="list2[index].checked"
-								:key="index"
-								:name="item.goodsId"
-							></u-checkbox>
+					<scroll-view class="list_in" scroll-y="true">
+						<view class="popup_item" v-for="(item, index) in list2" :key="index">
+							
+								<u-checkbox
+									:disabled="item.disabled"
+									@change="checkboxChange"
+									shape="circle"
+									active-color="#007AFF"
+									v-model="item.checked"
+									:key="index"
+									:name="item.goodsId"
+								>
+									<view class="course_item" :class="{selected:item.checked}">
+										<view style="display: flex;align-items: center;"><image :src="$method.splitImgHost(item.coverUrl)" style="width: 278rpx;height: 134rpx;"></image></view>
+										<view style="margin: 16rpx;">
+											<view>{{ item.goodsName }}</view>
+											<view style="color:#999;">{{ item.secAllNum }}节</view>
+										</view>
+									</view>
+								</u-checkbox>
+							
 						</view>
-						<view style="display: flex;align-items: center;"><image :src="$method.splitImgHost(item.coverUrl)" style="width: 278rpx;height: 134rpx;"></image></view>
-						<view style="margin: 30rpx;">
-							<view>{{ item.goodsName }}</view>
-							<view style="color:#999;">{{ item.secAllNum }}节</view>
-						</view>
-					</view>
+					</scroll-view>
+					
+				</view>
+				<view class="popup_list" v-else><u-empty text="请前往购买课程" mode="list"></u-empty></view>
+				
+				<view class="submit_wrap">
+					<view class="title_l" @click="submit">确认</view>
+				
 				</view>
-				<view v-else><u-empty text="请前往购买课程" mode="list"></u-empty></view>
 			</view>
 		</u-popup>
 		<view @click="resultForm" class="submit_btn">确认计划</view>
@@ -112,6 +122,7 @@ export default {
 				endDate: '2021-05-31',
 				week: '一、三、五'
 			},
+			businessId:'',
 			calendar: 'range',
 			list: [],
 			list2: [],
@@ -301,6 +312,7 @@ export default {
 				this.index_review = res.data.data.studyDay - 1;
 				this.form.week = res.data.data.studyCount;
 				this.list = res.data.data.goodsVos;
+				this.businessId = res.data.data.goodsVos[0].businessId;
 				this.form.category = this.list[0].educationName + '-' + this.list[0].projectName + '-' + this.list[0].businessName;
 				var numWeek = [];
 				this.form.week.forEach((items, indexs) => {
@@ -392,10 +404,48 @@ export default {
 				this.form.category = this.list[0].educationName + '-' + this.list[0].projectName + '-' + this.list[0].businessName;
 			}
 		},
-		checkboxChange(e) {},
+		checkboxChange(e) {
+			let goodsId = e.name;
+			if(e.value) { //勾选
+				this.businessId = this.list2.find(listItem => listItem.goodsId == goodsId).businessId;
+				this.list2.forEach(listItem => {
+					if(listItem.businessId != this.businessId) {
+						listItem.disabled = true;
+					}
+				})
+			} else { //取消
+				this.$nextTick(() => {
+					let checkedNum = this.list2.filter(listItem => {
+						if(listItem.checked) {
+							return true;
+						} else {
+							if(this.list.length) {
+								return true;
+							} else {
+								return false;
+							}
+						}
+					}).length;
+					
+					if(checkedNum == 0) { //全部取消,且没有已选择的
+						this.businessId = '';
+						this.list2.forEach(listItem => {
+							console.log(listItem)
+							listItem.disabled = false;
+						})
+					}
+				})
+				
+			}
+		},
 		checkSameItem() {
 			this.list2.map(val => {
 				val.disabled = false;
+				if(this.businessId) {
+					if(val.businessId != this.businessId) {
+						val.disabled = true;
+					}
+				}
 				this.list.map(val1 => {
 					if (val.goodsId == val1.goodsId) {
 						val.disabled = true;
@@ -407,6 +457,7 @@ export default {
 		delItem(index, ids) {
 			this.list.splice(index, 1);
 			if (this.list.length === 0) {
+				this.businessId = '';
 				this.form.category = '';
 			} else {
 				this.form.category = this.list[0].educationName + '-' + this.list[0].projectName + '-' + this.list[0].businessName;
@@ -430,7 +481,7 @@ export default {
 	overflow: hidden;
 }
 </style>
-<style scope>
+<style scope lang="scss">
 .dis_ss {
 	display: flex;
 	align-items: center;
@@ -462,34 +513,61 @@ export default {
 }
 .form {
 	padding: 0 16rpx !important;
-	margin-top: 30rpx;
+	margin-top: 16rpx;
 }
 input {
 	text-align: right;
 }
 .popup_item {
 	width: 100%;
-	height: 182rpx;
-	background: #ffffff;
-	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(145, 156, 178, 0.1);
 	border-radius: 32rpx;
-	margin: 20rpx 0;
-	padding: 10rpx;
+	margin: 10rpx 0;
+	padding: 0 20rpx;
 	display: flex;
+	
+	.course_item {
+		display: flex;
+		align-items: center;
+		width:660rpx;
+		padding:26rpx;
+		
+		&.selected {
+			background:#EBF5FF;
+			border-radius: 24rpx;
+		}
+	}
 }
 .popup_list {
-	height: 500rpx;
+	position:relative;
+	flex:1;
 	padding: 0 20rpx;
+	
+	.list_in {
+		position: absolute;
+		left:0;
+		top:0;
+		width:100%;
+		height:100%;
+		overflow: scroll;
+	}
 }
-.title_l {
-	width: 88rpx;
-	height: 48rpx;
-	background: #32467b;
-	border-radius: 16rpx;
-	font-size: 28rpx;
-	color: #ffffff;
-	text-align: center;
-	line-height: 48rpx;
+.submit_wrap {
+	border-top:1px solid #eee;
+	background:#fff;
+	padding:18rpx 0;
+	
+	
+	.title_l {
+		margin:0 auto;
+		text-align: center;
+		line-height: 64rpx;
+		width: 200rpx;
+		height: 64rpx;
+		background: linear-gradient(0deg, #015EEA, #00C0FA);
+		border-radius: 32rpx;
+		color:#fff;
+		font-size: 30rpx;
+	}
 }
 .title_r {
 	font-size: 30rpx;
@@ -497,50 +575,72 @@ input {
 	font-weight: bold;
 	color: #2f4379;
 }
-.popup_title {
-	width: 100%;
-	margin: 40rpx;
+.grade {
+	font-size: 24rpx;
+	color: #999999;
+	margin: 0 auto;
+	margin: 10rpx 0;
+	text-align: center;
+}
+.line1 {
+	width: 80rpx;
+	height: 8rpx;
+	background: #999999;
+	border-radius: 4rpx;
+	margin: 0 auto;
+	margin-top: 15rpx;
 }
 .popup_box {
-	height: 600rpx;
+	height: 680rpx;
+	display: flex;
+	flex-direction: column;
 }
 .del_icon {
+	border-radius:50%;
+	overflow: hidden;
+	background:rgba(255,54,87,1);
+	width: 30rpx;
+	height: 30rpx;
 	position: absolute;
 	right: -15rpx;
 	top: -15rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	
 }
 .item_add {
 	background: #f9f9f9;
-	border-radius: 32rpx;
+	border-radius: 14rpx;
 	width: 100%;
-	height: 150rpx;
+	height: 134rpx;
 	text-align: center;
-	line-height: 150rpx;
+	line-height: 134rpx;
 }
 .item text {
 	font-size: 24rpx;
 	color: #0c141f;
+	
 }
 .item image {
-	border-radius: 32rpx;
+	border-radius: 14rpx;
 	width: 100%;
-	height: 150rpx;
+	height: 134rpx;
 }
 .item {
-	width: 46%;
+	width:278rpx;
 	display: inline-block;
-	margin: 1% 2%;
 	position: relative;
+	margin-right:16rpx;
 }
 .list_box {
 	width: 100%;
 	background: #ffffff;
-	box-shadow: 0rpx 0rpx 1rpx 4rpx rgba(145, 156, 178, 0.1);
-	border-radius: 32rpx;
-	padding: 20rpx 0;
+	border-radius: 16rpx;
+	padding: 24rpx;
 }
 
 page {
-	background: #ffffff;
+	background:rgba(234,238,241,1)
 }
 </style>

+ 83 - 19
pages2/plan/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<view style="padding: 30rpx;">
+	<view style="padding: 16rpx;">
 		<view v-if="havePlan">
 			<view class="card" v-if="havePlan">
 				<view class="date_t1">
@@ -7,27 +7,27 @@
 					<text style="padding: 0 15rpx;">{{ calendarStudyVo.year }}年 {{ calendarStudyVo.month }}月</text>
 					<u-icon name="arrow-right" size="28" v-if="haveNextMonth" @click="swipeMonth(1)"></u-icon>
 				</view>
-				<view style="width: 100%;display: flex;justify-content:center;margin-top: 20rpx;">
+				<view style="width: 100%;margin-top: 20rpx;">
 					<view v-for="(item, index) in date" :key="index" class="card_date">{{ item }}</view>
 				</view>
 				<view style="width: 100%;margin-top: 20rpx;">
 					<view v-for="(item, index) in showDayList" :key="index" class="date_num">
-						<view v-if="item.color == 0" class="date_num_color0" v-show="item.date > 0">
+						<view v-if="item.color == 0" @click="itemClick(item,index)" class="date_num_color0" :class="{active_color:item.date == activeDate}" v-show="item.date > 0">
 							{{ item.date }}
 							<view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
 							<view v-if="item.dot" class="date_dot"></view>
 						</view>
-						<view v-if="item.color == 1" class="date_num_color1">
+						<view v-if="item.color == 1" @click="itemClick(item,index)" class="date_num_color1"  :class="{active_color:item.date == activeDate}">
 							{{ item.date }}
 							<view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
 							<view v-if="item.dot" class="date_dot"></view>
 						</view>
-						<view v-if="item.color == 2" class="date_num_color2">
+						<view v-if="item.color == 2" @click="itemClick(item,index)" class="date_num_color2"  :class="{active_color:item.date == activeDate}">
 							{{ item.date }}
 							<view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
 							<view v-if="item.dot" class="date_dot"></view>
 						</view>
-						<view v-if="item.color == 3" class="date_num_color3">
+						<view v-if="item.color == 3" @click="itemClick(item,index)" class="date_num_color3"  :class="{active_color:item.date == activeDate}">
 							{{ item.date }}
 							<view v-if="item.note > 0" class="date_note">{{ item.note }}</view>
 							<view v-if="item.dot" class="date_dot"></view>
@@ -178,6 +178,7 @@ export default {
 					}
 				}
 			],
+			activeDate:'',
 			dayStudyList: [],
 			listItem: {},
 			currentMonth: 0,
@@ -197,6 +198,32 @@ export default {
 		this.getList();
 	},
 	methods: {
+		itemClick(item,index) {
+			// console.log(item)
+			this.activeDate = item.date;
+			this.workList = this.getStudyCourseByDay();
+		},
+		/**
+		 * 根据选中日期获取需要学习的课程
+		 */
+		getStudyCourseByDay() {
+			let courseList = [];
+			this.showDayList.forEach(day => {
+				if(day.date == this.activeDate) {
+					if(day.daySectionList) {
+						day.daySectionList.forEach(section => {
+							this.listItem.goodsVos.forEach(vos => {
+								if(vos.goodsId == section.goodsId) {
+									courseList.push(vos)
+								}
+							})
+						})
+					}
+				}
+			})
+			
+			return courseList;
+		},
 		planNow(){
 			uni.switchTab({
 			    url: '/pages/course/index'
@@ -230,7 +257,9 @@ export default {
 			this.currentMonth = this.currentMonth + index;
 			let item = this.listItem.calendarStudyVo[this.monthIndex];
 			this.calendarStudyVo = item;
-			this.workList = this.calendarStudyVo.goodsVos;
+			this.activeDate = '';
+			// this.workList = this.calendarStudyVo.goodsVos;
+			this.workList = this.getStudyCourseByDay();
 			if (this.monthIndex > 0) {
 				this.havePreviousMonth = true;
 			}
@@ -244,7 +273,8 @@ export default {
 			let currentMonth = date.getMonth() + 1;
 			this.haveNextMonth = false;
 			this.havePreviousMonth = false;
-			this.workList = this.listItem.goodsVos;
+			this.workList = this.getStudyCourseByDay();
+			// this.workList = this.listItem.goodsVos;
 			if (this.listItem !== undefined) {
 				for (let i = 0; i < this.listItem.calendarStudyVo.length; i++) {
 					let item = this.listItem.calendarStudyVo[i];
@@ -263,6 +293,7 @@ export default {
 			}
 		},
 		openEdit(item) {
+			this.activeDate = '';
 			this.listItem = item;
 			this.isOpen = false;
 			this.dealMonth();
@@ -327,6 +358,7 @@ export default {
 			console.log(this.calendarStudyVo.miniDayStudyList,789)
 			this.calendarStudyVo.miniDayStudyList = this.calendarStudyVo.dayStudyList.slice(start, start + 7);
 			this.showDayList = this.calendarStudyVo.miniDayStudyList;
+			console.log(this.showDayList)
 		},
 		jumpDetail(item) {
 			this.$navTo.togo('/pages2/wd/course', {
@@ -477,15 +509,16 @@ export default {
 	background: #eb4d3d;
 }
 .operate_img {
-	width: 45rpx;
-	height: 45rpx;
+	width: 64rpx;
+	height: 64rpx;
 	border-radius: 50%;
-	padding: 20rpx;
+	padding:14rpx;
+	box-sizing: border-box;
 	margin: 10rpx 0;
 }
 .operate {
-	height: 418rpx;
-	width: 90rpx;
+	margin-top:16rpx;
+	width: 80rpx;
 	display: flex;
 	flex-direction: column;
 	align-items: center;
@@ -538,8 +571,9 @@ export default {
 	min-height: 418rpx;
 	box-shadow: 0rpx 0rpx 16rpx 4rpx rgba(47, 67, 121, 0.05);
 	border-radius: 24rpx;
-	margin-top: 20rpx;
+	margin-top: 16rpx;
 	padding: 15rpx;
+	background:#fff;
 }
 .date_dot {
 	width: 6rpx;
@@ -552,6 +586,7 @@ export default {
 	border-radius: 50%;
 	width: 29rpx;
 	height: 29rpx;
+	line-height: 25rpx;
 	border: 1px solid #ffcc00;
 	font-size: 18rpx;
 	color: #ffcc00;
@@ -596,26 +631,55 @@ export default {
 	margin-top: 20rpx;
 }
 .date_num_color0 {
+	display: inline-block;
+	width: 48rpx;
+	height: 48rpx;
+	line-height: 48rpx;
+	text-align: center;
 	color: #32467b;
 }
 .date_num_color1 {
+	display: inline-block;
+	width: 48rpx;
+	height: 48rpx;
+	line-height: 48rpx;
+	text-align: center;
 	color: #34c759;
 }
 .date_num_color2 {
+	display: inline-block;
+	width: 48rpx;
+	height: 48rpx;
+	line-height: 48rpx;
+	text-align: center;
 	color: #ff3b30;
 }
 .date_num_color3 {
-	color: #ffffff;
-	background-color: #ffcc00;
+	color: #007AFF;
+	background-color: rgba(229,241,255,1);
 	border-radius: 50%;
-	width: 40rpx;
-	height: 40rpx;
+	width: 48rpx;
+	height: 48rpx;
+	line-height: 48rpx;
+	text-align: center;
+	display: inline-block;
+}
+.active_color{
+	color: #fff;
+	background-color: #007AFF;
+	border-radius: 50%;
+	width: 48rpx;
+	height: 48rpx;
+	line-height: 48rpx;
+	text-align: center;
 	display: inline-block;
 }
 .card_date {
 	width: 14%;
 	text-align: center;
 	color: #7f8caf;
+    position: relative;
+    display: inline-block;
 }
 .date_t1 {
 	font-size: 24rpx;
@@ -634,6 +698,6 @@ export default {
 	padding-bottom: 20rpx;
 }
 page {
-	background: #fdfdfd;
+	background: rgba(234,238,241,1);
 }
 </style>

+ 1 - 1
pages2/wd/info.vue

@@ -322,7 +322,7 @@ export default {
 				return
 			}
 			let idCardRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
-			let idCardre15 =  /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
+			let idCardRe15 =  /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
 			if(!idCardRe18.test(this.idCard) && !idCardRe15.test(this.idCard)){
 				
 				uni.showModal({

+ 7 - 2
pages3/polyv/detail.vue

@@ -589,10 +589,15 @@ export default {
 			  this.timer = setInterval(this.timeEventLiving, 1000); //定时器
 		    }
 		    if (status === 'end') {
+				if(this.livePlay){
+					//只有播放过的结束才提交,避免未开播触发结束
+					this.postStudyRecord(1);
+				}
+				 console.log('结束直播');
 				this.livePlay = false
 		      // 未开始
-		      console.log('结束直播');
-			  this.postStudyRecord(1);
+		     
+			  
 		    }
 		},
 		closePlv(){