فهرست منبع

添加酷乐秀曲目详情

lex-xin 6 ماه پیش
والد
کامیت
52fc504b53
3فایلهای تغییر یافته به همراه26 افزوده شده و 28 حذف شده
  1. 1 1
      src/api/cloudPractice.api.ts
  2. 21 26
      src/views/cloudPractice/cloudPractice.tsx
  3. 4 1
      src/views/cloudPractice/useData.ts

+ 1 - 1
src/api/cloudPractice.api.ts

@@ -86,7 +86,7 @@ export const querySubjectIds_klx = (data?: any) => {
 export const queryPage2_klx = (data: any) => {
    return httpAxios_klx.axioseRquest({
       method: "post",
-      url: "/api-teacher/tenantAlbumMusic/page",
+      url: "/api-teacher/tenantAlbumMusic/pageSimple",
       data
    })
 }

+ 21 - 26
src/views/cloudPractice/cloudPractice.tsx

@@ -130,22 +130,23 @@ export default defineComponent({
                musicPdfUrl: list?.musicPdfUrl
             }
          } else if (userStoreHook.roles === "KLX") {
-            const item: any = list.background?.[0]
+            // const item: any = list.background?.[0]
             tempList = {
                id: list?.id,
-               name: list?.musicSheetName,
-               background: list?.background,
-               xmlUrl: list?.xmlFileUrl,
-               musicSheetType: list?.musicSheetType,
-               audioFileUrl: item?.audioFileUrl,
-               titleImg: list?.titleImg,
-               musicImg: list.musicImg,
-               musicJianImg: list.musicJianSvg,
-               musicFirstImg: list.musicFirstSvg,
-               isScoreRender: false,
-               defaultScoreRender: false,
-               musicPdfUrl: list?.musicPdfUrl
+               name: list?.name,
+               // background: list?.background,
+               // xmlUrl: list?.xmlFileUrl,
+               // musicSheetType: list?.musicSheetType,
+               audioFileUrl: list?.audioFileUrl,
+               titleImg: list?.titleImg
+               // musicImg: list.musicImg,
+               // musicJianImg: list.musicJianSvg,
+               // musicFirstImg: list.musicFirstSvg,
+               // isScoreRender: false,
+               // defaultScoreRender: false,
+               // musicPdfUrl: list?.musicPdfUrl
             }
+            console.log(tempList, "tempList -- tempList", list)
          }
          return tempList
       })
@@ -466,11 +467,7 @@ export default defineComponent({
                   state.list = []
                   state.reshing = false
                }
-
                if (Array.isArray(result.rows)) {
-                  result.rows.forEach((item: any) => {
-                     item.name = item.musicSheetName
-                  })
                   state.list = [...state.list, ...result.rows]
                   state.finshed = state.page >= result.totalPage
                } else {
@@ -585,7 +582,7 @@ export default defineComponent({
          } else if (userStoreHook.roles === "GYT") {
             //
          } else if (userStoreHook.roles === "KLX") {
-            // await handleGetDetail_klx()
+            await handleGetDetail_klx()
          }
       }
 
@@ -859,7 +856,7 @@ export default defineComponent({
       }
 
       const toDetail = async () => {
-         if (userStoreHook.roles === "GYM") {
+         if (userStoreHook.roles === "GYM" || userStoreHook.roles === "KLX") {
             toDetailGYM()
             return
          }
@@ -939,7 +936,7 @@ export default defineComponent({
       }
 
       const musicIframeLoad = async () => {
-         if (userStoreHook.roles === "GYM") {
+         if (userStoreHook.roles === "GYM" || userStoreHook.roles === "KLX") {
             // 判断是用哪个渲染的
             loading.value = false
             staffLoading.value = false
@@ -966,7 +963,7 @@ export default defineComponent({
       }
       const resetRender = async () => {
          const iframeRef: any = document.getElementById("staffIframeRef")
-         if (userStoreHook.roles === "GYM") {
+         if (userStoreHook.roles === "GYM" || userStoreHook.roles === "KLX") {
             iframeRef.contentWindow.location.replace(getPreViewCloud(activeItem.value.id, state.partXmlIndex, state.selectedTrack))
             // state.iframeSrc = getPreViewCloud(activeItem.value.id, state.partXmlIndex)
             return
@@ -994,7 +991,7 @@ export default defineComponent({
                // https://cdn.oss.dayaedu.com/daya202409/UOFVK2A.pdf
                // https://cdn.oss.dayaedu.com/daya202409/UODQffO.pdf
             } else {
-               if (userStoreHook.roles === "GYM") {
+               if (userStoreHook.roles === "GYM" || userStoreHook.roles === "KLX") {
                   nextTick(() => {
                      const iframeRef: any = document.getElementById("staffIframeRef")
                      if (iframeRef) {
@@ -1072,7 +1069,7 @@ export default defineComponent({
                      osmdImg[i].width,
                      osmdImg[i].height,
                      musicName,
-                     userStoreHook.roles === "GYM" ? false : true
+                     userStoreHook.roles === "GYM" || userStoreHook.roles === "KLX" ? false : true
                   )
                   imgs.push({
                      url: img,
@@ -1144,12 +1141,10 @@ export default defineComponent({
          if (instrumentIds) {
             //  GYM,GYT,KLX 区分   查询声部数据
             let cbsDetails: any = []
-            if (userStoreHook.roles === "GYM") {
+            if (userStoreHook.roles === "GYM" || userStoreHook.roles === "KLX") {
                cbsDetails = state.details.musicalInstruments || []
             } else if (userStoreHook.roles === "GYT") {
                //
-            } else if (userStoreHook.roles === "KLX") {
-               //
             }
             const { code } =
                cbsDetails.find((item: any) => {

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

@@ -46,16 +46,19 @@ export const useFunction = () => {
    function getPreViewCloud(musicId: string, partIndex = 0, track = "") {
       //  GYM,GYT,KLX 区分   云教练
       let gymUrl = `${URL_TEACH_GYM}?t=${Date.now()}#/?id=${musicId}&Authorization=${getToken()}&isPreView=true&zoom=1&downPng=A4&systemType=teacher`
+      let klxUrl = `${URL_TEACH_KLX}?t=${Date.now()}#/?id=${musicId}&Authorization=${getToken()}&isPreView=true&zoom=1&downPng=A4&systemType=teacher`
       if (partIndex === 999) {
          gymUrl += `&part-index=${partIndex}`
+         klxUrl += `&part-index=${partIndex}`
       } else {
          gymUrl += `&part-name=${track}`
+         klxUrl += `&part-name=${track}`
       }
 
       const urlObj = {
          GYT: `${URL_TEACH_GYT}?id=${musicId}&modelType=practice&modeType=json&part-index=${partIndex}&Authorization=${getToken()}&isYjt=1&&isHideBack=false`,
          GYM: gymUrl,
-         KLX: `${URL_TEACH_KLX}?t=${Date.now()}#/?id=${musicId}&Authorization=${getToken()}&part-index=${partIndex}&isPreView=true&systemType=teacher`
+         KLX: klxUrl
       }
       return urlObj[userStoreHook.roles!]
    }