|
@@ -13,23 +13,29 @@
|
|
|
style="margin-left: 14px"
|
|
|
@click="changeCourse"
|
|
|
>切换科目</el-button
|
|
|
- ><el-button v-if="outerChain()" @click="jumpExternalLink" size="mini" type="primary">进入学习</el-button>
|
|
|
+ ><el-button
|
|
|
+ v-if="outerChain()"
|
|
|
+ @click="jumpExternalLink"
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ >进入学习</el-button
|
|
|
+ >
|
|
|
|
|
|
<el-button
|
|
|
v-if="
|
|
|
goodsData.applyStatus === 1 &&
|
|
|
- !(
|
|
|
- sysTime <= goodsData.serviceStartTime ||
|
|
|
- sysTime >= goodsData.serviceEndTime ||
|
|
|
- (goodsData.classStartTime &&
|
|
|
- sysTime <= goodsData.classStartTime) ||
|
|
|
- (goodsData.classEndTime && sysTime >= goodsData.classEndTime) ||
|
|
|
- goodsData.learningStatus == 2 ||
|
|
|
- goodsData.classStatus == 0 ||
|
|
|
- (goodsData.learningStatus == 3 &&
|
|
|
- sysTime < goodsData.learningTimeStart) ||
|
|
|
- !goodsData.examApplyGoodsList.length
|
|
|
- )
|
|
|
+ !(
|
|
|
+ sysTime <= goodsData.serviceStartTime ||
|
|
|
+ sysTime >= goodsData.serviceEndTime ||
|
|
|
+ (goodsData.classStartTime &&
|
|
|
+ sysTime <= goodsData.classStartTime) ||
|
|
|
+ (goodsData.classEndTime && sysTime >= goodsData.classEndTime) ||
|
|
|
+ goodsData.learningStatus == 2 ||
|
|
|
+ goodsData.classStatus == 0 ||
|
|
|
+ (goodsData.learningStatus == 3 &&
|
|
|
+ sysTime < goodsData.learningTimeStart) ||
|
|
|
+ !goodsData.examApplyGoodsList.length
|
|
|
+ )
|
|
|
"
|
|
|
size="mini"
|
|
|
type="warning"
|
|
@@ -44,7 +50,7 @@
|
|
|
{{ goodsData.classHours }}学时
|
|
|
</div>
|
|
|
</h4>
|
|
|
- <div style="margin: 14px 0px" v-if="!outerChain()">
|
|
|
+ <div style="margin: 14px 0px" v-if="!outerChain()">
|
|
|
<el-button
|
|
|
size="small"
|
|
|
v-for="(item, index) in subjectList"
|
|
@@ -112,8 +118,8 @@
|
|
|
<template
|
|
|
v-if="
|
|
|
items.showStatus &&
|
|
|
- items.children &&
|
|
|
- items.children.length > 0
|
|
|
+ items.children &&
|
|
|
+ items.children.length > 0
|
|
|
"
|
|
|
>
|
|
|
<div
|
|
@@ -248,8 +254,8 @@
|
|
|
<span v-show="is.studyDuration">
|
|
|
{{
|
|
|
$tools.secondToDate(is.studyDuration) +
|
|
|
- "/" +
|
|
|
- $tools.secondToDate(is.durationTime)
|
|
|
+ "/" +
|
|
|
+ $tools.secondToDate(is.durationTime)
|
|
|
}}
|
|
|
</span>
|
|
|
</el-col>
|
|
@@ -301,8 +307,8 @@
|
|
|
style="width: 90px !important"
|
|
|
v-if="
|
|
|
is.studyDuration > 0 &&
|
|
|
- is.durationTime > 0 &&
|
|
|
- is.studyDuration == is.durationTime
|
|
|
+ is.durationTime > 0 &&
|
|
|
+ is.studyDuration == is.durationTime
|
|
|
"
|
|
|
@click="studyFunc(item, is)"
|
|
|
>再次学习</el-button
|
|
@@ -313,8 +319,8 @@
|
|
|
style="width: 90px !important"
|
|
|
v-else-if="
|
|
|
is.studyDuration > 0 &&
|
|
|
- is.durationTime > 0 &&
|
|
|
- is.studyDuration != is.durationTime
|
|
|
+ is.durationTime > 0 &&
|
|
|
+ is.studyDuration != is.durationTime
|
|
|
"
|
|
|
@click="studyFunc(item, is)"
|
|
|
>继续学习</el-button
|
|
@@ -362,7 +368,7 @@
|
|
|
"
|
|
|
v-else-if="
|
|
|
is.liveEndTime > sysTime &&
|
|
|
- is.liveStartTime < sysTime
|
|
|
+ is.liveStartTime < sysTime
|
|
|
"
|
|
|
@click="studyFunc(item, is)"
|
|
|
>进入直播间</el-button
|
|
@@ -440,8 +446,8 @@
|
|
|
<span v-show="i.studyDuration">
|
|
|
{{
|
|
|
$tools.secondToDate(i.studyDuration) +
|
|
|
- "/" +
|
|
|
- $tools.secondToDate(i.durationTime)
|
|
|
+ "/" +
|
|
|
+ $tools.secondToDate(i.durationTime)
|
|
|
}}
|
|
|
</span>
|
|
|
</el-col>
|
|
@@ -487,8 +493,8 @@
|
|
|
style="width: 90px !important"
|
|
|
v-if="
|
|
|
i.studyDuration > 0 &&
|
|
|
- i.durationTime > 0 &&
|
|
|
- i.studyDuration == i.durationTime
|
|
|
+ i.durationTime > 0 &&
|
|
|
+ i.studyDuration == i.durationTime
|
|
|
"
|
|
|
@click="studyFunc(item, i)"
|
|
|
>再次学习</el-button
|
|
@@ -499,8 +505,8 @@
|
|
|
style="width: 90px !important"
|
|
|
v-else-if="
|
|
|
i.studyDuration > 0 &&
|
|
|
- i.durationTime > 0 &&
|
|
|
- i.studyDuration != i.durationTime
|
|
|
+ i.durationTime > 0 &&
|
|
|
+ i.studyDuration != i.durationTime
|
|
|
"
|
|
|
@click="studyFunc(item, i)"
|
|
|
>继续学习</el-button
|
|
@@ -545,7 +551,7 @@
|
|
|
type="primary"
|
|
|
v-else-if="
|
|
|
i.liveEndTime > sysTime &&
|
|
|
- i.liveStartTime < sysTime
|
|
|
+ i.liveStartTime < sysTime
|
|
|
"
|
|
|
@click="studyFunc(item, i)"
|
|
|
>进入直播间</el-button
|
|
@@ -603,8 +609,8 @@
|
|
|
<span v-show="items.studyDuration">
|
|
|
{{
|
|
|
$tools.secondToDate(items.studyDuration) +
|
|
|
- "/" +
|
|
|
- $tools.secondToDate(items.durationTime)
|
|
|
+ "/" +
|
|
|
+ $tools.secondToDate(items.durationTime)
|
|
|
}}
|
|
|
</span>
|
|
|
</el-col>
|
|
@@ -650,8 +656,8 @@
|
|
|
type="text"
|
|
|
v-if="
|
|
|
items.studyDuration > 0 &&
|
|
|
- items.durationTime > 0 &&
|
|
|
- items.studyDuration == items.durationTime
|
|
|
+ items.durationTime > 0 &&
|
|
|
+ items.studyDuration == items.durationTime
|
|
|
"
|
|
|
@click="studyFunc(item, items)"
|
|
|
>再次学习</el-button
|
|
@@ -662,8 +668,8 @@
|
|
|
size="mini"
|
|
|
v-else-if="
|
|
|
items.studyDuration > 0 &&
|
|
|
- items.durationTime > 0 &&
|
|
|
- items.studyDuration != items.durationTime
|
|
|
+ items.durationTime > 0 &&
|
|
|
+ items.studyDuration != items.durationTime
|
|
|
"
|
|
|
@click="studyFunc(item, items)"
|
|
|
>继续学习</el-button
|
|
@@ -708,7 +714,7 @@
|
|
|
type="primary"
|
|
|
v-else-if="
|
|
|
items.liveEndTime > sysTime &&
|
|
|
- items.liveStartTime < sysTime
|
|
|
+ items.liveStartTime < sysTime
|
|
|
"
|
|
|
@click="studyFunc(item, items)"
|
|
|
>进入直播间</el-button
|
|
@@ -804,11 +810,11 @@ export default {
|
|
|
teaIndex: 0,
|
|
|
States: { 0: 0 },
|
|
|
sectionExamList: [], //节试卷集合
|
|
|
- sectionExam: [], //节试卷集合
|
|
|
+ sectionExam: [] //节试卷集合
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["userInfo"]),
|
|
|
+ ...mapGetters(["userInfo"])
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getRecord();
|
|
@@ -816,11 +822,11 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
//判断是否外链
|
|
|
- outerChain(){
|
|
|
- if(this.goodsData.externalLinkStatus){
|
|
|
- return true
|
|
|
+ outerChain() {
|
|
|
+ if (this.goodsData.externalLinkStatus) {
|
|
|
+ return true;
|
|
|
}
|
|
|
- return false
|
|
|
+ return false;
|
|
|
},
|
|
|
comeStyle(courseItem, item) {
|
|
|
this.$router.push({
|
|
@@ -836,8 +842,8 @@ export default {
|
|
|
liveUrl: item.liveUrl,
|
|
|
sectionType: item.sectionType,
|
|
|
liveStartTime: item.liveStartTime,
|
|
|
- liveEndTime: item.liveEndTime,
|
|
|
- },
|
|
|
+ liveEndTime: item.liveEndTime
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
changeCourse() {
|
|
@@ -856,7 +862,7 @@ export default {
|
|
|
uniqueFunc(arr, uniId) {
|
|
|
const res = new Map();
|
|
|
return arr.filter(
|
|
|
- (item) => !res.has(item[uniId]) && res.set(item[uniId], 1)
|
|
|
+ item => !res.has(item[uniId]) && res.set(item[uniId], 1)
|
|
|
);
|
|
|
},
|
|
|
/**
|
|
@@ -867,37 +873,37 @@ export default {
|
|
|
this.$request
|
|
|
.courseCourseList({
|
|
|
goodsId: item.goodsId,
|
|
|
- gradeId: item.gradeId,
|
|
|
+ gradeId: item.gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
console.log(res, "res");
|
|
|
var array = [];
|
|
|
- res.rows.forEach((element) => {
|
|
|
+ res.rows.forEach(element => {
|
|
|
element.showStatus = false;
|
|
|
element.children = [];
|
|
|
array.push({
|
|
|
id: element.subjectId,
|
|
|
- name: element.subjectName,
|
|
|
+ name: element.subjectName
|
|
|
});
|
|
|
});
|
|
|
//获取商品双师资模板
|
|
|
this.$request
|
|
|
.courseTeacherList({
|
|
|
- goodsId: item.goodsId,
|
|
|
+ goodsId: item.goodsId
|
|
|
})
|
|
|
- .then((res1) => {
|
|
|
+ .then(res1 => {
|
|
|
// console.log(res1,'res1');
|
|
|
if (res1.data && res1.data.length > 0) {
|
|
|
//课程老师模板
|
|
|
let teacherTel = res1.data;
|
|
|
//商品课程
|
|
|
let courses = res.rows;
|
|
|
- teacherTel.forEach((tea) => {
|
|
|
+ teacherTel.forEach(tea => {
|
|
|
let dataList = [];
|
|
|
let teacherList = [];
|
|
|
- courses.forEach((item) => {
|
|
|
+ courses.forEach(item => {
|
|
|
let courseData = tea.courseList.filter(
|
|
|
- (x) => x.courseId == item.courseId
|
|
|
+ x => x.courseId == item.courseId
|
|
|
);
|
|
|
if (courseData && courseData.length > 0) {
|
|
|
dataList.push(item);
|
|
@@ -906,23 +912,23 @@ export default {
|
|
|
});
|
|
|
let result = {
|
|
|
teaList: teacherList,
|
|
|
- courseList: dataList,
|
|
|
+ courseList: dataList
|
|
|
};
|
|
|
this.goodsTeacher.push(result);
|
|
|
});
|
|
|
if (this.goodsTeacher && this.goodsTeacher.length > 0) {
|
|
|
let courseIds = [];
|
|
|
- this.goodsTeacher.forEach((item) => {
|
|
|
- item.courseList.forEach((course) => {
|
|
|
+ this.goodsTeacher.forEach(item => {
|
|
|
+ item.courseList.forEach(course => {
|
|
|
courseIds.push(course.courseId);
|
|
|
});
|
|
|
});
|
|
|
if (courseIds.length > 0) {
|
|
|
- courses.forEach((item) => {
|
|
|
+ courses.forEach(item => {
|
|
|
if (!courseIds.includes(item.courseId)) {
|
|
|
let data = {
|
|
|
teaList: [],
|
|
|
- courseList: [],
|
|
|
+ courseList: []
|
|
|
};
|
|
|
data.courseList.push(item);
|
|
|
this.goodsTeacher.push(data);
|
|
@@ -930,18 +936,18 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- this.goodsTeacher.forEach((item) => {
|
|
|
+ this.goodsTeacher.forEach(item => {
|
|
|
if (item.courseList && item.courseList.length > 0) {
|
|
|
item.courseList[0].show = 1;
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
//没有双师资模板
|
|
|
- res.rows.forEach((item) => {
|
|
|
+ res.rows.forEach(item => {
|
|
|
item.show = 1;
|
|
|
let data = {
|
|
|
teaList: [],
|
|
|
- courseList: [],
|
|
|
+ courseList: []
|
|
|
};
|
|
|
data.courseList.push(item);
|
|
|
this.goodsTeacher.push(data);
|
|
@@ -954,10 +960,10 @@ export default {
|
|
|
array = this.uniqueFunc(array, "id");
|
|
|
array.unshift({
|
|
|
id: "",
|
|
|
- name: "全部",
|
|
|
+ name: "全部"
|
|
|
});
|
|
|
// this.subjectList = array;
|
|
|
- this.subjectList = array.filter((item) => item.name);
|
|
|
+ this.subjectList = array.filter(item => item.name);
|
|
|
this.newActiveSubjectId = "";
|
|
|
|
|
|
resolve();
|
|
@@ -968,7 +974,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//进入外链
|
|
|
- jumpExternalLink(){
|
|
|
+ jumpExternalLink() {
|
|
|
window.open(this.goodsData.externalLink, "_blank");
|
|
|
},
|
|
|
//切换老师
|
|
@@ -979,7 +985,7 @@ export default {
|
|
|
this.teaIndex = index;
|
|
|
this.goodsTeacher.forEach((item, index) => {
|
|
|
if (item.teaList && item.teaList.length > 0) {
|
|
|
- let list = item.teaList.filter((x) => x.courseId == data.courseId);
|
|
|
+ let list = item.teaList.filter(x => x.courseId == data.courseId);
|
|
|
if (list && list.length > 0) {
|
|
|
item.courseList.forEach((course, courseIndex) => {
|
|
|
if (course.courseId == data.courseId) {
|
|
@@ -1007,7 +1013,7 @@ export default {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$request
|
|
|
.courseGoodsList({ orderGoodsId: res.data.orderGoodsId })
|
|
|
- .then(async (result) => {
|
|
|
+ .then(async result => {
|
|
|
if (result.rows.length == 0) {
|
|
|
this.resultCourseGoodsList();
|
|
|
} else {
|
|
@@ -1025,7 +1031,7 @@ export default {
|
|
|
* 获取学习记录
|
|
|
*/
|
|
|
getRecord(item) {
|
|
|
- this.$request.studyrecordgetUserStudyLast().then(async (res) => {
|
|
|
+ this.$request.studyrecordgetUserStudyLast().then(async res => {
|
|
|
// if (res.data && res.data.sectionId) {
|
|
|
await this.getGoodsData(res);
|
|
|
var stop = false;
|
|
@@ -1164,7 +1170,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
resultCourseGoodsList() {
|
|
|
- this.$request.courseGoodsList({ pageNum: 1, pageSize: 1 }).then((res) => {
|
|
|
+ this.$request.courseGoodsList({ pageNum: 1, pageSize: 1 }).then(res => {
|
|
|
if (res.rows && res.rows.length > 0) {
|
|
|
this.backData(res.rows[0]);
|
|
|
}
|
|
@@ -1185,19 +1191,19 @@ export default {
|
|
|
.reSectionExamList({
|
|
|
chapterId: 0,
|
|
|
courseId: item.courseId,
|
|
|
- gradeId: item.gradeId,
|
|
|
+ gradeId: item.gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
this.sectionExamList = res.data;
|
|
|
});
|
|
|
this.$request
|
|
|
.reMenuList({
|
|
|
courseId: item.courseId,
|
|
|
gradeId: item.gradeId,
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- res.rows.forEach((items) => {
|
|
|
+ .then(res => {
|
|
|
+ res.rows.forEach(items => {
|
|
|
if (items.type != 3) {
|
|
|
items.showStatus = false;
|
|
|
items.children = [];
|
|
@@ -1232,10 +1238,10 @@ export default {
|
|
|
.reChapterList({
|
|
|
moduleId: item.menuId,
|
|
|
gradeId: item.gradeId,
|
|
|
- courseId: item.courseId,
|
|
|
+ courseId: item.courseId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- res.data.forEach((items) => {
|
|
|
+ .then(res => {
|
|
|
+ res.data.forEach(items => {
|
|
|
items.children = [];
|
|
|
items.showStatus = false;
|
|
|
});
|
|
@@ -1268,9 +1274,9 @@ export default {
|
|
|
.reSectionExamList({
|
|
|
chapterId: type === 1 ? item.menuId : item.chapterId,
|
|
|
courseId: item.courseId,
|
|
|
- gradeId: item.gradeId,
|
|
|
+ gradeId: item.gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
this.sectionExam = res.data;
|
|
|
});
|
|
|
this.$request
|
|
@@ -1279,9 +1285,9 @@ export default {
|
|
|
gradeId: item.gradeId,
|
|
|
courseId: item.courseId,
|
|
|
moduleId: item.moduleId || 0,
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
// let newArr = res.data.filter((item) => {
|
|
|
// return item.type != 2;
|
|
|
// });
|
|
@@ -1327,7 +1333,7 @@ export default {
|
|
|
classEndTime,
|
|
|
classStatus,
|
|
|
learningStatus,
|
|
|
- learningTimeStart,
|
|
|
+ learningTimeStart
|
|
|
} = this.goodsData;
|
|
|
console.log(interfaceAccountId, learnStatus, "xzx");
|
|
|
if (interfaceAccountId > 0) {
|
|
@@ -1336,7 +1342,7 @@ export default {
|
|
|
: this.$message({
|
|
|
type: "warning",
|
|
|
message:
|
|
|
- "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
|
|
|
+ "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
@@ -1346,8 +1352,8 @@ export default {
|
|
|
(classEndTime && time >= classEndTime),
|
|
|
learningStatus == 2,
|
|
|
classStatus == 0,
|
|
|
- learningStatus == 3 && time < learningTimeStart,
|
|
|
- ].findIndex((e) => e);
|
|
|
+ learningStatus == 3 && time < learningTimeStart
|
|
|
+ ].findIndex(e => e);
|
|
|
if (index !== -1) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
@@ -1357,8 +1363,8 @@ export default {
|
|
|
"不在班级有效期",
|
|
|
"开放学习时间待定",
|
|
|
"尚未开班",
|
|
|
- "不在开放学习时间,",
|
|
|
- ][index] + ",不能进入学习",
|
|
|
+ "不在开放学习时间,"
|
|
|
+ ][index] + ",不能进入学习"
|
|
|
});
|
|
|
}
|
|
|
return index === -1;
|
|
@@ -1373,7 +1379,7 @@ export default {
|
|
|
) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "请按顺序学习视频课程",
|
|
|
+ message: "请按顺序学习视频课程"
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
@@ -1416,25 +1422,25 @@ export default {
|
|
|
this.$request
|
|
|
.lockLockStatus({
|
|
|
action: "jxjy",
|
|
|
- uuid: sessionStorage.getItem("uuid"),
|
|
|
+ uuid: sessionStorage.getItem("uuid")
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
//有其他端在操作,不能学习
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: res.msg,
|
|
|
+ message: res.msg
|
|
|
});
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
+ .catch(err => {
|
|
|
//可以学习
|
|
|
this.$request
|
|
|
.courseCourseList({
|
|
|
pageNum: 1,
|
|
|
pageSize: 1,
|
|
|
goodsId: item.goodsId,
|
|
|
- gradeId: item.gradeId,
|
|
|
+ gradeId: item.gradeId
|
|
|
})
|
|
|
- .then(async (res) => {
|
|
|
+ .then(async res => {
|
|
|
//学习次数是否上限---start
|
|
|
let learnNum = await this.goodsTodayStudySectionNum(courseItem);
|
|
|
let hasLearn = await this.gradeCheckGoodsStudy(courseItem, items);
|
|
@@ -1444,7 +1450,7 @@ export default {
|
|
|
this.clickLock = false;
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
|
|
|
+ message: `每天最多学习${this.goodsData.sectionMaxNum}节`
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -1467,7 +1473,7 @@ export default {
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "课程内暂无可以学习的科目",
|
|
|
+ message: "课程内暂无可以学习的科目"
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -1477,7 +1483,7 @@ export default {
|
|
|
if (type == 3) {
|
|
|
//节卷
|
|
|
let data = this.sectionExamList.filter(
|
|
|
- (x) => x.sectionId == section.menuId
|
|
|
+ x => x.sectionId == section.menuId
|
|
|
);
|
|
|
if (data && data.length > 0) {
|
|
|
section = data[0];
|
|
@@ -1485,7 +1491,7 @@ export default {
|
|
|
} else if (type == 2) {
|
|
|
//节卷
|
|
|
let data = this.sectionExam.filter(
|
|
|
- (x) => x.sectionId == section.sectionId
|
|
|
+ x => x.sectionId == section.sectionId
|
|
|
);
|
|
|
|
|
|
if (data && data.length > 0) {
|
|
@@ -1503,8 +1509,8 @@ export default {
|
|
|
learning: section.learning,
|
|
|
type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
- },
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
async orderTopTobottom(courseLists, section, type) {
|
|
@@ -1515,7 +1521,7 @@ export default {
|
|
|
// 课程顺序
|
|
|
if (this.courseList.length > 1) {
|
|
|
let index = this.courseList.findIndex(
|
|
|
- (e) => e.courseId == courseLists.courseId
|
|
|
+ e => e.courseId == courseLists.courseId
|
|
|
);
|
|
|
|
|
|
if (index) {
|
|
@@ -1538,7 +1544,7 @@ export default {
|
|
|
);
|
|
|
if (type == 99) {
|
|
|
if (parentId >= 0 && menuId >= 0) {
|
|
|
- var index = list.findIndex((e) => {
|
|
|
+ var index = list.findIndex(e => {
|
|
|
return parentId
|
|
|
? e.moduleId == moduleId &&
|
|
|
e.chapterId == chapterId &&
|
|
@@ -1547,7 +1553,7 @@ export default {
|
|
|
});
|
|
|
} else {
|
|
|
var index = list.findIndex(
|
|
|
- (e) =>
|
|
|
+ e =>
|
|
|
e.moduleId == moduleId &&
|
|
|
e.chapterId == chapterId &&
|
|
|
e.id == section.sectionId
|
|
@@ -1557,10 +1563,10 @@ export default {
|
|
|
list = list.slice(0, index);
|
|
|
} else if (type != 3) {
|
|
|
list = list.filter(
|
|
|
- (e) => e.moduleId == moduleId && e.chapterId == chapterId
|
|
|
+ e => e.moduleId == moduleId && e.chapterId == chapterId
|
|
|
);
|
|
|
}
|
|
|
- return list.every((item) => item.studyStatus == 1);
|
|
|
+ return list.every(item => item.studyStatus == 1);
|
|
|
},
|
|
|
async exceedLearnNum(courseLists, section) {
|
|
|
let learnNum = await this.goodsTodayStudySectionNum(section);
|
|
@@ -1570,7 +1576,7 @@ export default {
|
|
|
if (learnNum >= this.goodsData.sectionMaxNum && !hasLearn) {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: `每天最多学习${this.goodsData.sectionMaxNum}节`,
|
|
|
+ message: `每天最多学习${this.goodsData.sectionMaxNum}节`
|
|
|
});
|
|
|
return false;
|
|
|
}
|
|
@@ -1578,6 +1584,20 @@ export default {
|
|
|
return true;
|
|
|
},
|
|
|
async getResource(courseLists, section, type) {
|
|
|
+ let item = this.goodsData;
|
|
|
+ var confirmDetail = true;
|
|
|
+ if (item.educationName == "继续教育") {
|
|
|
+ if (
|
|
|
+ item.officialName &&
|
|
|
+ item.businessName == "二级" &&
|
|
|
+ item.projectName == "建造师"
|
|
|
+ ) {
|
|
|
+ confirmDetail = await this.userConfirmInfoDetail();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!confirmDetail) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
//type:1章卷,2节卷,3模考卷,4习题
|
|
|
// if (!this.checkCanLearn()) {
|
|
|
// return false;
|
|
@@ -1612,8 +1632,8 @@ export default {
|
|
|
learning: section.learning,
|
|
|
type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
- },
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
+ }
|
|
|
});
|
|
|
//没有答题次数限制
|
|
|
} else if (section.answerNum == 0) {
|
|
@@ -1628,13 +1648,13 @@ export default {
|
|
|
learning: section.learning,
|
|
|
type: type,
|
|
|
chapterId: section.chapterId || 0,
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
- },
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
+ }
|
|
|
});
|
|
|
} else {
|
|
|
this.$message({
|
|
|
type: "warning",
|
|
|
- message: "该试卷只能答题" + section.answerNum + "次",
|
|
|
+ message: "该试卷只能答题" + section.answerNum + "次"
|
|
|
});
|
|
|
|
|
|
return;
|
|
@@ -1652,7 +1672,7 @@ export default {
|
|
|
if (_data.length == 0) {
|
|
|
return false;
|
|
|
}
|
|
|
- return _data.some((section) => section.sectionId == sectionId);
|
|
|
+ return _data.some(section => section.sectionId == sectionId);
|
|
|
},
|
|
|
// 新增用户视频学习日志
|
|
|
studyLog(moduleId, chapterId, sectionId, courseLists) {
|
|
@@ -1667,9 +1687,9 @@ export default {
|
|
|
sectionId: sectionId || 0,
|
|
|
fromPlat: 2, //来源平台 1小程序 2PC网站
|
|
|
goodsType: 1, // 商品类型 1视频2题库 3补考 4前培 5虚拟赠送题库 6直播
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
- },
|
|
|
- }).then((res) => {
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
console.log("直播的用户学习日志:", res);
|
|
|
});
|
|
|
},
|
|
@@ -1677,12 +1697,12 @@ export default {
|
|
|
* 获取培训项目详情
|
|
|
*/
|
|
|
courseBusiness() {
|
|
|
- this.$request.courseBusiness(this.goodsData.businessId).then((res) => {
|
|
|
+ this.$request.courseBusiness(this.goodsData.businessId).then(res => {
|
|
|
this.businessData = res.data;
|
|
|
});
|
|
|
},
|
|
|
bankRecordDoNum(courseLists, section) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.bankRecordDoNum({
|
|
|
goodsId: this.goodsData.goodsId,
|
|
@@ -1690,63 +1710,63 @@ export default {
|
|
|
chapterId: section.chapterId,
|
|
|
courseId: courseLists.courseId,
|
|
|
moduleId: 0,
|
|
|
- examId: section.typeId,
|
|
|
+ examId: section.typeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
|
|
|
studyRecordMenuAllList(courseLists) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.studyRecordMenuAllList({
|
|
|
courseId: courseLists.courseId,
|
|
|
gradeId: this.goodsData.gradeId,
|
|
|
- goodsId: this.goodsData.goodsId,
|
|
|
+ goodsId: this.goodsData.goodsId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
- res.data = res.data.filter((e) => e.sectionType != 2);
|
|
|
+ .then(res => {
|
|
|
+ res.data = res.data.filter(e => e.sectionType != 2);
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
gradeCheckGoodsStudy(courseItem, option) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.gradeCheckGoodsStudy({
|
|
|
goodsId: this.goodsData.goodsId,
|
|
|
gradeId: courseItem.gradeId,
|
|
|
moduleId: option.moduleId || 0,
|
|
|
chapterId: option.chapterId || 0,
|
|
|
- sectionId: option.sectionId || option.menuId,
|
|
|
+ sectionId: option.sectionId || option.menuId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
goodsTodayStudySectionNum(option) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.goodsTodayStudySectionNum({
|
|
|
goodsId: this.goodsData.goodsId,
|
|
|
- gradeId: option.gradeId,
|
|
|
+ gradeId: option.gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
|
|
|
userConfirmInfoDetail() {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.userConfirmInfoDetail({
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (!res.data) {
|
|
|
clearInterval(this.confirmTimer);
|
|
|
this.confirmCount = 10;
|
|
@@ -1771,11 +1791,11 @@ export default {
|
|
|
closeOnPressEscape: false,
|
|
|
distinguishCancelAndClose: false,
|
|
|
showClose: false,
|
|
|
- showCancelButton: false,
|
|
|
+ showCancelButton: false
|
|
|
}
|
|
|
)
|
|
|
- .then((_) => {})
|
|
|
- .catch((_) => {});
|
|
|
+ .then(_ => {})
|
|
|
+ .catch(_ => {});
|
|
|
resolve(false);
|
|
|
}
|
|
|
}
|
|
@@ -1792,14 +1812,14 @@ export default {
|
|
|
let infoJson = {
|
|
|
realname: this.userInfo.realname,
|
|
|
idCard: this.userInfo.idCard,
|
|
|
- telphone: this.userInfo.telphone,
|
|
|
+ telphone: this.userInfo.telphone
|
|
|
};
|
|
|
this.$request
|
|
|
.userConfirminfo({
|
|
|
infoJson: JSON.stringify(infoJson),
|
|
|
- orderGoodsId: this.goodsData.orderGoodsId,
|
|
|
+ orderGoodsId: this.goodsData.orderGoodsId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
if (res.data.pushInfo) {
|
|
|
this.$message.success("提交成功");
|
|
|
} else {
|
|
@@ -1812,11 +1832,11 @@ export default {
|
|
|
closeOnPressEscape: false,
|
|
|
distinguishCancelAndClose: false,
|
|
|
showClose: false,
|
|
|
- showCancelButton: false,
|
|
|
+ showCancelButton: false
|
|
|
}
|
|
|
)
|
|
|
- .then((_) => {})
|
|
|
- .catch((_) => {});
|
|
|
+ .then(_ => {})
|
|
|
+ .catch(_ => {});
|
|
|
}
|
|
|
this.showConfirm = false;
|
|
|
this.confirmLoading = false;
|
|
@@ -1827,13 +1847,13 @@ export default {
|
|
|
* 查询商品重修状态
|
|
|
*/
|
|
|
courseGoodsRebuildStatus(goodsId, gradeId) {
|
|
|
- return new Promise((resolve) => {
|
|
|
+ return new Promise(resolve => {
|
|
|
this.$request
|
|
|
.courseGoodsRebuildStatus({
|
|
|
goodsId: goodsId,
|
|
|
- gradeId: gradeId,
|
|
|
+ gradeId: gradeId
|
|
|
})
|
|
|
- .then((res) => {
|
|
|
+ .then(res => {
|
|
|
resolve(res.data);
|
|
|
});
|
|
|
});
|
|
@@ -1848,11 +1868,11 @@ export default {
|
|
|
courseId: section.courseId,
|
|
|
chapterId: section.chapterId,
|
|
|
moduleId: section.moduleId,
|
|
|
- sectionId: section.sectionId || section.menuId,
|
|
|
- },
|
|
|
+ sectionId: section.sectionId || section.menuId
|
|
|
+ }
|
|
|
});
|
|
|
- },
|
|
|
- },
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
|