lex-xin 7 달 전
부모
커밋
52a85a1442
2개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 7 5
      src/views/cloudPractice/cloudPractice.tsx
  2. 1 1
      src/views/cloudPractice/useData.ts

+ 7 - 5
src/views/cloudPractice/cloudPractice.tsx

@@ -821,8 +821,13 @@ export default defineComponent({
          }
       }
       const resetRender = async () => {
-         if (userStoreHook.roles === "GYM") return
          const iframeRef: any = document.getElementById("staffIframeRef")
+         if (userStoreHook.roles === "GYM") {
+            iframeRef.contentWindow.location.replace(getPreViewCloud(activeItem.value.id, state.partXmlIndex))
+            // state.iframeSrc = getPreViewCloud(activeItem.value.id, state.partXmlIndex)
+            return
+         }
+
          if (iframeRef && iframeRef.contentWindow?.renderXml) {
             staffLoading.value = true
             const res: any = await axios.get(activeItem.value.xmlUrl)
@@ -908,7 +913,6 @@ export default defineComponent({
                ((activeItem.value.musicSheetType === "CONCERT" && state.selectedPartName) || state.selectedTrack
                   ? `(${state.selectedPartName || state.selectedTrack})`
                   : "")
-            console.log(musicName, "musicName")
             try {
                const osmdImg = e.data.osmdImg
                const imgs = []
@@ -1264,9 +1268,7 @@ export default defineComponent({
                   />
 
                   <div class={styles.rightBtns} style={{ display: activeItem.value.id ? "" : "none" }}>
-                     <div
-                     // style={{ display: state.musicPdfUrl ? "" : "none" }}
-                     >
+                     <div style={{ display: state.musicPdfUrl || state.imgs.length > 0 ? "" : "none" }}>
                         <NTooltip showArrow={false}>
                            {{
                               trigger: () => (

+ 1 - 1
src/views/cloudPractice/useData.ts

@@ -41,7 +41,7 @@ export const useFunction = () => {
       //  GYM,GYT,KLX 区分   云教练
       const urlObj = {
          GYT: `${URL_TEACH_GYT}?id=${musicId}&modelType=practice&modeType=json&part-index=${partIndex}&Authorization=${getToken()}&isYjt=1&&isHideBack=false`,
-         GYM: `${URL_TEACH_GYM}#/detail/${musicId}?Authorization=${getToken()}&platform=web&part-index=${partIndex}&isPreView=true`,
+         GYM: `${URL_TEACH_GYM}?t=${Date.now()}#/?id=${musicId}&Authorization=${getToken()}&platform=web&part-index=${partIndex}&isPreView=true`,
          KLX: `${URL_TEACH_KLX}?Authorization=${getToken()}&id=${musicId}&limitModel=practice&part-index=${partIndex}&isYjt=1&client=teacher`
       }
       return urlObj[userStoreHook.roles!]