Просмотр исходного кода

refactor(course): 替换预览图标并修改多语言文案,新增授课页面iframe嵌入

1.  将多语言文件中的Preview文案从"预览"改为对应环境的"授课"
2.  替换原有的预览图标为新的see.svg矢量图标
3.  新增课程页面iframe嵌入功能,根据语言环境切换不同域名
lsc 1 неделя назад
Родитель
Сommit
85ef4a12b8
5 измененных файлов с 38 добавлено и 5 удалено
  1. 7 0
      src/assets/see.svg
  2. 28 2
      src/components/pages/course.vue
  3. 1 1
      src/lang/cn.json
  4. 1 1
      src/lang/en.json
  5. 1 1
      src/lang/hk.json

+ 7 - 0
src/assets/see.svg

@@ -0,0 +1,7 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+  <path d="M4 5C4 4.44772 4.44772 4 5 4H19C19.5523 4 20 4.44772 20 5V15C20 15.5523 19.5523 16 19 16H5C4.44772 16 4 15.5523 4 15V5Z" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+  
+  <path d="M8 20L12 16L16 20" stroke="#5F6368" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+  
+  <path d="M10 8L15 10L10 12V8Z" fill="#5F6368"/>
+</svg>

+ 28 - 2
src/components/pages/course.vue

@@ -227,7 +227,8 @@
             <div class="three_bottom">
 							<el-tooltip effect="dark" :content="lang.Preview" placement="top">
     					  <div class="t_b_Item" @click="get(item)">
-									<img style="height: 90%;width: 90%;" src="../../assets/icon/course/lookeye.svg">
+									<!-- <img style="height: 90%;width: 90%;" src="../../assets/icon/course/lookeye.svg"> -->
+									<img style="height: 90%;width: 90%;" src="../../assets/see.svg">
 								</div>
     					</el-tooltip>
 							<el-tooltip effect="dark" v-show="orgArray.includes(org) || oidArray.includes(oid)" :content="lang.AiEdit" placement="top">
@@ -424,6 +425,7 @@
 		<shareDialog ref="shareDialogRef"/>
     <templateDialog :dialogVisibleTemplate.sync="dialogVisibleTemplate" :userid="userid" :org="org" :oid="oid" @goToCourseTemplate="goToCourseTemplate" @goToCourseTemplate2="goToCourseTemplate2"></templateDialog>
     <templateDialogE :dialogVisibleTemplate.sync="dialogVisibleTemplate2" :userid="userid" :org="org" :oid="oid" @goToCourseTemplate="goToCourseTemplateE" @goToCourseTemplate2="goToCourseTemplate2E"></templateDialogE>
+    <iframe :src="courseUrl" class="courseIframe" v-if="courseUrl"></iframe>
   </div>
 </template>
 
@@ -498,6 +500,7 @@ export default {
       oidArray:[],
       pptArrayOrg:[],
       pptArrayOid:[],
+      courseUrl: "",
 
     };
   },
@@ -940,7 +943,21 @@ export default {
       }
       this.addOp3('1', "", { courseid: item.courseId, type: _str }, "success")
 
-       window.topU.postMessage({ cid: item.courseId, screenType: "3" }, "*");
+      //  window.topU.postMessage({ cid: item.courseId, screenType: "3" }, "*");
+      let url = 'https://beta.pbl.cocorobo.cn'
+      if (window.location.href.includes('beta')) {
+        url = url
+      }
+      else if (this.lang.lang === 'cn') {
+        url = 'https://pbl.cocorobo.cn'
+      }
+      else if (this.lang.lang === 'hk') {
+        url = 'https://pbl.cocorobo.hk'
+      }
+      else if (this.lang.lang === 'en') {
+        url = 'https://pbl.cocorobo.com'
+      }
+      this.courseUrl = url + "/pbl-student-table/dist/#/courseDetail?userid=" + this.userid + "&oid=" + this.oid + "&org=" + this.org + "&courseId=" + item.courseId + "&tType=1&cid=&screenType=2"
     },
     getNT(cid) {
        window.topU.postMessage({ cid: cid, screenType: "3NT" }, "*");
@@ -2378,4 +2395,13 @@ export default {
     padding: 0 90px !important;
     box-sizing: border-box !important;
 }
+
+.courseIframe{
+  width: 100vw;
+  height: 100vh;
+  position: fixed;
+  z-index: 99999;
+  top: 0;
+  left: 0;
+}
 </style>

+ 1 - 1
src/lang/cn.json

@@ -220,7 +220,7 @@
   "OthersCourse": "他人课程",
   "Owner": "所有者",
   "PleaseEnterKeyword": "请输入关键字",
-  "Preview": "预览",
+  "Preview": "授课",
   "AiEdit": "Ai一下",
   "Share": "分享",
   "CreationDate": "创建日期",

+ 1 - 1
src/lang/en.json

@@ -219,7 +219,7 @@
   "OthersCourse": "Others Course",
   "Owner": "Owner",
   "PleaseEnterKeyword": "Please enter keywords",
-  "Preview": "Preview",
+  "Preview": "Teaching",
   "AiEdit": "AI Polish",
   "Share": "Share",
   "CreationDate": "Creation Date",

+ 1 - 1
src/lang/hk.json

@@ -220,7 +220,7 @@
   "OthersCourse": "他人課程",
   "Owner": "所有者",
   "PleaseEnterKeyword": "請輸入關鍵字",
-  "Preview": "預覽",
+  "Preview": "授课",
   "AiEdit": "Ai一下",
   "Share": "分享",
   "CreationDate": "創建日期",