|
|
@@ -88,6 +88,10 @@
|
|
|
</u-col>
|
|
|
</u-row>
|
|
|
</view>
|
|
|
+ <view class="course-list" v-if="courseList.length > 1">
|
|
|
+ <picker class="picker" @change="courseChange2" range-key='courseName' :range="courseList">{{courseName}}</picker>
|
|
|
+ <u-icon name="arrow-down"></u-icon>
|
|
|
+ </view>
|
|
|
<u-line color="#D6D6DB" />
|
|
|
<view>
|
|
|
<view
|
|
|
@@ -555,6 +559,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ courseName:'',
|
|
|
markContent: "http://admin.zhujianpeixun.com/",
|
|
|
showMark: false,
|
|
|
hasStart: false,
|
|
|
@@ -622,6 +627,7 @@ export default {
|
|
|
placeholder: "您可以在这里输入答疑内容",
|
|
|
ctxValue: "",
|
|
|
noteList: [],
|
|
|
+ courseList:[],
|
|
|
noteValue: "",
|
|
|
noteId: 0,
|
|
|
recordObj: 0,
|
|
|
@@ -687,7 +693,7 @@ export default {
|
|
|
// this.studyRecordQueryLiveLast();
|
|
|
// }
|
|
|
},
|
|
|
- onShow() {
|
|
|
+ async onShow() {
|
|
|
var self = this;
|
|
|
//相机授权
|
|
|
// this.userConfirmInfoDetail().then(res => {
|
|
|
@@ -698,39 +704,37 @@ export default {
|
|
|
this.showMark = true;
|
|
|
return;
|
|
|
}
|
|
|
- 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();
|
|
|
- }
|
|
|
+ await this.getGoodsDetail();
|
|
|
+ this.getbaseprofiletplists().then(async (res) => {
|
|
|
+ await this.courseCourseList();
|
|
|
+ if(this.option.recordingUrl) {
|
|
|
+ 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);
|
|
|
@@ -821,6 +825,51 @@ export default {
|
|
|
delta: 1,
|
|
|
});
|
|
|
},
|
|
|
+ courseCourseList() {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ this.$api.courseCourseList({
|
|
|
+ gradeId:this.gradeId,
|
|
|
+ goodsId:this.goodsId,
|
|
|
+ pageSize:10,
|
|
|
+ pageNum:1,
|
|
|
+ }).then(async (res) => {
|
|
|
+ this.courseList.push(...res.data.rows);
|
|
|
+ if (!this.courseId) {
|
|
|
+ this.courseId = this.courseList[0].courseId;
|
|
|
+ this.courseName = this.courseList[0].courseName;
|
|
|
+ } else {
|
|
|
+ this.courseName = this.courseList.find(item => item.courseId == this.courseId).courseName;
|
|
|
+ }
|
|
|
+ await this.courseChange();
|
|
|
+
|
|
|
+ resolve();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ courseChange2(e) {
|
|
|
+ this.courseId = this.courseList[e.detail.value].courseId;
|
|
|
+ this.courseName = this.courseList[e.detail.value].courseName;
|
|
|
+ this.courseChange();
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 切换科目
|
|
|
+ */
|
|
|
+ courseChange() {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+
|
|
|
+ this.courseDetail();
|
|
|
+ this.getAnswerList();
|
|
|
+ this.studyRecordMenuAllList();
|
|
|
+ this.getNoteList();
|
|
|
+ this.getMenuList();
|
|
|
+ this.getReMenuList(); //获取重修目录
|
|
|
+ clearTimeout(this.answerTimer)
|
|
|
+ this.answerTimer = setInterval(() => {
|
|
|
+ this.getAnswerList();
|
|
|
+ }, 5000);
|
|
|
+ resolve();
|
|
|
+ });
|
|
|
+ },
|
|
|
markConfirm() {
|
|
|
uni.setClipboardData({
|
|
|
data: this.markContent,
|
|
|
@@ -1684,7 +1733,6 @@ export default {
|
|
|
}
|
|
|
this.startStatus = true;
|
|
|
//获取节笔记
|
|
|
- this.getNoteList();
|
|
|
},
|
|
|
//正常播放视频
|
|
|
async playVideo(item) {
|
|
|
@@ -2320,48 +2368,51 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getGoodsDetail() {
|
|
|
- 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();
|
|
|
- this.courseHandouts();
|
|
|
- self.getMenuList();
|
|
|
- self.getReMenuList(); //获取重修目录
|
|
|
- setTimeout(function () {
|
|
|
- if (!self.needProfileModal) {
|
|
|
- self.getGradeInfo();
|
|
|
- }
|
|
|
- }, 500);
|
|
|
-
|
|
|
- //获取节笔记
|
|
|
- this.getNoteList();
|
|
|
- if (self.goodsData.goodsPlayConfig) {
|
|
|
- self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
|
|
|
- if (self.goodsPlayConfig.autoPlay > 0) {
|
|
|
- self.autoplay = true;
|
|
|
- }
|
|
|
- if (self.goodsPlayConfig.drag > 0) {
|
|
|
- self.isAllowSeek = "yes";
|
|
|
- }
|
|
|
- if (self.goodsPlayConfig.speed > 0) {
|
|
|
- self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
|
|
|
- }
|
|
|
- }
|
|
|
- if (self.goodsData.goodsPhotographConfig) {
|
|
|
- self.goodsPhotographConfig = JSON.parse(
|
|
|
- self.goodsData.goodsPhotographConfig
|
|
|
- );
|
|
|
- if (self.goodsPhotographConfig.photoNum > 0) {
|
|
|
- self.photoNum = self.goodsPhotographConfig.photoNum;
|
|
|
- console.log(self.photoNum, 777777);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ return new Promise(resolve => {
|
|
|
+ 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();
|
|
|
+ this.courseHandouts();
|
|
|
+ setTimeout(function () {
|
|
|
+ if (!self.needProfileModal) {
|
|
|
+ self.getGradeInfo();
|
|
|
+ }
|
|
|
+ }, 500);
|
|
|
+
|
|
|
+ //获取节笔记
|
|
|
+ this.getNoteList();
|
|
|
+ if (self.goodsData.goodsPlayConfig) {
|
|
|
+ self.goodsPlayConfig = JSON.parse(self.goodsData.goodsPlayConfig);
|
|
|
+ if (self.goodsPlayConfig.autoPlay > 0) {
|
|
|
+ self.autoplay = true;
|
|
|
+ }
|
|
|
+ if (self.goodsPlayConfig.drag > 0) {
|
|
|
+ self.isAllowSeek = "yes";
|
|
|
+ }
|
|
|
+ if (self.goodsPlayConfig.speed > 0) {
|
|
|
+ self.playbackRate = [0.5, 0.8, 1.0, 1.25, 1.5, 2.0];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (self.goodsData.goodsPhotographConfig) {
|
|
|
+ self.goodsPhotographConfig = JSON.parse(
|
|
|
+ self.goodsData.goodsPhotographConfig
|
|
|
+ );
|
|
|
+ if (self.goodsPhotographConfig.photoNum > 0) {
|
|
|
+ self.photoNum = self.goodsPhotographConfig.photoNum;
|
|
|
+ console.log(self.photoNum, 777777);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ resolve()
|
|
|
+ });
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
startVideo() {
|
|
|
this.startStatus = true;
|
|
|
@@ -2572,6 +2623,23 @@ export default {
|
|
|
.desc {
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+.course-list {
|
|
|
+ padding:0 24rpx;
|
|
|
+ margin:24rpx 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 70rpx;
|
|
|
+ background: #fff;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ background:#fff;
|
|
|
+ border-radius: 16rpx;
|
|
|
+
|
|
|
+ .picker {
|
|
|
+ flex:1;
|
|
|
+ }
|
|
|
}
|
|
|
.polyv_detail {
|
|
|
display: flex;
|