lex-xin 6 months ago
parent
commit
a0b22a2e1b
3 changed files with 32 additions and 17 deletions
  1. 9 1
      src/views/hot-music-more/index.module.less
  2. 22 15
      src/views/hot-music-more/index.tsx
  3. 1 1
      vite.config.ts

+ 9 - 1
src/views/hot-music-more/index.module.less

@@ -67,14 +67,18 @@
     .moreIcon {
       display: flex;
       align-items: center;
+      position: relative;
       span {
-        padding-right: 4px;
+        // padding-right: 4px;
       }
     }
 
     .iconArrow {
       width: 9px;
       height: 5px;
+      position: absolute;
+      right: -13px;
+      margin-left: 4px;
     }
     .iconArrowActive {
       transform: rotate(180deg);
@@ -96,6 +100,10 @@
       .van-tab--shrink {
         padding: 0 21px;
         z-index: 9;
+
+        &:first-child {
+          padding-right: 30px;
+        }
       }
     }
   }

+ 22 - 15
src/views/hot-music-more/index.tsx

@@ -119,6 +119,7 @@ export default defineComponent({
       musicDetailPopup: false,
       showVip: false,
       tabActive: '1',
+      newTags: [] as any,
       musicTagList: [] as any,
       gradeList: [] as any,
       musicCategory: [] as any,
@@ -253,6 +254,25 @@ export default defineComponent({
       }
     };
 
+    
+    const getTags = async () => {
+      try {
+        const res = await request.get('/edu-app/musicSheetTag/queryList')
+        const result = res.data || []
+        state.newTags = [{
+            text: '全部',
+            value: ''
+        }, ...result.map((item: any) => {
+          return {
+            text: item.name,
+            value: item.id
+          }
+        })]
+      } catch {
+        // 
+      }
+    }
+
     const onDetail = (item: any) => {
       // const src = `${vaildMusicScoreUrl()}/instrument/?id=${
       //   item?.id
@@ -285,18 +305,6 @@ export default defineComponent({
           ...result
         ];
         data.tagActiveId = data.tags[0].id;
-        // result.forEach((item: any) => {
-        //   if (item.children && item.children.length > 0) {
-        //     item.children.forEach((child: any) => {
-        //       child.children = child.categoriesList || [];
-        //     });
-        //   }
-        // });
-        // state.musicTagList = result;
-        // if (result.length > 0) {
-        //   musicForms.bookVersionId = result[0].id;
-        //   onChangeSearch('version', result[0].children);
-        // }
       } catch {
         //
       }
@@ -392,6 +400,8 @@ export default defineComponent({
       state.audioPlayTypeList = [{ name: '全部', id: '' }, ...tempAudio];
 
       state.loading = true;
+
+      await getTags()
       // await getSubjecList();
       // await getMusicSheetCategories();
       await getMusicTagTree();
@@ -424,9 +434,6 @@ export default defineComponent({
                       'van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow',
                       styles.leftArrow
                     ]}></i>
-                  {/* <span class={styles.title}>
-                    <i></i>
-                  </span> */}
                   <Tabs class={styles.tabSection} v-model:active={state.tabActive} shrink  onClickTab={() => {
                       console.log(state.tabActive)
 

+ 1 - 1
vite.config.ts

@@ -16,7 +16,7 @@ function resolve(dir: string) {
 // const proxyUrl = 'https://test.lexiaoya.cn/';
 // const proxyUrl = 'https://kt.colexiu.com/';
 // const proxyUrl = 'http://192.168.3.143:7093/';
-const proxyUrl = 'https://test.kt.colexiu.com/';
+const proxyUrl = 'https://dev.kt.colexiu.com/';
 export default defineConfig({
   base: './',
   plugins: [