소스 검색

feat: 增加bizMusicCategoryId

TIANYONG 1 년 전
부모
커밋
2e9bdfb80f
2개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/page-instrument/component/the-music-list/list.tsx
  2. 4 1
      src/state.ts

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

@@ -18,7 +18,7 @@ export default defineComponent({
 		const forms = reactive({
 			page: 1,
 			rows: 20,
-			musicSheetCategoriesId: state.musicSheetCategoriesId,
+			musicSheetCategoriesId: state.bizMusicCategoryId,
 			recentFlag: props.recentFlag ? true : null,
 			excludeMusicId: props.recentFlag ? null : state.examSongId,
 		});

+ 4 - 1
src/state.ts

@@ -43,7 +43,7 @@ export enum IPlatform {
 /**
  * 特殊教材分类id
  */
-const classids = [1, 2, 6, 7, 8, 9, 3, 10, 11, 12, 13, 4, 14, 15, 16, 17, 30, 31, 35, 36, 46, 108]; // 大雅金唐, 竖笛教程, 声部训练展开的分类ID
+const classids = [1,2,3,4,6,7,8,9,10,11,12,13,14,15,16,17,30,31,35,36,38,108,150,151,152,153,154,155,156,157,158,178,179,180,181,182]; // 大雅金唐, 竖笛教程, 声部训练展开的分类ID
 
 // 乐器code码
 export const musicalInstrumentCodeInfo = [
@@ -287,6 +287,8 @@ const state = reactive({
   parentCategoriesId: 0,
   /** 分类ID */
   musicSheetCategoriesId: 0,
+  /** 各产品端的分类ID,(管乐迷、管乐团、酷乐秀、课堂乐器) */
+  bizMusicCategoryId: 0,  
   /** 资源类型: mp3 | midi */
   playMode: "MP3" as "MP3" | "MIDI",
   /** 设置的速度 */
@@ -979,6 +981,7 @@ const setState = (data: any, index: number) => {
   state.midiUrl = data.midiFileUrl;
   state.parentCategoriesId = data.musicTag;
   state.musicSheetCategoriesId = data.musicCategoryId;
+  state.bizMusicCategoryId = data.bizMusicCategoryId
   state.playMode = data.playMode === "MP3" ? "MP3" : "MIDI";
   state.originSpeed = state.speed = data.playSpeed;
   // state.playIngSpeed = data.playSpeed;