|
@@ -142,6 +142,109 @@
|
|
|
:key="index"
|
|
|
class="course_item"
|
|
|
>
|
|
|
+ <view
|
|
|
+ class="c_downs"
|
|
|
+ @click="studyIn(item.goodsId, item.gradeId, item, index)"
|
|
|
+ >
|
|
|
+ <view class="lefts">
|
|
|
+ <image
|
|
|
+ class="lefet_img"
|
|
|
+ :src="$method.splitImgHost(item.coverUrl, true)"
|
|
|
+ mode=""
|
|
|
+ ></image>
|
|
|
+ <view v-if="item.goodsType == 6" class="live_icon">直播</view>
|
|
|
+ </view>
|
|
|
+ <view class="rights">
|
|
|
+ <view class="learn_progress">
|
|
|
+ <view class="progress_up">
|
|
|
+ <view class="cou_titles line2"
|
|
|
+ >{{ item.goodsName }}{{ item.goodsName }}</view
|
|
|
+ >
|
|
|
+ <view class="classHour">
|
|
|
+ <text
|
|
|
+ >{{
|
|
|
+ item.courseNum || item.courseNum == 0
|
|
|
+ ? item.courseNum
|
|
|
+ : "-"
|
|
|
+ }}课程/</text
|
|
|
+ >
|
|
|
+ <text
|
|
|
+ >{{
|
|
|
+ item.classHours || item.classHours == 0
|
|
|
+ ? item.classHours
|
|
|
+ : "-"
|
|
|
+ }}学时/</text
|
|
|
+ >
|
|
|
+ <text>{{ item.secAllNum + item.examNum || "-" }}节</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="course_item_info">
|
|
|
+ <view>
|
|
|
+ <text>学习状态:</text>
|
|
|
+ <text class="eb" v-if="item.stuAllNum + item.recordNum == 0"
|
|
|
+ >未开始</text
|
|
|
+ >
|
|
|
+ <text
|
|
|
+ class="eb"
|
|
|
+ v-else-if="
|
|
|
+ item.stuAllNum + item.recordNum > 0 &&
|
|
|
+ item.stuAllNum + item.recordNum <
|
|
|
+ item.secAllNum + item.examNum
|
|
|
+ "
|
|
|
+ >学习中</text
|
|
|
+ >
|
|
|
+ <text
|
|
|
+ class="eb"
|
|
|
+ v-else-if="
|
|
|
+ item.stuAllNum + item.recordNum >=
|
|
|
+ item.secAllNum + item.examNum
|
|
|
+ "
|
|
|
+ >已学完</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>学习进度:</text>
|
|
|
+ <text>
|
|
|
+ {{ item.stuAllNum + item.recordNum }}/{{
|
|
|
+ item.secAllNum + item.examNum
|
|
|
+ }}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>学习服务:</text>
|
|
|
+ <text>
|
|
|
+ {{
|
|
|
+ $method.formDate(item.serviceStartTime, "yyyy/mm/dd")
|
|
|
+ }}至{{
|
|
|
+ $method.formDate(item.serviceEndTime, "yyyy/mm/dd")
|
|
|
+ }}</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>班级状态:</text>
|
|
|
+ <text>
|
|
|
+ <text v-if="item.classEndTime && item.classEndTime < sysTime"
|
|
|
+ >已过期</text
|
|
|
+ >
|
|
|
+ <text v-else-if="item.classStatus == 1">开班中</text>
|
|
|
+ <text v-else>未开班</text>
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <text>班级有效:</text>
|
|
|
+ <template v-if="item.classEndTime">
|
|
|
+ <text>
|
|
|
+ {{ $method.formDate(item.classEndTime, "yyyy/mm/dd") }}
|
|
|
+ </text>
|
|
|
+ <text class="eb">(剩余10天)</text>
|
|
|
+ </template>
|
|
|
+ <text v-else>——</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view
|
|
|
class="titlews"
|
|
|
@click="studyIn(item.goodsId, item.gradeId, item, index)"
|
|
@@ -919,6 +1022,7 @@ export default {
|
|
|
const [{ data: res1 }, { data: res2 }] = res;
|
|
|
if (res1.code == 200) {
|
|
|
this.total = res1.total;
|
|
|
+ // res1.rows[0].goodsType = 6
|
|
|
this.courseLists = res1.rows || [];
|
|
|
}
|
|
|
// if (res2.code == 200) {
|
|
@@ -1154,7 +1258,49 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // /lock/lockStatus
|
|
|
+ this.$method.checkLock().then(() => {
|
|
|
+ this.$http({
|
|
|
+ url: "/course/courseList",
|
|
|
+ method: "get",
|
|
|
+ data: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ },
|
|
|
+ noLoading: true,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (res.data.total > 1) {
|
|
|
+ // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages3/polyv/detail?id=''&goodsId=${
|
|
|
+ item.goodsId
|
|
|
+ }&orderGoodsId=${item.orderGoodsId}&gradeId=${
|
|
|
+ item.gradeId
|
|
|
+ }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
|
|
|
+ });
|
|
|
+ } else if (res.data.total == 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages3/polyv/detail?id=${
|
|
|
+ res.data.rows[0].courseId
|
|
|
+ }&goodsId=${item.goodsId}&orderGoodsId=${
|
|
|
+ item.orderGoodsId
|
|
|
+ }&gradeId=${item.gradeId}&periodWaitTime=${
|
|
|
+ item.periodWaitTime ? "" : 1
|
|
|
+ }`,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: "暂无可观看的视频课程",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ return;
|
|
|
this.$api
|
|
|
.lockLockStatus({
|
|
|
action: "jxjy",
|
|
@@ -1163,52 +1309,67 @@ export default {
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
//有其他端在操作,不能学习
|
|
|
- uni.showToast({
|
|
|
- icon: "none",
|
|
|
- title: res.data.msg,
|
|
|
- mask: true,
|
|
|
- duration: 3000,
|
|
|
- });
|
|
|
- } else if (res.data.code == 500) {
|
|
|
- //可以学习
|
|
|
- this.$http({
|
|
|
- url: "/course/courseList",
|
|
|
- method: "get",
|
|
|
- data: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 100,
|
|
|
- goodsId: item.goodsId,
|
|
|
- gradeId: item.gradeId,
|
|
|
- orderGoodsId: item.orderGoodsId,
|
|
|
- },
|
|
|
- noLoading: true,
|
|
|
- }).then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- if (res.data.total > 1) {
|
|
|
- // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages3/polyv/detail?id=''&goodsId=${
|
|
|
- item.goodsId
|
|
|
- }&orderGoodsId=${item.orderGoodsId}&gradeId=${
|
|
|
- item.gradeId
|
|
|
- }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
|
|
|
- });
|
|
|
- } else if (res.data.total == 1) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}&periodWaitTime=${item.periodWaitTime ? "" : 1}`,
|
|
|
- });
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- icon: "none",
|
|
|
- title: "暂无可观看的视频课程",
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: "有其他端在操作,是否将该用户踢下线?",
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ this.$api.offline().then((r) => {
|
|
|
+ if (r.data.code === 200) {
|
|
|
+ this.toDetail();
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
});
|
|
|
- return;
|
|
|
+ } else if (res.data.code == 500) {
|
|
|
+ //可以学习
|
|
|
+ this.toDetail();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ toDetail() {
|
|
|
+ this.$http({
|
|
|
+ url: "/course/courseList",
|
|
|
+ method: "get",
|
|
|
+ data: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 100,
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ },
|
|
|
+ noLoading: true,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if (res.data.total > 1) {
|
|
|
+ // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages3/polyv/detail?id=''&goodsId=${
|
|
|
+ item.goodsId
|
|
|
+ }&orderGoodsId=${item.orderGoodsId}&gradeId=${
|
|
|
+ item.gradeId
|
|
|
+ }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
|
|
|
+ });
|
|
|
+ } else if (res.data.total == 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages3/polyv/detail?id=${
|
|
|
+ res.data.rows[0].courseId
|
|
|
+ }&goodsId=${item.goodsId}&orderGoodsId=${
|
|
|
+ item.orderGoodsId
|
|
|
+ }&gradeId=${item.gradeId}&periodWaitTime=${
|
|
|
+ item.periodWaitTime ? "" : 1
|
|
|
+ }`,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon: "none",
|
|
|
+ title: "暂无可观看的视频课程",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
/**
|
|
|
* @param {Object} goodsId 商品id
|
|
|
* 查询商品重修状态
|