From 7428a57ebcc554cf5fbb401d0d5d6d8f6a555722 Mon Sep 17 00:00:00 2001 From: daihh Date: Wed, 9 Nov 2022 09:17:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B8=B8=E4=B8=AD=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E8=B7=AF=E5=BE=84=E7=9A=84=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Course/auditCourse1.vue | 2 +- src/components/Course/catalogCourseware.vue | 2 +- src/security.js | 6 ++++-- src/views/portal/course/Micro.vue | 2 +- src/views/study/PortalIndex.vue | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index e9f62b81..a9cc71c9 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -305,7 +305,7 @@ export default { homeworkInfo: {}, examInfo: {}, assessInfo: {}, - fileBaseUrl: this.$xpage.constants.fileBaseUrl, + fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, btnLoading: false, curCFile:{},//课件内容 coursewareInfo: { diff --git a/src/components/Course/catalogCourseware.vue b/src/components/Course/catalogCourseware.vue index ac2e0cb6..620a127b 100644 --- a/src/components/Course/catalogCourseware.vue +++ b/src/components/Course/catalogCourseware.vue @@ -366,7 +366,7 @@ data(){ return { converStatus:4, - fileBaseUrl:this.$xpage.constants.fileBaseUrl, + fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL, curPdfPath:'', curCFile:{},//当前课件的内容 comTypes:[ diff --git a/src/security.js b/src/security.js index 4abfcb01..31c11c9e 100644 --- a/src/security.js +++ b/src/security.js @@ -17,9 +17,11 @@ router.beforeEach((to, from, next) => { //动态计算文件的路径 let configPath=process.env.VUE_APP_FILE_RELATIVE_PATH; if(configPath.startsWith('http')){ - xpage.fileBaseUrl=configPath; + //xpage.fileBaseUrl=configPath; + xpage.constants.fileBaseUrl=configPath; }else{ - xpage.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath; + //xpage.fileBaseUrl = window.location.protocol+'//'+window.location.host+configPath; + xpage.constants.fileBaseUrl=window.location.protocol+'//'+window.location.host+configPath; } diff --git a/src/views/portal/course/Micro.vue b/src/views/portal/course/Micro.vue index 3b1ed95d..9d725e98 100644 --- a/src/views/portal/course/Micro.vue +++ b/src/views/portal/course/Micro.vue @@ -293,7 +293,7 @@ export default { studyId: "", tags: [], numberToLetter: numberToLetter, - fileBaseUrl: this.$xpage.constants.fileBaseUrl, + fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, blobUrl:'',//播放的文件地址,新添加,采用blob方式 getType: getType, courseType, diff --git a/src/views/study/PortalIndex.vue b/src/views/study/PortalIndex.vue index 5eda8a1e..e80649ba 100644 --- a/src/views/study/PortalIndex.vue +++ b/src/views/study/PortalIndex.vue @@ -292,7 +292,7 @@ export default { totalContent: 0, //课程内容数量 pageCount: 0, currentPage: 0, - fileBaseUrl: this.$xpage.constants.fileBaseUrl, + fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, contentList: [], sectionList: [], teachers: [],