wolyshaw 2 年之前
父節點
當前提交
30459eccae

+ 4 - 0
src/student/music/search/index.module.less

@@ -27,6 +27,9 @@
     padding-bottom: 10px;
     padding-bottom: 10px;
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
+    .content::-webkit-scrollbar {
+      display: none; /* Chrome Safari */
+    }
     .content {
     .content {
       flex: 1;
       flex: 1;
       overflow: hidden;
       overflow: hidden;
@@ -38,6 +41,7 @@
         font-size: 14px;
         font-size: 14px;
         padding: 4px 10px;
         padding: 4px 10px;
         margin-right: 5px;
         margin-right: 5px;
+        word-break: keep-all;
       }
       }
     }
     }
 
 

+ 5 - 5
src/student/music/search/index.tsx

@@ -2,16 +2,16 @@ import { Sticky, Cell, Tag, Icon, Popup, Tabs, Tab, Dialog } from 'vant'
 import { defineComponent, onMounted, ref } from 'vue'
 import { defineComponent, onMounted, ref } from 'vue'
 import Search from '@/components/col-search'
 import Search from '@/components/col-search'
 import { useLocalStorage } from '@vueuse/core'
 import { useLocalStorage } from '@vueuse/core'
-import AlbumItem from '../album/item'
+// import AlbumItem from '../album/item'
 import AlbumList from '../album'
 import AlbumList from '../album'
-import MusicItem from '../list/item'
+// import MusicItem from '../list/item'
 import MusicList from '../list'
 import MusicList from '../list'
 import styles from './index.module.less'
 import styles from './index.module.less'
 import classNames from 'classnames'
 import classNames from 'classnames'
-import request from '@/helpers/request'
+// import request from '@/helpers/request'
 import SelectTag from './select-tag'
 import SelectTag from './select-tag'
-import ColResult from '@/components/col-result'
-import { orderStatus } from '@/views/order-detail/orderStatus'
+// import ColResult from '@/components/col-result'
+// import { orderStatus } from '@/views/order-detail/orderStatus'
 import { useRouter } from 'vue-router'
 import { useRouter } from 'vue-router'
 import { getRandomKey, musicBuy } from '../music'
 import { getRandomKey, musicBuy } from '../music'
 
 

+ 30 - 21
src/student/music/songbook/album.tsx

@@ -1,5 +1,5 @@
 import { defineComponent } from 'vue'
 import { defineComponent } from 'vue'
-import { Image, Skeleton } from 'vant'
+import { Image, Skeleton, Cell } from 'vant'
 import request from '@/helpers/request'
 import request from '@/helpers/request'
 import { useAsyncState } from '@vueuse/core'
 import { useAsyncState } from '@vueuse/core'
 import styles from './index.module.less'
 import styles from './index.module.less'
