|
@@ -41,6 +41,7 @@
|
|
|
:playbackRate="playbackRate"
|
|
|
:startTime="startTime"
|
|
|
:enableAutoRotation="enableAutoRotation"
|
|
|
+ @loadedmetadata="loadedmetadata"
|
|
|
></polyv-player>
|
|
|
<cover-view
|
|
|
class="video-toast__close"
|
|
@@ -69,7 +70,6 @@
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view>
|
|
|
<u-row>
|
|
|
<u-col span="10">
|
|
@@ -107,6 +107,7 @@
|
|
|
<!--模块 -->
|
|
|
<view v-if="item.type == 1"
|
|
|
><courseModule
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
:sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
:needOpen="menuIndex[0] === index ? true : false"
|
|
|
:courseId="courseId"
|
|
@@ -122,6 +123,7 @@
|
|
|
<!--章 -->
|
|
|
<view v-if="item.type == 2"
|
|
|
><courseChapter
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
:sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
:needOpen="menuIndex[0] === index ? true : false"
|
|
|
:courseId="courseId"
|
|
@@ -138,6 +140,7 @@
|
|
|
<!--节 -->
|
|
|
<view v-if="item.type == 3"
|
|
|
><courseSection
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
:sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
@playEnd="sectionPlayEnd($event, index)"
|
|
|
:courseId="courseId"
|
|
@@ -332,6 +335,7 @@
|
|
|
<!--模块 -->
|
|
|
<view v-if="item.type == 1"
|
|
|
><courseModule
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
:sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
:courseId="courseId"
|
|
|
:goodsId="goodsId"
|
|
@@ -345,6 +349,7 @@
|
|
|
<!--章 -->
|
|
|
<view v-if="item.type == 2">
|
|
|
<courseChapter
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
:courseId="courseId"
|
|
|
:sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
@playEnd="sectionPlayEnd($event, index)"
|
|
@@ -359,6 +364,7 @@
|
|
|
<!--节 -->
|
|
|
<view v-if="item.type == 3">
|
|
|
<courseSection
|
|
|
+ :orderGoodsId="orderGoodsId"
|
|
|
:courseId="courseId"
|
|
|
:sectionMaxNum="goodsData.sectionMaxNum"
|
|
|
@playEnd="sectionPlayEnd($event, index)"
|
|
@@ -590,7 +596,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID"]),
|
|
|
+ ...mapGetters(["userInfo", "playSectionId", "playChannelId", "playVID","playObj"]),
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.courseId = Number(option.id);
|
|
@@ -624,7 +630,7 @@ export default {
|
|
|
var self = this;
|
|
|
//相机授权
|
|
|
this.getCameraSetting();
|
|
|
- this.$api.getbaseprofiletplists({ goodsId: self.goodsId }).then((res) => {
|
|
|
+ this.$api.getbaseprofiletplists({ goodsId: self.goodsId,orderGoodsId: this.orderGoodsId, }).then((res) => {
|
|
|
console.log(res, "res");
|
|
|
if (res.data.code === 200 && res.data.rows.length) {
|
|
|
if (res.data.rows[0].keyValue) {
|
|
@@ -756,12 +762,16 @@ export default {
|
|
|
this.getGradeInfo();
|
|
|
}
|
|
|
},
|
|
|
+ onHide() {
|
|
|
+
|
|
|
+ },
|
|
|
onUnload() {
|
|
|
if (this.playSectionId > 0) {
|
|
|
//退出提交记录
|
|
|
this.postStudyRecord();
|
|
|
}
|
|
|
//清除正在播放的节ID
|
|
|
+ this.$store.commit('setPlayObj',null)
|
|
|
this.$store.commit("setPlaySectionId", { playSectionId: 0 });
|
|
|
this.$store.commit("setPlayChannelId", { playChannelId: 0 });
|
|
|
this.$store.commit("setPlayVID", { playVID: null });
|
|
@@ -828,7 +838,7 @@ export default {
|
|
|
this.updateChapterOpen(true);
|
|
|
},
|
|
|
methods: {
|
|
|
- ...mapMutations(["updateChapterOpen"]),
|
|
|
+ ...mapMutations(["updateChapterOpen","setPlayObj"]),
|
|
|
/**
|
|
|
* 模块大节播放完毕,刷新列表
|
|
|
*/
|
|
@@ -841,6 +851,7 @@ export default {
|
|
|
//从重修点击
|
|
|
this.$api
|
|
|
.reMenuList({
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
courseId: this.courseId,
|
|
|
rebuild: 1,
|
|
|
gradeId: this.gradeId,
|
|
@@ -907,7 +918,7 @@ export default {
|
|
|
});
|
|
|
|
|
|
this.$api
|
|
|
- .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
|
|
|
+ .reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
|
|
|
.then((res) => {
|
|
|
console.log("noRebuild1");
|
|
|
if (res.data.code == 200) {
|
|
@@ -927,7 +938,7 @@ export default {
|
|
|
} else {
|
|
|
//从普通目录点击
|
|
|
this.$api
|
|
|
- .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
|
|
|
+ .reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
|
|
|
.then((res) => {
|
|
|
console.log("noRebuild2");
|
|
|
if (res.data.code == 200) {
|
|
@@ -939,6 +950,7 @@ export default {
|
|
|
|
|
|
this.$api
|
|
|
.reMenuList({
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
courseId: this.courseId,
|
|
|
rebuild: 1,
|
|
|
gradeId: this.gradeId,
|
|
@@ -1001,7 +1013,7 @@ export default {
|
|
|
} else {
|
|
|
//没有重修目录
|
|
|
this.$api
|
|
|
- .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
|
|
|
+ .reMenuList({ courseId: this.courseId, gradeId: this.gradeId ,orderGoodsId: this.orderGoodsId,})
|
|
|
.then((res) => {
|
|
|
console.log("noRebuild3");
|
|
|
console.log("noRebuild3index", index);
|
|
@@ -1044,6 +1056,17 @@ export default {
|
|
|
}
|
|
|
return {};
|
|
|
},
|
|
|
+ loadedmetadata(e) {
|
|
|
+ var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
|
+
|
|
|
+ uni.$off('playPause')
|
|
|
+ uni.$on('playPause',() => {
|
|
|
+ polyvPlayerContext.pause()
|
|
|
+ })
|
|
|
+ if(!this.recordObj.videoCurrentTime) { //新视频直接提交一条观看记录
|
|
|
+ this.postStudyRecord(0)
|
|
|
+ }
|
|
|
+ },
|
|
|
getPhotoLastRecord() {
|
|
|
let self = this;
|
|
|
let data = {
|
|
@@ -1053,6 +1076,7 @@ export default {
|
|
|
gradeId: parseInt(self.gradeId),
|
|
|
chapterId: parseInt(self.chapterId),
|
|
|
moduleId: parseInt(self.moduleId),
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
this.$api.getPhotoLastRecord(data).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
@@ -1093,6 +1117,7 @@ export default {
|
|
|
chapterId: parseInt(self.chapterId),
|
|
|
moduleId: parseInt(self.moduleId),
|
|
|
timeInterval: postTime ? self.photoList.join(",") : "",
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
console.log("提交接口", data);
|
|
|
this.$api
|
|
@@ -1219,6 +1244,7 @@ export default {
|
|
|
return new Promise((resolve) => {
|
|
|
let data = {
|
|
|
channelId: channelId,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
self.$api.polyvSign(data).then((res) => {
|
|
|
resolve(res.data.data);
|
|
@@ -1384,10 +1410,10 @@ export default {
|
|
|
if (this.vid) {
|
|
|
//切换视频
|
|
|
var polyvPlayerContext = this.selectComponent("#playerVideo");
|
|
|
- console.log(polyvPlayerContext, "polyvPlayerContext");
|
|
|
polyvPlayerContext.changeVid(item.recordingUrl);
|
|
|
} else {
|
|
|
this.vid = item.recordingUrl;
|
|
|
+
|
|
|
}
|
|
|
this.recordObj = null;
|
|
|
this.recordObj = await this.getRecordLast();
|
|
@@ -1407,6 +1433,7 @@ export default {
|
|
|
courseId: Number(self.courseId),
|
|
|
chapterId: parseInt(self.chapterId),
|
|
|
moduleId: parseInt(self.moduleId),
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
self.$api.recordLast(data).then((res) => {
|
|
|
resolve(res.data.data);
|
|
@@ -1472,6 +1499,7 @@ export default {
|
|
|
noteText: this.noteValue,
|
|
|
noteDate: noteDate,
|
|
|
noteSecond: noteSecond,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
this.$api.postNote(data).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
@@ -1527,6 +1555,7 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
goodsId: this.goodsId,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
if (this.playSectionId > 0) {
|
|
|
data.sectionId = this.playSectionId;
|
|
@@ -1539,7 +1568,7 @@ export default {
|
|
|
},
|
|
|
delAnswer(answerId) {
|
|
|
let self = this;
|
|
|
- let data = { answerId: answerId, status: -1 };
|
|
|
+ let data = { answerId: answerId, status: -1 ,orderGoodsId: this.orderGoodsId,};
|
|
|
this.$api.delAnswer(data).then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
self.getAnswerList();
|
|
@@ -1565,6 +1594,7 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
answerText: this.ctxValue,
|
|
|
goodsId: this.goodsId,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
if (this.assignUserId > 0) {
|
|
|
data.assignUserId = this.assignUserId;
|
|
@@ -1604,6 +1634,7 @@ export default {
|
|
|
sectionId: parseInt(sectionId),
|
|
|
goodsId: parseInt(self.goodsId),
|
|
|
courseId: parseInt(self.courseId),
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
studyDuration: parseInt(
|
|
|
PlayDuration > 0 ? PlayDuration : self.studyDuration
|
|
|
),
|
|
@@ -1647,11 +1678,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
uploadFile(options, int) {
|
|
|
+ console.log(options)
|
|
|
var self = this;
|
|
|
return new Promise((resolve, reject) => {
|
|
|
var data = {
|
|
|
imageStatus: int,
|
|
|
gradeId: this.gradeId,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
};
|
|
|
self.$api.aliyunpolicy(data).then((res) => {
|
|
|
if (res.data.code != 200) {
|
|
@@ -1866,7 +1899,11 @@ export default {
|
|
|
success: (res) => {
|
|
|
console.log(res);
|
|
|
let base64 = "data:image/jpg;base64," + res.data;
|
|
|
-
|
|
|
+ console.log({
|
|
|
+ imageA: base64,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ gradeId: this.gradeId,
|
|
|
+ },'base64Data')
|
|
|
this.$api
|
|
|
.faceCertificationCompareFace({
|
|
|
imageA: base64,
|
|
@@ -1893,33 +1930,7 @@ export default {
|
|
|
|
|
|
let compareFaceData = await this.faceRecognition();
|
|
|
|
|
|
- if (compareFaceData == 0) {
|
|
|
- uni.showToast({
|
|
|
- title: "人脸匹配不通过,请重新拍照上传",
|
|
|
- icon: "none",
|
|
|
- duration: 2000,
|
|
|
- });
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadLock = false;
|
|
|
- this.openPhoto();
|
|
|
- }, 2000);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
if (compareFaceData >= 80) {
|
|
|
- uni.showToast({
|
|
|
- title: "人脸匹配通过",
|
|
|
- icon: "none",
|
|
|
- duration: 2000,
|
|
|
- });
|
|
|
-
|
|
|
- setTimeout(() => {
|
|
|
- this.uploadLock = false;
|
|
|
- this.openPhoto();
|
|
|
- }, 2000);
|
|
|
- return;
|
|
|
- return;
|
|
|
const waitYS = await this.imageInfos();
|
|
|
this.postCoursePhotoRecord()
|
|
|
.then((res) => {
|
|
@@ -1946,7 +1957,19 @@ export default {
|
|
|
this.uploadLock = false;
|
|
|
this.openPhoto();
|
|
|
});
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "人脸匹配不通过,请重新拍照上传",
|
|
|
+ icon: "none",
|
|
|
+ duration: 2000,
|
|
|
+ });
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.uploadLock = false;
|
|
|
+ this.openPhoto();
|
|
|
+ }, 2000);
|
|
|
+ return;
|
|
|
+ }
|
|
|
},
|
|
|
reTake() {
|
|
|
this.isTaking = true;
|
|
@@ -2041,7 +2064,7 @@ export default {
|
|
|
getAnswerList() {
|
|
|
let self = this;
|
|
|
this.$api
|
|
|
- .answerList({ courseId: this.courseId, goodsId: this.goodsId })
|
|
|
+ .answerList({ courseId: this.courseId, goodsId: this.goodsId,orderGoodsId: this.orderGoodsId, })
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
self.answerList = res.data.rows;
|
|
@@ -2052,6 +2075,7 @@ export default {
|
|
|
let self = this;
|
|
|
this.$api
|
|
|
.reMenuList({
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
courseId: this.courseId,
|
|
|
rebuild: 1,
|
|
|
gradeId: this.gradeId,
|
|
@@ -2106,7 +2130,7 @@ export default {
|
|
|
getMenuList() {
|
|
|
let self = this;
|
|
|
this.$api
|
|
|
- .reMenuList({ courseId: this.courseId, gradeId: this.gradeId })
|
|
|
+ .reMenuList({ courseId: this.courseId, gradeId: this.gradeId,orderGoodsId: this.orderGoodsId, })
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
for (let i = 0; i < res.data.rows.length; i++) {
|