diff --git a/src/api/index.js b/src/api/index.js index b2b0cd2..1be6090 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -21,6 +21,7 @@ export default { curriculumGetSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, // 根据小节id获取预览文件地址 getProjectBySystemId: 'occupationlab/occupationlab/projectManage/getProjectBySystemId', getTheMostRecentlyRunProject: 'python/python/getTheMostRecentlyRunProject', + whetherToRenewTheFee: 'nakadai/nakadai/curriculum/whetherToRenewTheFee', // 权限管理 getUserRolesPermissionMenu: `users/users/user-role/getUserRolesPermissionMenu`, @@ -69,6 +70,7 @@ export default { deleteAssessment: `occupationlab/occupationlab/assessment/deleteAssessment`, // 单个、批量删除 collectPaper: `occupationlab/occupationlab/assessment/collectPaper`, // 收卷(提前结束) schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 + getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`, projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表 // 成绩管理 diff --git a/src/assets/img/wechat-code.jpeg b/src/assets/img/wechat-code.jpeg new file mode 100644 index 0000000..07a86ee Binary files /dev/null and b/src/assets/img/wechat-code.jpeg differ diff --git a/src/layouts/navbar/index.vue b/src/layouts/navbar/index.vue index 7424e10..7f6541c 100644 --- a/src/layouts/navbar/index.vue +++ b/src/layouts/navbar/index.vue @@ -125,6 +125,9 @@ export default { ...mapActions('user', [ 'logout' ]), + ...mapActions("info", [ + "setTabsName", "setColumnId" + ]), // 获取权限列表 getPer() { this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => { @@ -150,6 +153,8 @@ export default { }, // 菜单点击回调 menuSelect(path) { + this.setTabsName('1') + this.setColumnId('') path === '/screen' ? window.open(this.$router.resolve(path).href) : this.$router.push(path) } } diff --git a/src/pages/assessment/add/index.vue b/src/pages/assessment/add/index.vue index 1eef8e2..07eb2b6 100644 --- a/src/pages/assessment/add/index.vue +++ b/src/pages/assessment/add/index.vue @@ -381,7 +381,7 @@ export default { } }, getschoolCourse() { // 获取课程 - this.$get(this.api.schoolCourse).then(res => { + this.$get(this.api.getSchoolEffectiveCourse).then(res => { this.curriculumList = res.data; if (this.curriculumList.length) { if (this.form.curriculumId){ diff --git a/src/pages/course/contentSettings/index.vue b/src/pages/course/contentSettings/index.vue index fdc12c8..7e81f39 100644 --- a/src/pages/course/contentSettings/index.vue +++ b/src/pages/course/contentSettings/index.vue @@ -73,7 +73,7 @@ - + @@ -85,7 +85,7 @@ - + - +
- + diff --git a/src/pages/information/list/index.vue b/src/pages/information/list/index.vue index 464ecef..fa76230 100644 --- a/src/pages/information/list/index.vue +++ b/src/pages/information/list/index.vue @@ -31,11 +31,12 @@ export default { }, methods: { ...mapActions("info", [ - "setTabsName" + "setTabsName", "setColumnId" ]), switchTab(id) { this.tabsName = id this.setTabsName(id) + this.setColumnId('') }, // 页面离开询问保存 routeLeave(fn, param) { diff --git a/src/pages/project/list/index.vue b/src/pages/project/list/index.vue index d0de544..780fe9d 100644 --- a/src/pages/project/list/index.vue +++ b/src/pages/project/list/index.vue @@ -47,6 +47,8 @@ :options="curs" :props="{ checkStrictly: true, value: 'id' }" clearable + popper-class="course-cas" + @expand-change="curChange" @change="curChange"> + +
+

该课程订阅期限已到期,若需要续费请扫码添加客服咨询

+ +
+
@@ -141,7 +150,9 @@ export default { projectVisible: false, projects: [], loading: false, - curProject: '' + curProject: '', + overdue: 0, //是否过期 + buyVisible: false }; }, computed: { @@ -150,10 +161,9 @@ export default { ]) }, mounted() { - bus.$emit("setBg", "none"); this.insertScript(); this.getData(); - this.getChapter(); + this.getStatus() }, methods: { goBack() { @@ -168,12 +178,21 @@ export default { this.assessmentList = data.assessmentConfig; this.systemIds = data.systemIds }, + // 查询是否过期 + getStatus() { + this.$get(this.api.whetherToRenewTheFee, { + cid: this.courseId + }).then(({ isRenew }) => { + // 1正常显示资源,0显示续费 + this.overdue = isRenew + this.getChapter() + }).catch(res => {}) + }, async getChapter() { let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`); this.chapterList = res.chapterList; if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length) { - // console.log(this.chapterList[0].subsectionList[0]); - this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name); + this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 1); } }, // 插入阿里云播放器脚本 @@ -194,12 +213,18 @@ export default { document.body.removeChild(document.querySelector("#aliplayerScript")); }); }, + // 显示咨询弹框 + showBuy() { + this.buyVisible = true + }, transferType(ext) { if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片"; if ("mp4,3gp,mov,m4v,avi,dat,mkv,flv,vob,rmvb,rm,qlv".includes(ext)) return "视频"; return ext; }, - preview(row, chapterName) { + preview(row, chapterName, showDia = 0) { + // 如果没过期,则正常预览,否则显示购买弹框 + if (this.overdue || showDia) { this.curLink = `${chapterName}${row.name}`; // 章节名称+小节名称,小节名称有重复的情况,如果只用小节名称判断,会有同时选中多个的情况 this.playauth = ""; this.coverUrl = ""; @@ -275,6 +300,9 @@ export default { this.iframeSrc = res.previewUrl; }).catch(err => {}); } + } else { + this.showBuy() + } }, closePlayer() { this.playAuth = ""; @@ -370,7 +398,10 @@ export default { if (systemId == 11) { // 银行系统 - location.href = `${Setting.bankPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true` + location.href = `${Setting.bankPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true&manager=1` + } else if (systemId == 12) { + // 众筹系统 + window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}`); } else if (systemId == 21) { window.open(`http://121.37.29.24:80/yyyflogin?userId=${this.userId}&userName=${userName}&userType=${roleId}&reqType=1&reqId=3989a0ad671849b99dcbdcc208782333&caseId=9681f86902314b10bc752909121f9ab9&authorization=87DIVy348Oxzj3ha&classId=1876&courserId=7ff5d4715b114b7398b6f26c20fac460`); } else if (systemId == 22) { @@ -404,6 +435,11 @@ $height: 700px; overflow: hidden; } } +.entry { + width: 100%; + height: 50px; + font-size: 18px; +} .fileIframe{ height: $height !important; } @@ -502,6 +538,16 @@ $height: 700px; } } } +.buy { + text-align: center; + .tips { + margin-bottom: 10px; + font-size: 14px; + } + img { + width: 85%; + } +} .el-image-viewer__wrapper{ transform: translateY(-10px); transition: transform .5s; diff --git a/src/plugins/auth/index.js b/src/plugins/auth/index.js index 48a6975..ba46963 100644 --- a/src/plugins/auth/index.js +++ b/src/plugins/auth/index.js @@ -4,9 +4,11 @@ * 用例:text 或者:text * */ import store from '@/store' +import Setting from '@/setting' export default { inserted(el, binding, vnode) { + if (!Setting.dynamicRoute) return false const val = binding.value // 如果有传值,判断是否有/,有就说说明传的是完整的值,否则就拿路由拼接传的值;如果没传值,就取按钮名字 const text = val && val.includes('/') ? val : vnode.context.$route.path + ':' + (val || el.innerText) diff --git a/src/setting.js b/src/setting.js index b9ee53a..3f2fc32 100644 --- a/src/setting.js +++ b/src/setting.js @@ -16,16 +16,17 @@ let uploadURL = `http://121.37.12.51/` let title = (isHh || isCH) ? '教师管理端' : '职站服务端管理系统' if (isPro || isZxy) { + if (isPro) bankPath = `https://www.huorantech.cn/banksystem` // 职站生产 uploadURL = `https://www.huorantech.cn/` - bankPath = `https://www.huorantech.cn/banksystem` jumpPath = `https://www.huorantech.cn/judgmentPoint/` } else if (isDev) { - jumpPath = "http://192.168.31.125:8087/"; - bankPath = `http://192.168.31.125:8093` + jumpPath = `http://${location.hostname}:8087/` + bankPath = `http://${location.hostname}:8093` host = "http://121.37.12.51/"; // 中台测试服 - // host = "http://192.168.31.151:9000/"; // 榕 - // host = 'http://192.168.31.137:9000/'; // 赓 + // host = 'https://www.occupationlab.com/' // 正式服 + // host = "http://192.168.31.51:9000/"; // 榕 + // host = 'http://192.168.31.116:9000/'; // 赓 } else if (isZxy) { uploadURL = `https://izhixinyun.com/` } @@ -87,7 +88,7 @@ const Setting = { // 相同路由,不同参数间进行切换,是否强力更新 sameRouteForceUpdate: false, // 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮) - dynamicRoute: false, + dynamicRoute: true, // 文件上传 upload: { apiURL: uploadURL, diff --git a/src/store/modules/info.js b/src/store/modules/info.js index 450c81c..2c3b27f 100644 --- a/src/store/modules/info.js +++ b/src/store/modules/info.js @@ -4,7 +4,7 @@ export default { namespaced: true, state: { - tabsName: "2", + tabsName: "1", columnId: "" }, mutations: { diff --git a/src/styles/common.scss b/src/styles/common.scss index 9845bea..0f78a4d 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -377,4 +377,11 @@ border-top-color: #fff; } } +} +.course-cas { + .el-cascader-menu:first-child { + .el-radio { + display: none; + } + } } \ No newline at end of file diff --git a/src/styles/layout/index.scss b/src/styles/layout/index.scss index 06aea86..f946fc7 100644 --- a/src/styles/layout/index.scss +++ b/src/styles/layout/index.scss @@ -11,7 +11,7 @@ body, body { min-width: 1280px; - font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif; + font-family: PingFangSC-Regular, PingFang SC, "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif; font-size: 14px; background: rgba(0, 0, 0, 0.05); } \ No newline at end of file