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

回退预览路径修改;onlyoffice相关api引入路径更改为相对路径

cyy 6 месяцев назад
Родитель
Сommit
7084d88d31
2 измененных файлов с 11 добавлено и 11 удалено
  1. 1 1
      public/index.html
  2. 10 10
      src/components/ibps-file-preview/index.vue

+ 1 - 1
public/index.html

@@ -10,7 +10,7 @@
     <meta name="apple-touch-fullscreen" content="yes">
     <link rel="icon" href="<%= BASE_URL %>favicon.ico">
     <title><%= webpackConfig.name %></title>
-    <script type="text/javascript" src="http://dev1.local/word/web-apps/apps/api/documents/api.js"></script>
+    <script type="text/javascript" src="/word/web-apps/apps/api/documents/api.js"></script>
     <style>
        *{margin:0;padding:0;list-style:0;-webkit-touch-callout:none;}html{touch-action: manipulation;}
     </style>

+ 10 - 10
src/components/ibps-file-preview/index.vue

@@ -179,24 +179,24 @@ export default {
       this.getFile()
     },
     async getFile() {
-      console.log(this.file, 'filefilefile')
+      // console.log(this.file, 'filefilefile')
       // 1、获取文件数据 及下载流接口
       // 下载地址
-      const sql = `select * from t_ipcc where id_ = '1'`
-      let ipccUrl = ''
-      await this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'getIpConfig', params: [null] } : sql).then(res => {
-        const datas = res.variables.data
-        const ip = datas[0].nei_rong_
-        ipccUrl = ip + '/ibps'
-      })
+      // const sql = `select * from t_ipcc where id_ = '1'`
+      // let ipccUrl = ''
+      // await this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'getIpConfig', params: [null] } : sql).then(res => {
+      //   const datas = res.variables.data
+      //   const ip = datas[0].nei_rong_
+      //   ipccUrl = ip + '/ibps'
+      // })
       this.option.url =
-      (BASE_API() === ipccUrl ? BASE_API() : ipccUrl) +
+      BASE_API() +
         SYSTEM_URL() +
         '/file/download?attachmentId=' +
         this.file.id
       // 回调接口url
       this.option.editUrl =
-      (BASE_API() === ipccUrl ? BASE_API() : ipccUrl) +
+      BASE_API() +
         SYSTEM_URL() +
         '/file/editCallback?fileName=' +
         this.file.fileName +