Browse Source

feat: 机构收藏进入云教练修改

TIANYONG 3 months ago
parent
commit
6efd16beea
2 changed files with 3 additions and 2 deletions
  1. 1 1
      src/page-instrument/component/the-music-list/list.tsx
  2. 2 1
      src/utils/baseApi.ts

+ 1 - 1
src/page-instrument/component/the-music-list/list.tsx

@@ -41,7 +41,7 @@ export default defineComponent({
       recentFlag: props.recentFlag ? true : null, // 最近练习
       favoriteFlag: props.favoriteFlag ? true : null, // 我的收藏
       excludeMusicId: props.recentFlag || props.favoriteFlag ? null : state.examSongId,
-      albumId: query.albumId ? query.albumId : null,
+      albumId: query.albumId && query.albumId !== '1' ? query.albumId : null,
       providerType: state.tenantAlbumId ? "TENANT" : "PLATFORM"
     });
     const data = reactive({

+ 2 - 1
src/utils/baseApi.ts

@@ -12,7 +12,8 @@ import state from "/src/state";
 export const getMusicSheetDetail = (sysMusicScoreId: string, type?: string, musicId?: string) => {
   let url = type === 'open' ? `/open/musicSheet/cbsDetail/${sysMusicScoreId}?userMusicId=${musicId}` : `/musicSheet/cbsDetail/${sysMusicScoreId}`;
   if (state.tenantAlbumId) {
-    url += `?tenantAlbumId=${state.tenantAlbumId}`
+    // 从机构收藏列表进入云教练,没有专辑id,传providerType=TENANT
+    url += state.tenantAlbumId == '1' ? `?providerType=TENANT` : `?tenantAlbumId=${state.tenantAlbumId}`
   }
   if (state.systemType === 'web') {
     url = `/musicSheet/cbsDetail/${sysMusicScoreId}?providerType=${state.providerType}`