2 Commits 3196bd4963 ... 8c7529272e

Author SHA1 Message Date
  lex-xin 8c7529272e Merge branch 'iteraion-20240914-pdf' 1 month ago
  lex-xin 4dd01773ae 修改样式 1 month ago
2 changed files with 21 additions and 21 deletions
  1. 11 11
      src/tenant/music/music-detail/new-index.tsx
  2. 10 10
      src/views/music/music-detail/index.tsx

+ 11 - 11
src/tenant/music/music-detail/new-index.tsx

@@ -521,17 +521,17 @@ export default defineComponent({
       try {
         nextTick(() => {
           if (musicPdfUrl.value) {
-            // const url = `${location.origin}${
-            //     location.pathname
-            //   }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
-            //     musicPdfUrl.value
-            //   )}&t=${Date.now()}`
+            const url = `${location.origin}${
+                location.pathname
+              }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
+                musicPdfUrl.value
+              )}&t=${Date.now()}`
 
 
-              const url = '/pdf/web/viewer-pdf.html?file=' +
-                encodeURIComponent(musicPdfUrl.value) +
-                '&t=' +
-                Date.now()
+              // const url = '/pdf/web/viewer-pdf.html?file=' +
+              //   encodeURIComponent(musicPdfUrl.value) +
+              //   '&t=' +
+              //   Date.now()
             
             const iframeRef = document.querySelector('#staffIframeRef') as any
             iframeRef.contentWindow.location.replace(
@@ -539,8 +539,8 @@ export default defineComponent({
             )
             staffData.iframeSrc = url
           } else {
-            // const url = `${location.origin}${location.pathname}osmd/index.html`
-            const url = `${location.origin}/osmd/index.html`
+            const url = `${location.origin}${location.pathname}osmd/index.html`
+            // const url = `${location.origin}/osmd/index.html`
 
             const iframeRef = document.querySelector('#staffIframeRef') as any
             iframeRef.contentWindow.location.replace(url)

+ 10 - 10
src/views/music/music-detail/index.tsx

@@ -621,23 +621,23 @@ export default defineComponent({
       try {
         nextTick(() => {
           if (musicPdfUrl.value) {
-            const url = `${location.origin}/pdf/web/viewer-pdf.html?file=${encodeURIComponent(
-              musicPdfUrl.value
-            )}&t=${Date.now()}`
-            // const url = `${location.origin}${
-            //   location.pathname
-            // }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
+            // const url = `${location.origin}/pdf/web/viewer-pdf.html?file=${encodeURIComponent(
             //   musicPdfUrl.value
             // )}&t=${Date.now()}`
+            const url = `${location.origin}${
+              location.pathname
+            }pdf/web/viewer-pdf.html?file=${encodeURIComponent(
+              musicPdfUrl.value
+            )}&t=${Date.now()}`
 
             const iframeRef = document.querySelector('#staffIframeRef') as any
             iframeRef.contentWindow.location.replace(url)
             staffData.iframeSrc = url
           } else {
-            // const url = `${location.origin}${
-            //   location.pathname
-            // }osmd/index.html?t=${new Date().getTime()}`
-            const url = `${location.origin}/osmd/index.html`
+            const url = `${location.origin}${
+              location.pathname
+            }osmd/index.html?t=${new Date().getTime()}`
+            // const url = `${location.origin}/osmd/index.html`
 
             const iframeRef = document.querySelector('#staffIframeRef') as any
             iframeRef.contentWindow.location.replace(