瀏覽代碼

feat: 增加我的收藏列表

TIANYONG 4 月之前
父節點
當前提交
009070ad0d

+ 2 - 2
src/page-instrument/api.ts

@@ -41,13 +41,13 @@ export const studentQueryUserInfo = async () => {
     } else {
       state.systemType = "student"
       const res = await request.get(`/student/queryUserInfo`);
-      const data = res.data.student
+      const data = res.data
       res.data = {
         instrumentId: res.data.instrumentId ? res.data.instrumentId.split(',')[0] : "",
         specialInstrumentIds: res.data.instrumentId ? res.data.instrumentId.split(',') : [],
         phone:data.phone,
         clientType:"STUDENT",
-        id:data.id,
+        id:data.userId,
         gender:""
       }
       return res

+ 2 - 2
src/page-instrument/component/the-music-list/index.module.less

@@ -10,7 +10,7 @@
             height: 100%;
             .van-tabs__wrap{
                 display: flex;
-                justify-content: flex-end;
+                justify-content: center;
                 height: 22px;
                 .van-tabs__nav--line{
                     padding-bottom: 0;
@@ -24,7 +24,7 @@
                         color: #aaa;
                         font-weight: bold;
                         &:nth-child(2){
-                            margin: 0 82px 0 75px;   
+                            margin: 0 46px;   
                         }
                         &.van-tab--active{
                             color: #000;

+ 3 - 0
src/page-instrument/component/the-music-list/index.tsx

@@ -25,6 +25,9 @@ export default defineComponent({
 							<Tab title="最近练习">
 								<List recentFlag={true} />
 							</Tab>
+							<Tab title="我的收藏">
+								<List favoriteFlag={true} />
+							</Tab>
 						</Tabs>
 					</div>
 				</Popup>

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

@@ -14,10 +14,16 @@ import { vipData } from "../vip"
 export default defineComponent({
   name: "TheMusicList-list",
   props: {
+    // 最近练习
     recentFlag: {
       type: Boolean,
       default: false,
     },
+    // 我的收藏
+    favoriteFlag: {
+      type: Boolean,
+      default: false,
+    },
   },
   setup(props) {
     const query: any = getQuery();
@@ -27,8 +33,9 @@ export default defineComponent({
       rows: 20,
       musicalInstrumentId: state.specialPercussionFlag ? state.musicalInstrumentIds.split(",")[0] : (state.isConcert ? "" : state.instrumentId),
       musicSheetCategoriesId: state.bizMusicCategoryId,
-      recentFlag: props.recentFlag ? true : null,
-      excludeMusicId: props.recentFlag ? null : state.examSongId,
+      recentFlag: props.recentFlag ? true : null, // 最近练习
+      favoriteFlag: props.favoriteFlag ? true : null, // 我的收藏
+      excludeMusicId: props.recentFlag || props.favoriteFlag ? null : state.examSongId,
     });
     const data = reactive({
       isFocus: false,
@@ -70,6 +77,12 @@ export default defineComponent({
         data.hasNext = true;
       }
     );
+    watch(
+      () => props.favoriteFlag,
+      () => {
+        data.hasNext = true;
+      }
+    );
     onMounted(() => {
       getList();
     });

二進制
src/page-instrument/view-evaluat-report/component/share-top/image/shiyi-top.png


+ 1 - 1
src/page-instrument/view-evaluat-report/index.tsx

@@ -306,7 +306,7 @@ export default defineComponent({
           }
           stemEl?.classList.add(colorsClass[errType]);
           svgEl?.classList.add(colorsClass[errType]);
-          console.log(123456,'添加颜色',errType)
+          // console.log(123456,'添加颜色',errType)
           // 评测过的音符,需要给小节添加背景色
           // if (errType !== "NOT_PLAYED") {
           //   const staveNote = svgEl?.parentNode?.parentNode?.querySelector(".vf-stave");

+ 1 - 1
src/view/evaluating/index.tsx

@@ -83,7 +83,7 @@ export const evaluatingData = reactive({
 	/** 评测结果 */
 	resultData: {} as any,
 	/** 评测结果弹窗 */
-	resulstMode: true,
+	resulstMode: false,
 	/** 是否是完整评测 */
 	isComplete: false,
 	/**  */