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: [],