Browse Source

修改样式

lex-xin 9 months ago
parent
commit
b09a68f3e7
2 changed files with 35 additions and 11 deletions
  1. 12 0
      src/tenant/music/train-tool/index.module.less
  2. 23 11
      src/tenant/music/train-tool/index.tsx

+ 12 - 0
src/tenant/music/train-tool/index.module.less

@@ -582,6 +582,13 @@
     line-height: 22px;
   }
 }
+.resetting {
+  color: #FE2451 !important;
+  border-color: #FE2451 !important;
+  &::before {
+    border-color: #FE2451 !important;
+  }
+}
 
 .radio-group {
   display: flex;
@@ -626,6 +633,11 @@
 
     .van-tag--primary {
       background: #fff3f5;
+      border-color: #FE2451 !important;
+      color: #FE2451 !important;
+      &::before {
+        border-color: #FE2451 !important;
+      }
     }
   }
 }

+ 23 - 11
src/tenant/music/train-tool/index.tsx

@@ -113,13 +113,13 @@ export default defineComponent({
     })
     const searchRef = ref()
     const params = reactive({
-      keyword: null as any,
+      keyword: toolSubject?.keyword || null as any,
       // subjectType: '',
-      subjectId: null,
+      subjectId: toolSubject?.subjectId ||null,
       // albumId: route.query.albumId,
       // albumName: '',
-      level: '',
-      type: '',
+      level: toolSubject?.level ||'',
+      type: toolSubject?.type ||'',
       courseTypeCode: '',
       // title: '',
       page: 1,
@@ -416,7 +416,6 @@ export default defineComponent({
       state.loadingAlbum = false
       state.loading = false
 
-      console.log(state.activeTab, 'activeTab')
       // 为了处理 swiper 会不显示的问题
       document.body.scrollIntoView()
       window.scrollTo(1, 0)
@@ -499,7 +498,11 @@ export default defineComponent({
           tenantGroupAlbumId:
             baseState.platformType === 'STUDENT'
               ? state.details.tenantGroupAlbumId
-              : state.details.id // 老师用专辑id当唯一值
+              : state.details.id, // 老师用专辑id当唯一值
+          level: params.level,
+          type: params.type,
+          subjectId: params.type,
+          keyword: params.keyword
         })
       )
       router.push({
@@ -756,6 +759,7 @@ export default defineComponent({
                     )}
                   </Tabs>
                   <Search
+                    modelValue={params.keyword}
                     placeholder={
                       state.activeTab === 'COURSEWARE'
                         ? '请输入教材关键词'
@@ -989,7 +993,11 @@ export default defineComponent({
                                 tenantGroupAlbumId:
                                   baseState.platformType === 'STUDENT'
                                     ? state.details.tenantGroupAlbumId
-                                    : state.details.id // 老师用专辑id当唯一值
+                                    : state.details.id, // 老师用专辑id当唯一值
+                                level: params.level,
+                                type: params.type,
+                                subjectId: params.type,
+                                keyword: params.keyword
                               })
                             )
                             router.push({
@@ -1015,7 +1023,11 @@ export default defineComponent({
                                 tenantGroupAlbumId:
                                   baseState.platformType === 'STUDENT'
                                     ? state.details.tenantGroupAlbumId
-                                    : state.details.id // 老师用专辑id当唯一值
+                                    : state.details.id, // 老师用专辑id当唯一值
+                                level: params.level,
+                                type: params.type,
+                                subjectId: params.type,
+                                keyword: params.keyword
                               })
                             )
                             router.push({
@@ -1094,14 +1106,14 @@ export default defineComponent({
                 MUSIC: {},
                 ENSEMBLE: {}
               }
-              activeTypeParams()
-
-              
               state.teacherSubjectId = val.id
               state.teacherSubjectName = val.name
               params.page = 1
               state.finished = false
               state.list = []
+
+              activeTypeParams()
+
               FetchList()
               state.subjectStatus = false