Преглед изворни кода

Merge branch 'master' of https://gitee.com/he2802/saas_applet

# Conflicts:
#	pages2/course/detail.vue
chenxiong пре 3 година
родитељ
комит
c069fcd38d

+ 1 - 1
components/course/courseChapter.vue

@@ -172,7 +172,7 @@ export default {
 		color: #FFFFFF;
 		font-size: 20rpx;
 		text-align: center;
-		line-height: 20rpx;
+		line-height: 28rpx;
 	}
 	.exam{
 		display: flex;

+ 11 - 1
components/course/courseSection.vue

@@ -25,6 +25,7 @@
 				<view v-if="menuItem.sectionType==null">{{menuItem.name}}</view>
 			</view>
 			<view v-if="isRebuild||menuItem.rebuild>0" class="tagRe">待重修</view>
+			<view v-if="menuItem.learning==1" class="tagGreen">已看完</view>
 		</view>
 		<view v-if="menuItem.tryListen&&!isBuy" class="tryBox">
 			试看
@@ -101,7 +102,7 @@ export default {
 				//切换为同一节
 				return
 			}
-			if(this.playSectionId){
+			if(this.playSectionId>0){
 				//切换视频
 				let oldSectionId = this.playSectionId
 				uni.$emit('changeSection', oldSectionId)
@@ -120,6 +121,15 @@ export default {
 </script>
 
 <style scoped>
+	.tagGreen{
+		width: 80rpx;
+		height: 28rpx;
+		background: #34C759;
+		border-radius: 8rpx;
+		font-size: 20rpx;
+		color: #FFFFFF;
+		text-align: center;
+	}
 	.tagRe{
 		width: 80rpx;
 		height: 28rpx;

+ 20 - 3
pages2/class/detail.vue

@@ -129,9 +129,15 @@
 			</view>
 		</view>
 		<!-- 播放前拍照end -->
-		<u-popup v-model="showSet" :mask-close-able="false" mode="center">
-			<view style="height: 250rpx;display: flex;align-items:center;padding: 0 30rpx;">
-				<button open-type="openSetting" @bindopensetting="openSetting" class="btnSet">相机授权</button>
+		<u-popup v-model="showSet" :mask-close-able="false" mode="center" border-radius="24">
+			<view style="align-items:center;padding: 0 40rpx;display: flex;flex-direction: column;justify-content:center;">
+				<view style="font-weight: bold;color: #333333;font-size: 30rpx;margin-top: 30rpx;">温馨提示</view>
+				<view style="width: 457rpx;color: #666666;font-size: 30rpx;margin-top: 30rpx;">学习过程中需要拍照验证学员身份,
+拍照功能需要使用您的相机。
+是否授权使用?</view>
+				<view style="margin: 30rpx 0;">
+					<button open-type="openSetting" @bindopensetting="openSetting" class="btnSet">去授权</button>
+				</view>
 			</view>
 		</u-popup>
 		
@@ -237,6 +243,17 @@ export default {
 		this.courseDetail();
 		this.getGoodsDetail();
 		this.getAnswerList();
+		let noteSecond = Number(option.noteSecond);
+		if(noteSecond>0){
+			//我的消息跳过来,播放节
+			let item = {
+				sectionId:Number(option.sectionId),
+				recordingUrl:option.recordingUrl,
+				noteSecond:noteSecond
+			}
+			this.$store.commit('setPlaySectionId', {playSectionId  :item.sectionId});
+			this.playNoteVideo(item);
+		}
 		
 	},
 	onShow() {

+ 2 - 2
pages2/course/detail.vue

@@ -40,8 +40,8 @@
 			
 		</view>
 		<view style="padding: 20rpx;position: relative;top: 680rpx;" v-show="current==0">
-			<view class="content" style="padding: 10rpx;">
-				<view v-html="detail.mobileDetailHtml" style="width: 100%;"></view>
+			<view class="content">
+				<view v-html="detail.mobileDetailHtml" style="width: 100%;overflow: hidden;"></view>
 			</view>
 		</view>
 		<view style="padding: 20rpx;padding-bottom: 100rpx;position: relative;top: 680rpx;" v-show="current==1">

+ 11 - 4
pages2/msg/detail.vue

@@ -11,10 +11,10 @@
 					<view class="h33">
 						{{ item.courseName }}{{ item.moduleName ? '/' + item.moduleName : '' }}{{ item.chapterName ? '/' + item.chapterName : '' }}{{ item.sectionName }}
 					</view>
-					<view style="display: flex;align-items: center;margin:28rpx 0rpx;">
+					<view style="display: flex;align-items: center;margin:28rpx 0rpx;"  @click="jumpSection(item)">
 						<image style="width: 35rpx;height: 35rpx;" src="@/static/courseIcon.png" mode=""></image>
 						<text class="timeStys">第{{ item.topicNum }}分钟</text>
-						<text class="aSty" @click="jumpSection(item)">点击可直接跳转</text>
+						<text class="aSty">点击可直接跳转</text>
 					</view>
 				</view>
 				<view class="lsow" style="border-bottom: 1rpx solid #eee;margin-top: 10rpx;" v-for="(item, index) in listData.informVo.informExamVo" :key="index">
@@ -23,7 +23,7 @@
 					<view style="display: flex;align-items: center;margin:28rpx 0rpx;">
 						<image style="width: 35rpx;height: 35rpx;" src="@/static/examIcon.png" mode=""></image>
 						<text class="timeStys">第{{ item.topicNum }}道题</text>
-						<text class="aSty" @click="jumpSection(item)">点击可直接跳转</text>
+						<text class="aSty" @click="jumpExam(item)">点击可直接跳转</text>
 					</view>
 				</view>
 			</view>
@@ -121,7 +121,14 @@ export default {
 		},
 		//跳转节视频
 		jumpSection(item) {
-			console.log(item);
+			item.noteSecond = Number(item.topicNum)*60 //转秒数
+			this.$navTo.togo('/pages2/class/detail', {
+				id: item.courseId,
+				goodsId: item.goodsId,
+				noteSecond:item.noteSecond,
+				sectionId:item.sectionId,
+				recordingUrl:item.recordingUrl
+			});
 		},
 		//跳转题库题目
 		jumpExam(item) {

+ 5 - 2
pages2/plan/create.vue

@@ -3,8 +3,10 @@
 		<view class="list_box">
 			<view class="item" v-for="(item, index) in list" :key="index">
 				<image :src="item.coverUrl"></image>
-				<text>{{ item.goodsName }}</text>
-				<text style="color:#999;margin-left:12rpx;">{{ item.secAllNum }}节</text>
+				<view style="height: 80rpx;overflow: hidden;">
+					<text >{{ item.goodsName }}</text>
+					<text style="color:#999;margin-left:12rpx;">{{ item.secAllNum }}节</text>
+				</view>
 				<view class="del_icon"><u-icon name="minus-circle-fill" color="#EB4D3D" size="40" @click="delItem(index)"></u-icon></view>
 			</view>
 			<view class="item" style="vertical-align: top;">
@@ -496,6 +498,7 @@ input {
 .item text {
 	font-size: 24rpx;
 	color: #0c141f;
+	
 }
 .item image {
 	border-radius: 32rpx;

+ 1 - 1
pages2/plan/index.vue

@@ -60,7 +60,7 @@
 										}}截止
 									</text>
 								</u-col>
-								<u-col span="1"><image src="/static/icon/openSwith.png" class="img_more" @click.stop="openShow(item)"></image></u-col>
+								<u-col span="1"><image style="transform: rotate(180deg);" src="/static/icon/openSwith.png" class="img_more" @click.stop="openShow(item)"></image></u-col>
 							</u-row>
 							<scroll-view style="white-space: nowrap" class="scroll-view_H" scroll-x="true">
 								<view style="margin-top: 30rpx;display: inline-block;width:296rpx;margin-right: 30rpx;" v-for="(items, indexs) in item.goodsVos" :key="indexs">

+ 4 - 4
pages2/wd/class.vue

@@ -1,6 +1,6 @@
 <template>
 	<view style="padding: 30rpx;">
-		<navigator  hover-class="none" :url="'/pages2/wd/course?id=' + item.goodsId" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
+		<navigator  hover-class="none" :url="`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}`" v-for="(item, index) in goodsList" :key="index" style="margin-bottom: 30rpx;">
 			<view class="class_item">
 				<image :src="$method.splitImgHost(item.coverUrl, true)" style="height: 316rpx;width: 100%;border-radius: 24rpx;"></image>
 				<view style="color: #333333;font-weight: bold;font-size: 32rpx;">{{ item.goodsName }}</view>
@@ -27,7 +27,7 @@
 				</view>
 				<view class="box_progress">
 					<view style="width: 60%;"><u-line-progress :showText="false" active-color="#ff9900" :show-percent="false" :percent="(item.stuAllNum / item.secAllNum) * 100"></u-line-progress></view>
-					<view><u-button type="warning" size="mini" @click.stop="studyIn(item.goodsId)">进入学习</u-button></view>
+					<view><u-button type="warning" size="mini" @click.stop="studyIn(item.goodsId,item.gradeId)">进入学习</u-button></view>
 				</view>
 				<view class="box_progress" v-if="item.applyStatus === 1">
 					<view style="width: 60%;">
@@ -98,8 +98,8 @@ export default {
 				}
 			});
 		},
-		studyIn(v) {
-			this.$navTo.togo('/pages2/wd/course?id=' + v);
+		studyIn(v,i) {
+			this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}`);
 		},
 		appointment(item) {
 			var data = {

+ 4 - 1
pages2/wd/course.vue

@@ -27,6 +27,7 @@ export default {
 	data() {
 		return {
 			goodsId: 0,
+			gradeId:0,
 			courseList: [],
 			param:{
 				pageNum: 1,
@@ -38,6 +39,7 @@ export default {
 	},
 	onLoad(option) {
 		this.goodsId = Number(option.id);
+		this.gradeId = Number(option.gid)
 		// uni.setStorageSync('courseGoodsId', this.goodsId);
 		this.courseCourseList();
 		this.$store.getters.dictObj
@@ -52,7 +54,7 @@ export default {
 		jump(item) {
 			this.$navTo.togo('/pages2/class/detail', {
 				id: item.courseId,
-				goodsId: this.goodsId
+				goodsId: this.goodsId,
 			});
 		},
 		studyIn(item) {
@@ -65,6 +67,7 @@ export default {
 		courseCourseList() {
 			let self = this;
 			this.param.goodsId =this.goodsId
+			this.param.gradeId = this.gradeId
 			this.$api.courseCourseList(this.param).then(res => {
 				if (res.data.code == 200) {
 					self.courseList.push.apply(self.courseList, res.data.rows);