Pārlūkot izejas kodu

预览地址通过config 获取

dusenyao 3 gadi atpakaļ
vecāks
revīzija
1b92bf860c

+ 1 - 1
src/common/show_file/index.vue

@@ -5,7 +5,7 @@
       <iframe
         v-if="fileUrl.length > 0"
         id="iframe"
-        :src="`https://docpreview.utschool.cn/onlinePreview?url=${fileUrl}`"
+        :src="`${$store.state.app.config.doc_preview_service_address}/onlinePreview?url=${fileUrl}`"
         width="100%"
         height="540px"
       />

+ 1 - 1
src/components/live/CurMaterial.vue

@@ -80,7 +80,7 @@
         <iframe
           v-if="fileUrl.length > 0"
           id="iframe"
-          :src="`https://docpreview.utschool.cn/onlinePreview?url=${fileUrl}`"
+          :src="`${$store.state.app.config.doc_preview_service_address}/onlinePreview?url=${fileUrl}`"
           width="100%"
           height="540px"
         />

+ 2 - 1
src/store/modules/app.js

@@ -24,7 +24,8 @@ const getDefaultSate = () => {
       logo_image_url: isHas ? token.logo_image_url : '',
       logo_image_url_home: isHas ? token.logo_image_url_home : '',
       title_icon_url: isHas ? token.title_icon_url : '',
-      sys_type: isHas ? token.sys_type : ''
+      sys_type: isHas ? token.sys_type : '',
+      doc_preview_service_address: isHas ? token.doc_preview_service_address : ''
     }
   };
 };

+ 1 - 1
src/views/live/teacher/CompleteList.vue

@@ -92,7 +92,7 @@
           <iframe
             v-if="fileUrl.length > 0"
             id="iframe"
-            :src="`https://docpreview.utschool.cn/onlinePreview?url=${fileUrl}`"
+            :src="`${$store.state.app.config.doc_preview_service_address}/onlinePreview?url=${fileUrl}`"
             width="100%"
             height="540px"
           />