ZaiZai 8 months ago
parent
commit
792ccdb365
3 changed files with 4 additions and 15 deletions
  1. 1 0
      public/plugins/pdfjs/3.10.111/web/viewer.js
  2. 1 1
      public/version.json
  3. 2 14
      src/test/index.vue

+ 1 - 0
public/plugins/pdfjs/3.10.111/web/viewer.js

@@ -2098,6 +2098,7 @@ const PDFViewerApplication = {
     const queryString = document.location.search.substring(1);
     const params = (0, _ui_utils.parseQueryString)(queryString);
     file = params.get("file") ?? _app_options.AppOptions.get("defaultUrl");
+    file = file.replace("+", "%2B").replace("#", "%23")
     validateFileURL(file);
     const fileInput = appConfig.openFileInput;
     fileInput.value = null;

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240704195149"
+  "value": "20240705090602"
 }

+ 2 - 14
src/test/index.vue

@@ -1,21 +1,9 @@
 <template>
     <hc-card>
-        <template #header>
-            <el-button hc-btn type="primary" @click="test1Click">测试1</el-button>
-            <el-button hc-btn type="warning" @click="test2Click">测试2</el-button>
-        </template>
-        测试的
+        <hc-pdf :src="url" />
     </hc-card>
 </template>
 
 <script setup>
-import { toPdfPage } from '~uti/btn-auth'
-
-const test1Click = () => {
-    toPdfPage('https://bladex-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20240118/bf848a1a64acf788f8dfd4acb0d95582.pdf')
-}
-
-const test2Click = () => {
-    toPdfPage('https://bladex-oss-chongqing.oss-cn-shenzhen.aliyuncs.com//upload/20230925/0a604927fb3584a2860c757ee9afd12f.pdf')
-}
+const url = 'https://test-1252507092.cos.ap-chengdu.myqcloud.com/TJ04%E5%B7%A5%E5%8C%BA1%23%E9%92%A2%E7%AD%8B%E5%8A%A0%E5%B7%A5%E5%8E%82.pdf'
 </script>