|
@@ -150,6 +150,7 @@
|
|
|
:menuItem="item"
|
|
|
:levelId="item.menuId"
|
|
|
:goodsType='1'
|
|
|
+ :menuAllList="menuAllList"
|
|
|
></courseModule
|
|
|
></view>
|
|
|
<!--章 -->
|
|
@@ -169,6 +170,7 @@
|
|
|
:menuItem="item"
|
|
|
:levelId="'0-' + item.menuId"
|
|
|
:goodsType='1'
|
|
|
+ :menuAllList="menuAllList"
|
|
|
></courseChapter
|
|
|
></view>
|
|
|
<!--节 -->
|
|
@@ -189,6 +191,7 @@
|
|
|
:levelId="'0-0-' + item.menuId"
|
|
|
:goodsType='1'
|
|
|
:testType="3"
|
|
|
+ :menuAllList="menuAllList"
|
|
|
></courseSection
|
|
|
></view>
|
|
|
<!-- @togoBack="togoBack($event)" -->
|
|
@@ -532,19 +535,24 @@
|
|
|
<u-popup
|
|
|
v-model="noticeShow"
|
|
|
class="notice_modal"
|
|
|
- @close="closeNotice"
|
|
|
mode="center"
|
|
|
- border-radius="14"
|
|
|
- width="700rpx"
|
|
|
- height="900rpx"
|
|
|
+ border-radius="28"
|
|
|
+ width="650rpx"
|
|
|
+ height="622rpx"
|
|
|
+ :mask-close-able="false"
|
|
|
+ @close="closeNotice"
|
|
|
>
|
|
|
<div class="content">
|
|
|
- <scroll-view scroll-y="true" style="height: 100%">
|
|
|
<view class="title">学员须知</view>
|
|
|
- <text class="text">
|
|
|
- {{ goodsData.buyNote }}
|
|
|
- </text>
|
|
|
- </scroll-view>
|
|
|
+ <scroll-view scroll-y="true">
|
|
|
+ <view class="text" v-html="goodsData.buyNote && goodsData.buyNote.replace(/\n|\r\n/g, '<br>')">
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="had_read" :class="{'gray': CountTo >= 0}" @click="noticeConfirm()">
|
|
|
+ <text v-if="CountTo >= 0">请阅读学员须知,30s后可关闭</text>
|
|
|
+ <text v-else>我已阅读学员须知</text>
|
|
|
+ <text v-if="CountTo >= 0">{{ ' ' + CountTo + 's' }}</text>
|
|
|
+ </view>
|
|
|
</div>
|
|
|
</u-popup>
|
|
|
|
|
@@ -599,7 +607,7 @@
|
|
|
<text> {{ item.stuAllNum + item.recordNum }}/{{ item.secAllNum + item.examNum}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="course_rights" @click="jump(item, index, 'jump')">
|
|
|
+ <view class="course_rights" @click="jump(item, gTindex, 'jump')">
|
|
|
<view class="cicles">
|
|
|
<u-icon name="arrow-right" color="#498AFE" size="20"></u-icon>
|
|
|
</view>
|
|
@@ -742,6 +750,8 @@ export default {
|
|
|
compareFaceData: 0, // 拍照匹配相似度
|
|
|
prendreAutoCarme: false, // 是否发起授权相机
|
|
|
studyTimer: null, // 学习记录定时器
|
|
|
+ CountTo: 30, // 倒计时
|
|
|
+ menuAllList: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -766,7 +776,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
- console.log('index:--onLoad')
|
|
|
+ console.log('--option--', option);
|
|
|
this.courseId = Number(option.id) || '';
|
|
|
this.goodsId = Number(option.goodsId);
|
|
|
this.orderGoodsId = Number(option.orderGoodsId) || '';
|
|
@@ -775,39 +785,32 @@ export default {
|
|
|
this.option = option
|
|
|
|
|
|
// 公众号模板消息的数据埋点
|
|
|
- if (option.informId) { // 从公众号消息点击进来上报一次,其他地方进来和没登录需要跳到登录页,登录后返回的不需要上报
|
|
|
+ if (option.informId) {
|
|
|
this.informId = option.informId
|
|
|
- this.clickOfficial()
|
|
|
+ // this.clickOfficial()
|
|
|
}
|
|
|
|
|
|
- this.$store.getters.dictObj;
|
|
|
- },
|
|
|
- onReady() {
|
|
|
- console.log('index:--onReady')
|
|
|
},
|
|
|
onShow() {
|
|
|
- console.log('index:--onShow')
|
|
|
+ console.log('this.option:', this.option);
|
|
|
if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
|
|
|
return;
|
|
|
}
|
|
|
+ console.log('onshow返回之后');
|
|
|
this.courseCourseList();
|
|
|
+ this.informId && this.clickOfficial() // 从公众号消息点击进来上报一次
|
|
|
+ this.$store.getters.dictObj;
|
|
|
},
|
|
|
onUnload() {
|
|
|
- console.log('index:--onUnload')
|
|
|
this.originUnload()
|
|
|
},
|
|
|
onHide() {
|
|
|
- console.log('index:--onHide')
|
|
|
this.originUnload()
|
|
|
},
|
|
|
mounted() {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(["updateChapterOpen","updateLiveLast"]),
|
|
|
- // 调用节的方法
|
|
|
- // togoBack(value) {
|
|
|
- // this.$refs.MoudleSection[0].ModuleExam()
|
|
|
- // },
|
|
|
// 新增微信公众号模板消息点击数据
|
|
|
clickOfficial() {
|
|
|
this.$http({
|
|
@@ -816,6 +819,7 @@ export default {
|
|
|
data: { informId: this.informId }
|
|
|
}).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
+ console.log('上报埋点');
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -848,7 +852,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.subList = [...allItem, ...newArr]
|
|
|
-
|
|
|
+ console.log('this.courseList:', this.courseList, 'length:',res.data.rows.length);
|
|
|
if (res.data.rows.length) {
|
|
|
this.courseBusiness(res.data.rows[0].businessId)
|
|
|
}
|
|
@@ -866,6 +870,7 @@ export default {
|
|
|
* 获取业务层次详情
|
|
|
*/
|
|
|
courseBusiness(businessId) {
|
|
|
+ // '/app/common/course/business/'+data,
|
|
|
this.$api.courseBusiness(businessId).then((res) => {
|
|
|
this.businessData = res.data.data
|
|
|
});
|
|
@@ -961,7 +966,7 @@ export default {
|
|
|
this.goodsTeacher.push(data)
|
|
|
})
|
|
|
}
|
|
|
- // console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
|
|
|
+ console.log(this.goodsTeacher,'this.goodsTeacher', this.courseId);
|
|
|
this.goodsTeacher.forEach((item) => {
|
|
|
if(item.courseList.some(x => x.courseId == this.courseId)){
|
|
|
this.teacherList = item.teaList
|
|
@@ -1098,7 +1103,9 @@ export default {
|
|
|
action: "jxjy",
|
|
|
uuid:this.$method.getUuid()
|
|
|
})
|
|
|
- .then((res) => {});
|
|
|
+ .then((res) => {
|
|
|
+ uni.hideLoading()
|
|
|
+ });
|
|
|
}
|
|
|
uni.removeStorageSync('current')
|
|
|
},
|
|
@@ -1123,26 +1130,11 @@ export default {
|
|
|
},
|
|
|
// 进入学习
|
|
|
async jump(item, index, type) {
|
|
|
- // console.log('item------>', index,item,'courseId:',item.courseId, 'goodsId:', this.goodsId, 'orderGoodsId:',item.orderGoodsId)
|
|
|
- this.vid = ''
|
|
|
- this.hasStart = true
|
|
|
- await this.originUnload()
|
|
|
+ // console.log('item------>', index,item,this.goodsTeacher)
|
|
|
|
|
|
- if (type) {
|
|
|
- this.teacherIndex = 0
|
|
|
- this.goodsTeacher.forEach((citem) => {
|
|
|
- if(citem.courseList.some(x => x.courseId == item.courseId)){
|
|
|
- this.teacherList = citem.teaList
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- this.reStart = false
|
|
|
- this.courseId = item.courseId
|
|
|
- this.gradeId = item.gradeId
|
|
|
- this.toggleCourseShow = false
|
|
|
-
|
|
|
-
|
|
|
if (index == 0) {
|
|
|
+ await this.nextCourses(item, type)
|
|
|
+
|
|
|
if (item.rebuild === 0) {
|
|
|
//未重修
|
|
|
this.$navTo.togo("/pages2/learn/details", {
|
|
@@ -1191,9 +1183,10 @@ export default {
|
|
|
//学习顺序是从头到尾学习,没学完上一课不能学习下一课
|
|
|
let prevItem = this.courseList[index - 1]; //上一课
|
|
|
if (
|
|
|
- prevItem.stuAllNum + prevItem.recordNum ==
|
|
|
- prevItem.secAllNum + prevItem.examNum
|
|
|
+ prevItem.stuAllNum == prevItem.secAllNum
|
|
|
) {
|
|
|
+ await this.nextCourses(item, type)
|
|
|
+
|
|
|
if (item.rebuild === 0) {
|
|
|
//未重修
|
|
|
this.$navTo.togo("/pages2/learn/details", {
|
|
@@ -1243,6 +1236,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+ await this.nextCourses(item, type)
|
|
|
if (item.rebuild === 0) {
|
|
|
//未重修
|
|
|
this.$navTo.togo("/pages2/learn/details", {
|
|
@@ -1288,8 +1282,29 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ async nextCourses(item, type) {
|
|
|
+ this.vid = ''
|
|
|
+ this.hasStart = true
|
|
|
+ await this.originUnload()
|
|
|
+
|
|
|
+ if (type) {
|
|
|
+ this.teacherIndex = 0
|
|
|
+ this.goodsTeacher.forEach((citem) => {
|
|
|
+ if(citem.courseList.some(x => x.courseId == item.courseId)){
|
|
|
+ this.teacherList = citem.teaList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.reStart = false
|
|
|
+ this.courseId = item.courseId
|
|
|
+ this.gradeId = item.gradeId
|
|
|
+ this.toggleCourseShow = false
|
|
|
+ },
|
|
|
clickLeft() {
|
|
|
- uni.navigateBack()
|
|
|
+ // uni.navigateBack()
|
|
|
+ uni.switchTab({
|
|
|
+ url:'/pages/learn/index'
|
|
|
+ })
|
|
|
},
|
|
|
markCancel() {
|
|
|
uni.navigateBack({
|
|
@@ -1316,13 +1331,28 @@ export default {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
+ noticeConfirm() {
|
|
|
+ if (this.CountTo < 0) {
|
|
|
+ this.noticeShow = false
|
|
|
+ }
|
|
|
+ },
|
|
|
baseHandoutTipList() {
|
|
|
this.$api.baseHandoutTipList({
|
|
|
orderGoodsId:this.orderGoodsId
|
|
|
}).then(res => {
|
|
|
if(res.data.rows.length == 0) {
|
|
|
this.noticeShow = true;
|
|
|
- }
|
|
|
+ if (this.CountTo == 30) {
|
|
|
+ var timer = setInterval(() => {
|
|
|
+ this.CountTo--
|
|
|
+ if( this.CountTo < 0 ) {
|
|
|
+ clearInterval(timer)
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.CountTo = -1
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
@@ -1545,6 +1575,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
} else {
|
|
|
+ console.log('--模块大节播放完毕,刷新列表-');
|
|
|
//没有重修目录
|
|
|
this.$api
|
|
|
.reMenuList({ courseId: this.courseId, gradeId: this.gradeId ,orderGoodsId: this.orderGoodsId,})
|
|
@@ -1571,6 +1602,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
studyRecordMenuAllList() {
|
|
|
+ // study/record/menuAllList
|
|
|
this.$api.studyRecordMenuAllList({
|
|
|
courseId:this.courseId,
|
|
|
gradeId:this.gradeId,
|
|
@@ -1579,7 +1611,8 @@ export default {
|
|
|
let nowTime = Number(new Date().getTime()/1000).toFixed(0)
|
|
|
// this.livingItem = res.data.data[0]
|
|
|
if (res.data.data) {
|
|
|
- this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
|
|
|
+ this.menuAllList = res.data.data
|
|
|
+ this.livingItem = res.data.data.find(item => item.liveStartTime<=nowTime&&item.liveEndTime>nowTime);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -2382,6 +2415,7 @@ export default {
|
|
|
this.$api.studyRecord(data).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
if (status > 0) {
|
|
|
+ this.studyRecordMenuAllList()
|
|
|
let moduleId = this.moduleId || 0;
|
|
|
let chapterId = this.chapterId || 0;
|
|
|
let playNextIdisRebuild = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}isRebuild`;
|
|
@@ -2391,6 +2425,7 @@ export default {
|
|
|
fromRebuild: this.isRebuild,
|
|
|
}); //通知播放结束,不来自重修目录的点击不用弹窗学习下一节
|
|
|
uni.$emit("playNext" + playNextId); //通知播放结束
|
|
|
+ console.log("playNext" + playNextIdisRebuild, '-----l', "playNext" + playNextId);
|
|
|
}
|
|
|
|
|
|
self.ossAvatarUrl = "";
|
|
@@ -2401,7 +2436,9 @@ export default {
|
|
|
title: res.data.msg,
|
|
|
});
|
|
|
}
|
|
|
- });
|
|
|
+ }).catch(err => {
|
|
|
+ this.studyRecordMenuAllList()
|
|
|
+ })
|
|
|
},
|
|
|
uploadFile(options, int) {
|
|
|
var self = this;
|
|
@@ -2788,6 +2825,7 @@ export default {
|
|
|
},
|
|
|
getGoodsDetail() {
|
|
|
let self = this;
|
|
|
+ // '/goods/'+ data,
|
|
|
this.$api.goodsDetail(this.goodsId).then((res) => {
|
|
|
this.goodsData = res.data.data;
|
|
|
if(self.goodsData.buyNote) {
|
|
@@ -2843,6 +2881,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getReMenuList() {
|
|
|
+ console.log('重修的目录');
|
|
|
let self = this;
|
|
|
this.$api
|
|
|
.reMenuList({
|
|
@@ -2860,6 +2899,7 @@ export default {
|
|
|
item.name = item.menuName;
|
|
|
}
|
|
|
self.reMenuList = res.data.rows;
|
|
|
+ console.log('reMenuList:' , this.reMenuList);
|
|
|
if (self.reMenuList.length > 0) {
|
|
|
this.showNotes = false;
|
|
|
self.list = [
|
|
@@ -2899,6 +2939,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getMenuList() {
|
|
|
+ console.log('menuList的目录');
|
|
|
let self = this;
|
|
|
// /course/menuList 查询课程目录结构列表
|
|
|
this.$api
|
|
@@ -2923,11 +2964,13 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ console.log('menuList: ---', this.menuList, 'menuIndex:', this.menuIndex);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
courseDetail() {
|
|
|
let self = this;
|
|
|
+ // '/course/'+data,
|
|
|
this.$api.courseDetail(this.courseId).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
// if (res.data.data.educationName == "继续教育") {
|
|
@@ -3725,17 +3768,37 @@ page {
|
|
|
.content {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- padding: 20rpx;
|
|
|
+ padding: 56rpx 56rpx 56rpx 64rpx;
|
|
|
|
|
|
.title {
|
|
|
- color: #333;
|
|
|
+ color: #222;
|
|
|
line-height: 40rpx;
|
|
|
- font-size: 30rpx;
|
|
|
+ font-size: 36rpx;
|
|
|
text-align: center;
|
|
|
font-weight: bold;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
}
|
|
|
.text {
|
|
|
+ height: 340rpx;
|
|
|
line-height: 40rpx;
|
|
|
+ text-indent: 2em;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #222;
|
|
|
+ }
|
|
|
+ .had_read {
|
|
|
+ width: 100%;
|
|
|
+ height: 88rpx;
|
|
|
+ line-height: 88rpx;
|
|
|
+ text-align: center;
|
|
|
+ background: #3577E8;
|
|
|
+ border-radius: 240rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #fff;
|
|
|
+ margin-top: 20rpx;
|
|
|
+ &.gray {
|
|
|
+ background: #BBBEC5;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|