|
@@ -145,7 +145,9 @@
|
|
|
}}{{ item.sectionName }}
|
|
|
</div>
|
|
|
<div class="item__content" @click="jumpSection(item)">
|
|
|
- {{ $tools.secondToTime(item.topicNum) }}(点击可直接跳转)
|
|
|
+ {{
|
|
|
+ $tools.secondToTime(item.topicNum, false)
|
|
|
+ }}(点击可直接跳转)
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
@@ -305,8 +307,10 @@ export default {
|
|
|
statusGO: true,
|
|
|
total: 0,
|
|
|
rebuildItems: {},
|
|
|
+ rebuildItem: [],
|
|
|
listListStatus: true,
|
|
|
receiptNum: 0, //未读数量
|
|
|
+ orderGoodsId: 0,
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -433,137 +437,20 @@ export default {
|
|
|
case 12:
|
|
|
case 18:
|
|
|
//课程
|
|
|
- if (item.goodsType == 1) {
|
|
|
- let currentTime = this.$tools.timest();
|
|
|
- console.log(currentTime);
|
|
|
- console.log(item);
|
|
|
- console.log(item.serviceStartTime);
|
|
|
- console.log(item.serviceEndTime);
|
|
|
- console.log(
|
|
|
- currentTime < item.serviceStartTime ||
|
|
|
- currentTime > item.serviceEndTime
|
|
|
- );
|
|
|
- if (
|
|
|
- currentTime < item.serviceStartTime ||
|
|
|
- currentTime > item.serviceEndTime
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "不在学习有效期,不可以学习了哦",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
- if (
|
|
|
- (item.classStartTime && currentTime <= item.classStartTime) ||
|
|
|
- (item.classEndTime && currentTime >= item.classEndTime)
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "不在班级有效期,不能进入学习",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (item.learningStatus == 2) {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "开放学习时间待定,不能进入学习",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (item.classStatus == 0) {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "尚未开班,不能进入学习",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (
|
|
|
- item.learningStatus == 3 &&
|
|
|
- currentTime < item.learningTimeStart
|
|
|
- ) {
|
|
|
- this.$message({
|
|
|
- type: "warning",
|
|
|
- message: "不在开放学习时间,不能进入学习",
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (
|
|
|
- item.gradeStatus == 1 &&
|
|
|
- item.status == 1 &&
|
|
|
- item.serviceEndTime > currentTime &&
|
|
|
- item.classEndTime &&
|
|
|
- item.classEndTime < currentTime &&
|
|
|
- (item.periodStatus == 0 || item.periodStatus == -1) &&
|
|
|
- item.studyCount > 0
|
|
|
- ) {
|
|
|
- this.$confirm("班级已过期,需要重新选班", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- closeOnClickModal: false,
|
|
|
- closeOnPressEscape: false,
|
|
|
- distinguishCancelAndClose: false,
|
|
|
- showClose: false,
|
|
|
- })
|
|
|
- .then((_) => {
|
|
|
- this.$router.push({
|
|
|
- path: "/person-center/my-course",
|
|
|
- });
|
|
|
- })
|
|
|
- .catch((_) => {});
|
|
|
-
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- let rebuildStatus = await this.courseGoodsRebuildStatus(
|
|
|
- item.goodsId,
|
|
|
- item.gradeId
|
|
|
- );
|
|
|
-
|
|
|
- if (rebuildStatus == 0) {
|
|
|
- this.rebuildItem = item;
|
|
|
- this.$request
|
|
|
- .getcourseperiodcheat({
|
|
|
- goodsId: item.goodsId,
|
|
|
- gradeId: item.gradeId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- this.rebuildItems = res.rows;
|
|
|
- });
|
|
|
- this.showRebuildDetailModal = true;
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (item.courseNum == 1) {
|
|
|
- this.$request
|
|
|
- .courseCourseList({
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 1,
|
|
|
- goodsId: item.goodsId,
|
|
|
+ if (item.goodsType == 1) {
|
|
|
+ item.orderGoodsId = this.orderGoodsId;
|
|
|
+ this.canJump(item).then((res) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: `/my-course-detail/${item.goodsId}`,
|
|
|
+ query: {
|
|
|
gradeId: item.gradeId,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- this.$router.push({
|
|
|
- path: "/my-course-detail/" + item.goodsId,
|
|
|
- query: {
|
|
|
- id: res.rows[0].courseId,
|
|
|
- },
|
|
|
- });
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- this.$router.push({
|
|
|
- path: "/my-course-detail/" + item.goodsId,
|
|
|
- query: {
|
|
|
- gradeId: item.gradeId,
|
|
|
- orderGoodsId: item.orderGoodsId,
|
|
|
- },
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ courseId: res.rows[0].courseId || "",
|
|
|
+ },
|
|
|
+ });
|
|
|
});
|
|
|
+
|
|
|
// arsty = '立刻学习';
|
|
|
|
|
|
//题库
|
|
@@ -579,13 +466,31 @@ export default {
|
|
|
break;
|
|
|
case 2:
|
|
|
case 4:
|
|
|
- this.$navTo.togo("/pages2/verify/input", {
|
|
|
- id: item.goodsId,
|
|
|
+ console.log(item, "item");
|
|
|
+ item.orderGoodsId = this.orderGoodsId;
|
|
|
+ this.canJump(item).then((res) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: `/my-course-detail/${item.goodsId}`,
|
|
|
+ query: {
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ courseId: res.rows[0].courseId || "",
|
|
|
+ },
|
|
|
+ });
|
|
|
});
|
|
|
break;
|
|
|
case 24:
|
|
|
- this.$navTo.togo("/pages2/verify/input2", {
|
|
|
- id: item.goodsId,
|
|
|
+ console.log(item, "item");
|
|
|
+ item.orderGoodsId = this.orderGoodsId;
|
|
|
+ this.canJump(item).then((res) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: `/my-course-detail/${item.goodsId}`,
|
|
|
+ query: {
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ courseId: res.rows[0].courseId || "",
|
|
|
+ },
|
|
|
+ });
|
|
|
});
|
|
|
break;
|
|
|
case 11:
|
|
@@ -613,11 +518,16 @@ export default {
|
|
|
});
|
|
|
break;
|
|
|
case 20:
|
|
|
- this.$router.push({
|
|
|
- path: "/my-course-detail/" + item.goodsId,
|
|
|
- query: {
|
|
|
- gradeId: item.gradeId,
|
|
|
- },
|
|
|
+ item.orderGoodsId = this.orderGoodsId;
|
|
|
+ this.canJump(item).then((res) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: `/my-course-detail/${item.goodsId}`,
|
|
|
+ query: {
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ courseId: res.rows[0].courseId || "",
|
|
|
+ },
|
|
|
+ });
|
|
|
});
|
|
|
break;
|
|
|
default:
|
|
@@ -678,8 +588,8 @@ export default {
|
|
|
showDetail(item) {
|
|
|
this.sysTime = this.$tools.timest();
|
|
|
this.messageId = item.id;
|
|
|
+ this.orderGoodsId = item.orderGoodsId;
|
|
|
this.getMessage();
|
|
|
- this.showDetailModal = true;
|
|
|
},
|
|
|
isOk() {
|
|
|
this.$request
|
|
@@ -707,6 +617,8 @@ export default {
|
|
|
k.data.status === 1
|
|
|
) {
|
|
|
this.statusGO = false;
|
|
|
+ } else {
|
|
|
+ this.statusGO = true;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -722,10 +634,12 @@ export default {
|
|
|
);
|
|
|
}
|
|
|
this.listData = res.data;
|
|
|
+ console.log(this.listData, "listData");
|
|
|
if (res.data.goodsId) {
|
|
|
if (res.data.gradeId) {
|
|
|
this.$request.goodsDetail(res.data.goodsId).then((rs) => {
|
|
|
this.goodsData = rs.data;
|
|
|
+ this.showDetailModal = true;
|
|
|
if (
|
|
|
rs.data.goodsType === 3 &&
|
|
|
(res.data.remindId === 1 ||
|
|
@@ -738,11 +652,14 @@ export default {
|
|
|
res.data.remindId === 22)
|
|
|
) {
|
|
|
this.statusGO = false;
|
|
|
+ } else {
|
|
|
+ this.statusGO = true;
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
this.$request.commonGoodsDetail(res.data.goodsId).then((rs) => {
|
|
|
this.goodsData = rs.data;
|
|
|
+ this.showDetailModal = true;
|
|
|
if (
|
|
|
rs.data.goodsType === 3 &&
|
|
|
(res.data.remindId === 1 ||
|
|
@@ -755,15 +672,169 @@ export default {
|
|
|
res.data.remindId === 22)
|
|
|
) {
|
|
|
this.statusGO = false;
|
|
|
+ } else {
|
|
|
+ this.statusGO = true;
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.showDetailModal = true;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ canJump(item) {
|
|
|
+ return new Promise((resolve) => {
|
|
|
+ this.$request
|
|
|
+ .orderInfo({
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ })
|
|
|
+ .then(async (res) => {
|
|
|
+ let items = res.data;
|
|
|
+ let currentTime = this.$tools.timest();
|
|
|
+ console.log(currentTime);
|
|
|
+ console.log(items);
|
|
|
+ console.log(items.serviceStartTime);
|
|
|
+ console.log(items.serviceEndTime);
|
|
|
+ console.log(
|
|
|
+ currentTime < items.serviceStartTime ||
|
|
|
+ currentTime > items.serviceEndTime
|
|
|
+ );
|
|
|
+ //内部系统
|
|
|
+ if (items.interfacePushId > 0 && items.officialStatus != 1) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message:
|
|
|
+ "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ this.sysTime <= items.serviceStartTime ||
|
|
|
+ this.sysTime >= items.serviceEndTime
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "不在学习服务期,不能进入学习",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (
|
|
|
+ (items.classStartTime && this.sysTime <= items.classStartTime) ||
|
|
|
+ (items.classEndTime && this.sysTime >= items.classEndTime)
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "不在班级有效期,不能进入学习",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (items.learningStatus == 2) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "开放学习时间待定,不能进入学习",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (items.classStatus == 0) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "尚未开班,不能进入学习",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ items.learningStatus == 3 &&
|
|
|
+ this.sysTime < items.learningTimeStart
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "不在开放学习时间,不能进入学习",
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ let rebuildStatus = await this.courseGoodsRebuildStatus(
|
|
|
+ items.goodsId,
|
|
|
+ items.gradeId
|
|
|
+ );
|
|
|
+
|
|
|
+ if (rebuildStatus == 0) {
|
|
|
+ this.rebuildItem = items;
|
|
|
+ this.$request
|
|
|
+ .getcourseperiodcheat({
|
|
|
+ goodsId: items.goodsId,
|
|
|
+ gradeId: items.gradeId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.rebuildItems = res.rows;
|
|
|
+ });
|
|
|
+ this.showRebuildDetailModal = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (item.educationName == "继续教育") {
|
|
|
+ this.$request
|
|
|
+ .lockLockStatus({
|
|
|
+ action: "jxjy",
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ //有其他端在操作,不能学习
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: res.msg,
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ //可以学习
|
|
|
+ this.$request
|
|
|
+ .courseCourseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ goodsId: items.goodsId,
|
|
|
+ gradeId: items.gradeId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows.length) {
|
|
|
+ resolve(res);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "课程内暂无可以学习的科目",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$request
|
|
|
+ .courseCourseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ goodsId: items.goodsId,
|
|
|
+ gradeId: items.gradeId,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.rows.length) {
|
|
|
+ resolve(res);
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message: "课程内暂无可以学习的科目",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
//跳转节视频
|
|
|
- jumpSection(item) {
|
|
|
+ async jumpSection(item) {
|
|
|
+ // item.orderGoodsId = this.orderGoodsId;
|
|
|
+ // this.canJump(item).then((res) => {
|
|
|
item.noteSecond = Number(item.topicNum) * 60; //转秒数\
|
|
|
this.$router.push({
|
|
|
path: "/my-course-detail/" + item.goodsId,
|
|
@@ -776,6 +847,7 @@ export default {
|
|
|
noteSecond: item.noteSecond,
|
|
|
},
|
|
|
});
|
|
|
+ // });
|
|
|
},
|
|
|
//跳转题库题目
|
|
|
jumpExam(item) {
|