2 Commits 3196bd4963 ... 8c7529272e

Autor SHA1 Mensagem Data
  lex-xin 8c7529272e Merge branch 'iteraion-20240914-pdf' 16 horas atrás
  lex-xin 4dd01773ae 修改样式 16 horas atrás

+ 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(