@@ -19,27 +19,36 @@ export default defineComponent({
     return () => (
     return () => (
       <>
       <>
         {state.value && state.value.data.rows.length ? (
         {state.value && state.value.data.rows.length ? (
-          <div class={styles.albumContainer}>
-            {state.value.data.rows.map(item => (
-              <div
-                class={styles.album}
-                key={item.id}
-                onClick={() => router.push('/music-album-detail/' + item.id)}
-              >
-                <div class={styles.main}>
-                  <Image class={styles.img} src={item.albumCoverUrl} />
-                  <p class={styles.favorite}>
-                    <span>{item.albumFavoriteCount}</span>人收藏
-                  </p>
+          <>
+            <Cell
+              class={styles.title}
+              title="专辑"
+              is-link
+              to="/music-album"
+              value="更多"
+            />
+            <div class={styles.albumContainer}>
+              {state.value.data.rows.map(item => (
+                <div
+                  class={styles.album}
+                  key={item.id}
+                  onClick={() => router.push('/music-album-detail/' + item.id)}
+                >
+                  <div class={styles.main}>
+                    <Image class={styles.img} src={item.albumCoverUrl} />
+                    <p class={styles.favorite}>
+                      <span>{item.albumFavoriteCount}</span>人收藏
+                    </p>
+                  </div>
+                  <h4 class={classNames(styles.title, 'van-ellipsis')}>
+                    {item.albumName}
+                  </h4>
                 </div>
                 </div>
-                <h4 class={classNames(styles.title, 'van-ellipsis')}>
-                  {item.albumName}
-                </h4>
-              </div>
-            ))}
-          </div>
+              ))}
+            </div>
+          </>
         ) : null}
         ) : null}
-        {isLoading.value && (
+        {/* {isLoading.value && (
           <div style={{ display: 'flex' }}>
           <div style={{ display: 'flex' }}>
             {Array.from({ length: 4 }).map(() => (
             {Array.from({ length: 4 }).map(() => (
               <Skeleton
               <Skeleton
@@ -52,7 +61,7 @@ export default defineComponent({
               />
               />
             ))}
             ))}
           </div>
           </div>
-        )}
+        )} */}
       </>
       </>
     )
     )
   }
   }

+ 0 - 14
src/student/music/songbook/index.tsx

@@ -22,21 +22,7 @@ export default defineComponent({
         >
         >
           <Search disabled showAction />
           <Search disabled showAction />
         </Sticky>
         </Sticky>
-        <Cell
-          class={styles.title}
-          title="专辑"
-          is-link
-          to="/music-album"
-          value="更多"
-        />
         <Album />
         <Album />
-        <Cell
-          class={styles.title}
-          title="曲谱"
-          is-link
-          to="/music-list"
-          value="更多"
-        />
         <List />
         <List />
       </div>
       </div>
     )
     )

+ 32 - 18
src/student/music/songbook/list.tsx

@@ -1,11 +1,12 @@
 import { defineComponent } from 'vue'
 import { defineComponent } from 'vue'
-import { Image } from 'vant'
+import { Cell, Image } from 'vant'
 import request from '@/helpers/request'
 import request from '@/helpers/request'
 import { useAsyncState } from '@vueuse/core'
 import { useAsyncState } from '@vueuse/core'
 import Item from '../list/item'
 import Item from '../list/item'
 import styles from './index.module.less'
 import styles from './index.module.less'
 import { musicBuy } from '../music'
 import { musicBuy } from '../music'
 import { useRouter } from 'vue-router'
 import { useRouter } from 'vue-router'
+import ColResult from '@/components/col-result'
 
 
 export default defineComponent({
 export default defineComponent({
   name: 'Songbook',
   name: 'Songbook',
@@ -20,23 +21,36 @@ export default defineComponent({
 
 
     return () =>
     return () =>
       state.value && state.value.data.rows.length ? (
       state.value && state.value.data.rows.length ? (
-        <div class={styles.listContainer}>
-          {state.value.data.rows.map(item => (
-            <Item
-              data={item}
-              onClick={(item: any) => {
-                musicBuy(item, (path: any) => {
-                  router.push({
-                    path,
-                    query: {
-                      orderType: 'MUSIC'
-                    }
+        <>
+          <Cell
+            class={styles.title}
+            title="曲谱"
+            is-link
+            to="/music-list"
+            value="更多"
+          />
+          <div class={styles.listContainer}>
+            {state.value.data.rows.map(item => (
+              <Item
+                data={item}
+                onClick={(item: any) => {
+                  musicBuy(item, (path: any) => {
+                    router.push({
+                      path,
+                      query: {
+                        orderType: 'MUSIC'
+                      }
+                    })
                   })
                   })
-                })
-              }}
-            />
-          ))}
-        </div>
-      ) : null
+                }}
+              />
+            ))}
+          </div>
+        </>
+      ) : (
+        !isLoading.value && (
+          <ColResult tips="暂无曲谱" classImgSize="SMALL" btnStatus={false} />
+        )
+      )
   }
   }
 })
 })