lex 7 months ago
parent
commit
b56326525c

+ 2 - 1
src/tenant/music/courseList/index.module.less

@@ -171,6 +171,7 @@
       width: 20px;
       height: 20px;
       padding-bottom: 2px;
+      padding-right: 2px;
     }
   }
 
@@ -359,4 +360,4 @@
       }
     }
   }
-}
+}

+ 28 - 5
src/tenant/music/lessonCourseware/index.module.less

@@ -25,22 +25,31 @@
       }
     }
 
+
+    .van-search {
+      padding-bottom: 0;
+      align-items: flex-start;
+    }
+
     .van-dropdown-menu__bar {
       background-color: transparent;
       box-shadow: none;
       padding-right: 15px;
+      padding-bottom: 10px;
       height: 36px;
     }
 
     .van-dropdown-menu__title {
       padding-left: 0;
       color: #131415;
+
       &:after {
-        border-color: transparent transparent rgba(0, 0, 0, 0.4)
-          rgba(0, 0, 0, 0.4);
+        border-color: transparent transparent rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);
       }
+
       &.van-dropdown-menu__title--active {
         color: #fe2451;
+
         &:after {
           border-color: transparent transparent #fe2451 #fe2451;
         }
@@ -48,8 +57,7 @@
     }
 
     .van-dropdown-menu__title:after {
-      border-color: transparent transparent rgba(0, 0, 0, 0.4)
-        rgba(0, 0, 0, 0.4);
+      border-color: transparent transparent rgba(0, 0, 0, 0.4) rgba(0, 0, 0, 0.4);
     }
 
     .van-dropdown-item__content {
@@ -60,45 +68,54 @@
       opacity: 1 !important;
     }
   }
+
   .dropdownMenuSub {
     :global {
       .van-popup {
         box-sizing: border-box;
         padding: 12px;
       }
+
       .van-cell {
         padding: 0;
         height: 50px;
         line-height: 50px;
         color: #333333;
+
         &:after {
           display: none;
         }
+
         &.van-dropdown-item__option--active {
           background-color: rgba(254, 36, 81, 0.08);
           border-radius: 10px;
           color: #fe2451;
+
           .van-cell__title {
             font-weight: 600;
           }
         }
+
         .van-cell__title {
           font-weight: 400;
           font-size: 16px;
           text-align: center;
         }
+
         .van-cell__value {
           display: none;
         }
       }
     }
   }
+
   .titleActive {
     :global(.van-ellipsis) {
       max-width: 62px;
     }
   }
 }
+
 .search {
   :global {
     .van-search {
@@ -106,6 +123,7 @@
     }
   }
 }
+
 .bgImg {
   position: fixed;
   top: 0;
@@ -118,25 +136,30 @@
 
 .alumnList {
   min-height: 40vh;
+
   :global {
     .van-list__loading {
       display: none;
     }
   }
+
   .courseItem {
     background: initial;
     border: initial;
     padding: 0 4px 20px;
+
     :global {
       .courseItem:nth-child(1) {
         margin-top: 6px !important;
       }
+
       .courseItem:nth-child(2) {
         margin-top: 6px !important;
       }
+
       .courseItem:nth-child(3) {
         margin-top: 6px !important;
       }
     }
   }
-}
+}

+ 12 - 4
src/tenant/music/train-tool/index.tsx

@@ -61,6 +61,7 @@ export default defineComponent({
     const background = ref<string>('rgba(55, 205, 177, 0)')
     const color = ref<string>('#fff')
     const state = reactive({
+      userId: '',
       details: {} as any,
       buy: route.query.buy as any,
       albumId: route.query.albumId || null,
@@ -266,7 +267,11 @@ export default defineComponent({
     /** 设置声部 */
     const operatoinCatchSubjectInfo = (
       type: 'set' | 'get',
-      params?: { defaultSubject: string; defaultSubjectName: string }
+      params?: {
+        defaultSubject: string
+        defaultSubjectName: string
+        userId: string | number
+      }
     ) => {
       if (type === 'set') {
         localStorage.setItem(
@@ -292,8 +297,9 @@ export default defineComponent({
       // 老师端默认查询声部
       if (baseState.platformType === 'TEACHER') {
         const users = baseState.user.data
+        state.userId = users.userId
         const catchSubject = operatoinCatchSubjectInfo('get')
-        if (catchSubject) {
+        if (catchSubject && users.userId === catchSubject.userId) {
           state.teacherSubjectId = catchSubject.defaultSubject || null
           state.teacherSubjectName = catchSubject.defaultSubjectName || null
         } else {
@@ -303,7 +309,8 @@ export default defineComponent({
 
         operatoinCatchSubjectInfo('set', {
           defaultSubject: state.teacherSubjectId,
-          defaultSubjectName: state.teacherSubjectName
+          defaultSubjectName: state.teacherSubjectName,
+          userId: state.userId
         })
       }
 
@@ -773,7 +780,8 @@ export default defineComponent({
 
               operatoinCatchSubjectInfo('set', {
                 defaultSubject: state.teacherSubjectId,
-                defaultSubjectName: state.teacherSubjectName
+                defaultSubjectName: state.teacherSubjectName,
+                userId: state.userId
               })
             }}
           ></Picker>