|
|
@@ -137,11 +137,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<login ref="login"></login>
|
|
|
+ <RebuildModal
|
|
|
+ ref="rebuildModal"
|
|
|
+ @rebuildSubmit="rebuildSubmit($event)"
|
|
|
+ ></RebuildModal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import login from "@/components/login";
|
|
|
+import RebuildModal from "@/components/rebuildModal";
|
|
|
import { swiper, swiperSlide } from "vue-awesome-swiper";
|
|
|
import "swiper/swiper-bundle.css";
|
|
|
import { mapGetters } from "vuex";
|
|
|
@@ -149,7 +154,7 @@ export default {
|
|
|
components: {
|
|
|
swiper,
|
|
|
swiperSlide,
|
|
|
- login
|
|
|
+ login,RebuildModal
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -245,6 +250,7 @@ export default {
|
|
|
courseId: this.recordList.courseId
|
|
|
});
|
|
|
} else if (this.recordList.goodsType == 1) {
|
|
|
+ this.canJump(this.recordList).then(res => {
|
|
|
this.$router.push({
|
|
|
path: `/my-course-detail/${this.recordList.goodsId}`,
|
|
|
query: {
|
|
|
@@ -252,8 +258,184 @@ export default {
|
|
|
orderGoodsId: this.recordList.orderGoodsId,
|
|
|
}
|
|
|
});
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
+ canJump(item) {
|
|
|
+ return new Promise(resolve => {
|
|
|
+ this.$request
|
|
|
+ .orderInfo({
|
|
|
+ orderGoodsId: item.orderGoodsId
|
|
|
+ })
|
|
|
+ .then(async res => {
|
|
|
+ let items = res.data;
|
|
|
+ let currentTime = this.$tools.timest();
|
|
|
+ if (items.interfaceAccountId > 0) {
|
|
|
+ //学习账号已开通
|
|
|
+
|
|
|
+ if (items.learnStatus == 1) {
|
|
|
+ //跳转第三方h5
|
|
|
+
|
|
|
+ const confirmText = [
|
|
|
+ "您的学习账号已经开通,请按照步骤操作,进行学习。",
|
|
|
+ "1.点击【跳转学习网址】按钮",
|
|
|
+ "2.打开学习网址后,选择【个人用户】进行登录",
|
|
|
+ "(1)账号:您个人的身份证号码",
|
|
|
+ "(2)密码:身份证号码,再加111111"
|
|
|
+ ];
|
|
|
+ const newDatas = [];
|
|
|
+ const h = this.$createElement;
|
|
|
+ for (const i in confirmText) {
|
|
|
+ newDatas.push(h("p", null, confirmText[i]));
|
|
|
+ }
|
|
|
+ this.$confirm(h("div", null, newDatas), "温馨提示", {
|
|
|
+ confirmButtonText: "跳转学习网址",
|
|
|
+ cancelButtonText: "关闭",
|
|
|
+ closeOnClickModal: false,
|
|
|
+ closeOnPressEscape: false,
|
|
|
+ distinguishCancelAndClose: false,
|
|
|
+ showClose: false
|
|
|
+ })
|
|
|
+ .then(_ => {
|
|
|
+ window.open("http://admin.zhujianpeixun.com/", "_blank");
|
|
|
+ })
|
|
|
+ .catch(_ => {});
|
|
|
+
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: "warning",
|
|
|
+ message:
|
|
|
+ "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // //内部系统
|
|
|
+ // if (items.interfacePushId > 0 && items.officialStatus != 1) {
|
|
|
+ // this.$message({
|
|
|
+ // type: "warning",
|
|
|
+ // message:
|
|
|
+ // "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
|
|
|
+ // });
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ if (items.goodsType !== 6) {
|
|
|
+ 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.$refs.rebuildModal.showModal(items);
|
|
|
+ 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: "课程内暂无可以学习的科目",
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
goCourse(item) {
|
|
|
// if (item.topicId) {
|
|
|
// this.$router.push({
|