|
|
@@ -1022,6 +1022,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ pptIframeUrl: "",
|
|
|
gotype: (window.topU && window.topU.gotype) ? window.topU.gotype : '',
|
|
|
checkAll: false,
|
|
|
userid: this.$route.query.userid,
|
|
|
@@ -1195,25 +1196,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- // 判断当前页面URL是否包含beta
|
|
|
- isBetaEnv() {
|
|
|
- return window.location.href.includes('beta');
|
|
|
- },
|
|
|
- // 动态生成PPT iframe的URL
|
|
|
- pptIframeUrl() {
|
|
|
-
|
|
|
- let ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
- if (this.isBetaEnv) {
|
|
|
- ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
- } else if (this.lang.lang == 'com') {
|
|
|
- ppturl = 'https://ppt.cocorobo.com'
|
|
|
- } else if (this.lang.lang == 'hk') {
|
|
|
- ppturl = 'https://ppt.cocorobo.hk'
|
|
|
- } else {
|
|
|
- ppturl = 'https://ppt.cocorobo.cn'
|
|
|
- }
|
|
|
- return `${ppturl}/?mode=editor2&courseid=${this.cid}`;
|
|
|
- },
|
|
|
getListClassC() {
|
|
|
return function(list) {
|
|
|
let _c2 = [];
|
|
|
@@ -1721,9 +1703,16 @@ export default {
|
|
|
if (this.uploadWorkLoading) return;
|
|
|
this.uploadWorkLoading = true;
|
|
|
let _pptData = await this.getPPtJson();
|
|
|
-
|
|
|
+ const _pptData2 = JSON.parse(JSON.stringify(_pptData))
|
|
|
+ if (_pptData2.slides) {
|
|
|
+ _pptData2.slides.forEach((slide) => {
|
|
|
+ if (slide.elements) {
|
|
|
+ slide.elements = slide.elements.filter((element) => element.type !== 'image')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
// 用_pptData生成json文件,并生成File对象
|
|
|
- const pptJsonStr = JSON.stringify(_pptData, null, 2);
|
|
|
+ const pptJsonStr = JSON.stringify(_pptData2, null, 2);
|
|
|
const pptJsonFile = new File([pptJsonStr], this.courseName + ".json", { type: "application/json" });
|
|
|
// 你可以根据需要将pptJsonFile上传或保存
|
|
|
console.log(_url)
|
|
|
@@ -3074,6 +3063,24 @@ export default {
|
|
|
this.isAddOrUpdateLineLoading = false;
|
|
|
|
|
|
},
|
|
|
+ // 判断当前页面URL是否包含beta
|
|
|
+ isBetaEnv() {
|
|
|
+ return window.location.href.includes('beta');
|
|
|
+ },
|
|
|
+ // 动态生成PPT iframe的URL
|
|
|
+ setPptIframeUrl() {
|
|
|
+ let ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
+ if (this.isBetaEnv) {
|
|
|
+ ppturl = "https://beta.ppt.cocorobo.cn"
|
|
|
+ } else if (this.lang.lang == 'com') {
|
|
|
+ ppturl = 'https://ppt.cocorobo.com'
|
|
|
+ } else if (this.lang.lang == 'hk') {
|
|
|
+ ppturl = 'https://ppt.cocorobo.hk'
|
|
|
+ } else {
|
|
|
+ ppturl = 'https://ppt.cocorobo.cn'
|
|
|
+ }
|
|
|
+ this.pptIframeUrl = `${ppturl}/?mode=editor2&courseid=${this.cid}`;
|
|
|
+ },
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
|
|
|
@@ -3092,6 +3099,7 @@ export default {
|
|
|
if (this.mergedList.includes(this.org)) {
|
|
|
this.isTeacherSee = true
|
|
|
}
|
|
|
+ this.setPptIframeUrl();
|
|
|
// 清空
|
|
|
this.pptCourseJson.toolsList = [];
|
|
|
this.setPPtToolList()
|