浏览代码

提交一下

1
mo 2 年之前
父节点
当前提交
f1b49bc9db

+ 1 - 1
src/components/col-header/index.tsx

@@ -12,7 +12,7 @@ export default defineComponent({
       navigator: [
       navigator: [
         { name: '首页', href: '/home', current: false },
         { name: '首页', href: '/home', current: false },
         { name: '谱库', href: '/musicLibrary', current: false },
         { name: '谱库', href: '/musicLibrary', current: false },
-        { name: '视频课', href: '#', current: false },
+        { name: '视频课', href: '/videoDetailList', current: false },
         { name: '云教练', href: '#', current: false },
         { name: '云教练', href: '#', current: false },
         { name: '社区', href: '#', current: false },
         { name: '社区', href: '#', current: false },
         { name: '下载', href: '/downLoad', current: false }
         { name: '下载', href: '/downLoad', current: false }

+ 11 - 4
src/views/musicLibrary/index.tsx

@@ -16,6 +16,7 @@ import 'swiper/css'
 import 'swiper/css/navigation'
 import 'swiper/css/navigation'
 import 'swiper/css/pagination'
 import 'swiper/css/pagination'
 import 'swiper/css/scrollbar'
 import 'swiper/css/scrollbar'
+import { useRoute,useRouter } from 'vue-router'
 export default defineComponent({
 export default defineComponent({
   name: 'musicLibrary',
   name: 'musicLibrary',
   components: {
   components: {
@@ -34,6 +35,7 @@ export default defineComponent({
       albumList: [],
       albumList: [],
       musicList: []
       musicList: []
     })
     })
+    const router = useRouter()
     const getAlbumList = async () => {
     const getAlbumList = async () => {
       try {
       try {
         const res = await request.post('/api-website/open/music/album/list', {
         const res = await request.post('/api-website/open/music/album/list', {
@@ -65,7 +67,12 @@ export default defineComponent({
         console.log(e)
         console.log(e)
       }
       }
     }
     }
-
+    const gotoSearch = (val:string)=>{
+      router.push({path:'/searchdetail',query:{search:val}})
+    }
+    const gotoMusic=()=>{
+      router.push({path:'/searchdetail',query:{type:'music'}})
+    }
     onMounted(() => {
     onMounted(() => {
       getAlbumList()
       getAlbumList()
       getMusicList()
       getMusicList()
@@ -81,8 +88,8 @@ export default defineComponent({
                 <h4>热门专辑</h4>
                 <h4>热门专辑</h4>
                 <img src={titleDot} class={styles.dotImg} alt="" />
                 <img src={titleDot} class={styles.dotImg} alt="" />
               </div> */}
               </div> */}
-              <searchInput></searchInput>
-              <hotSearch type={'search'}></hotSearch>
+              <searchInput isWhile={false}></searchInput>
+              <hotSearch onHotTag={(val:string)=>{gotoSearch(val)}} type={''}></hotSearch>
               <h5 class={styles.hotAlbum}>热门专辑</h5>
               <h5 class={styles.hotAlbum}>热门专辑</h5>
               <div class={styles.albumList}>
               <div class={styles.albumList}>
                 {state.albumList.map(item => {
                 {state.albumList.map(item => {
@@ -97,7 +104,7 @@ export default defineComponent({
             <div class={styles.section}>
             <div class={styles.section}>
               <div class={styles.videoNav}>
               <div class={styles.videoNav}>
                 <h5>热门乐谱</h5>
                 <h5>热门乐谱</h5>
-                <div class={styles.wrapRight}>
+                <div class={styles.wrapRight} onClick={()=>gotoMusic()}>
                   <span>更多</span>
                   <span>更多</span>
                   <img class={styles.arrow} src={arrow} alt="" />
                   <img class={styles.arrow} src={arrow} alt="" />
                 </div>
                 </div>

+ 10 - 2
src/views/musicLibrary/searchdetail.tsx

@@ -1,5 +1,5 @@
 // import { PaperClipIcon } from '@heroicons/vue/solid'
 // import { PaperClipIcon } from '@heroicons/vue/solid'
-import { defineComponent, toRefs, reactive, onMounted, ref } from 'vue'
+import { defineComponent, toRefs, reactive, onMounted, ref ,nextTick} from 'vue'
 import arrow from '@/components/musicLIstItem/images/arrow.png'
 import arrow from '@/components/musicLIstItem/images/arrow.png'
 import styles from './index.module.less'
 import styles from './index.module.less'
 import hotSearch from '@/components/hotSearch'
 import hotSearch from '@/components/hotSearch'
@@ -14,6 +14,7 @@ import 'swiper/css/pagination'
 import 'swiper/css/scrollbar'
 import 'swiper/css/scrollbar'
 import { ElTabPane, ElTabs } from 'element-plus'
 import { ElTabPane, ElTabs } from 'element-plus'
 import { useRoute } from 'vue-router'
 import { useRoute } from 'vue-router'
+
 export default defineComponent({
 export default defineComponent({
   name: 'searchdetail',
   name: 'searchdetail',
   components: {
   components: {
@@ -89,7 +90,14 @@ export default defineComponent({
       if(route.query.search){
       if(route.query.search){
         state.searchs.search = route.query.search as string
         state.searchs.search = route.query.search as string
       }
       }
-      search()
+      if(route.query.type){
+        state.chiose = route.query.type as string
+      }
+      console.log( state.chiose,'chiose')
+      nextTick(()=>{
+        search()
+      })
+
       // getAlbumList()
       // getAlbumList()
       // getMusicList()
       // getMusicList()
     })
     })

+ 14 - 2
src/views/videoDetailList/index.tsx

@@ -25,6 +25,8 @@ export default defineComponent({
     const state = reactive({
     const state = reactive({
       title: props.title,
       title: props.title,
       videoList: [],
       videoList: [],
+      searchs:{search:'',lessonSubject:''},
+
       pageInfo: {
       pageInfo: {
         // 分页规则
         // 分页规则
         limit: 9, // 限制显示条数
         limit: 9, // 限制显示条数
@@ -40,6 +42,7 @@ export default defineComponent({
           '/api-website/open/videoLessonGroup/page',
           '/api-website/open/videoLessonGroup/page',
           {
           {
             data: {
             data: {
+              ...state.searchs,
               albumStatus: 'PASS',
               albumStatus: 'PASS',
               page: state.pageInfo.page,
               page: state.pageInfo.page,
               rows: state.pageInfo.limit
               rows: state.pageInfo.limit
@@ -52,6 +55,15 @@ export default defineComponent({
         console.log(e)
         console.log(e)
       }
       }
     }
     }
+
+    const gotoSearch = (val:string)=>{
+      state.searchs.search = val;
+    }
+    const startSearch = (val:any)=>{
+
+      state.searchs = {...state.searchs,lessonSubject:val.subject,search:val.search}
+      getVideoList()
+    }
     onMounted(() => {
     onMounted(() => {
       getVideoList()
       getVideoList()
     })
     })
@@ -61,8 +73,8 @@ export default defineComponent({
           <div class="wall" style={{ height: '70px' }}></div>
           <div class="wall" style={{ height: '70px' }}></div>
           <div class={styles.w1200}>
           <div class={styles.w1200}>
             <div class={styles.section}>
             <div class={styles.section}>
-              <searchInput isWhile={true}></searchInput>
-              <hotSearch type={'search'}></hotSearch>
+              <searchInput isWhile={true} searchVal={state.searchs.search} onStartSearch={(val:any)=>{startSearch(val)}}></searchInput>
+              <hotSearch   onHotTag={(val:string)=>{gotoSearch(val)}} type={''}></hotSearch>
             </div>
             </div>
             <div class={styles.videoList}>
             <div class={styles.videoList}>
               {state.videoList.map(item => {
               {state.videoList.map(item => {

+ 1 - 101
yarn.lock

@@ -2323,106 +2323,11 @@
   "resolved" "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz"
   "resolved" "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz"
   "version" "0.9.3"
   "version" "0.9.3"
 
 
-"esbuild-android-64@0.14.43":
-  "integrity" "sha512-kqFXAS72K6cNrB6RiM7YJ5lNvmWRDSlpi7ZuRZ1hu1S3w0zlwcoCxWAyM23LQUyZSs1PbjHgdbbfYAN8IGh6xg=="
-  "resolved" "https://registry.npmjs.org/esbuild-android-64/-/esbuild-android-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-android-arm64@0.14.43":
-  "integrity" "sha512-bKS2BBFh+7XZY9rpjiHGRNA7LvWYbZWP87pLehggTG7tTaCDvj8qQGOU/OZSjCSKDYbgY7Q+oDw8RlYQ2Jt2BA=="
-  "resolved" "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-darwin-64@0.14.43":
-  "integrity" "sha512-/3PSilx011ttoieRGkSZ0XV8zjBf2C9enV4ScMMbCT4dpx0mFhMOpFnCHkOK0pWGB8LklykFyHrWk2z6DENVUg=="
-  "resolved" "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-darwin-arm64@0.14.43":
-  "integrity" "sha512-1HyFUKs8DMCBOvw1Qxpr5Vv/ThNcVIFb5xgXWK3pyT40WPvgYIiRTwJCvNs4l8i5qWF8/CK5bQxJVDjQvtv0Yw=="
-  "resolved" "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-freebsd-64@0.14.43":
-  "integrity" "sha512-FNWc05TPHYgaXjbPZO5/rJKSBslfG6BeMSs8GhwnqAKP56eEhvmzwnIz1QcC9cRVyO+IKqWNfmHFkCa1WJTULA=="
-  "resolved" "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-freebsd-arm64@0.14.43":
-  "integrity" "sha512-amrYopclz3VohqisOPR6hA3GOWA3LZC1WDLnp21RhNmoERmJ/vLnOpnrG2P/Zao+/erKTCUqmrCIPVtj58DRoA=="
-  "resolved" "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-32@0.14.43":
-  "integrity" "sha512-KoxoEra+9O3AKVvgDFvDkiuddCds6q71owSQEYwjtqRV7RwbPzKxJa6+uyzUulHcyGVq0g15K0oKG5CFBcvYDw=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-64@0.14.43":
-  "integrity" "sha512-EwINwGMyiJMgBby5/SbMqKcUhS5AYAZ2CpEBzSowsJPNBJEdhkCTtEjk757TN/wxgbu3QklqDM6KghY660QCUw=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-arm@0.14.43":
-  "integrity" "sha512-e6YzQUoDxxtyamuF12eVzzRC7bbEFSZohJ6igQB9tBqnNmIQY3fI6Cns3z2wxtbZ3f2o6idkD2fQnlvs2902Dg=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-arm64@0.14.43":
-  "integrity" "sha512-UlSpjMWllAc70zYbHxWuDS3FJytyuR/gHJYBr8BICcTNb/TSOYVBg6U7b3jZ3mILTrgzwJUHwhEwK18FZDouUQ=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-mips64le@0.14.43":
-  "integrity" "sha512-f+v8cInPEL1/SDP//CfSYzcDNgE4CY3xgDV81DWm3KAPWzhvxARrKxB1Pstf5mB56yAslJDxu7ryBUPX207EZA=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-ppc64le@0.14.43":
-  "integrity" "sha512-5wZYMDGAL/K2pqkdIsW+I4IR41kyfHr/QshJcNpUfK3RjB3VQcPWOaZmc+74rm4ZjVirYrtz+jWw0SgxtxRanA=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-riscv64@0.14.43":
-  "integrity" "sha512-lYcAOUxp85hC7lSjycJUVSmj4/9oEfSyXjb/ua9bNl8afonaduuqtw7hvKMoKuYnVwOCDw4RSfKpcnIRDWq+Bw=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-linux-s390x@0.14.43":
-  "integrity" "sha512-27e43ZhHvhFE4nM7HqtUbMRu37I/4eNSUbb8FGZWszV+uLzMIsHDwLoBiJmw7G9N+hrehNPeQ4F5Ujad0DrUKQ=="
-  "resolved" "https://registry.npmjs.org/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-netbsd-64@0.14.43":
-  "integrity" "sha512-2mH4QF6hHBn5zzAfxEI/2eBC0mspVsZ6UVo821LpAJKMvLJPBk3XJO5xwg7paDqSqpl7p6IRrAenW999AEfJhQ=="
-  "resolved" "https://registry.npmjs.org/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-openbsd-64@0.14.43":
-  "integrity" "sha512-ZhQpiZjvqCqO8jKdGp9+8k9E/EHSA+zIWOg+grwZasI9RoblqJ1QiZqqi7jfd6ZrrG1UFBNGe4m0NFxCFbMVbg=="
-  "resolved" "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-sunos-64@0.14.43":
-  "integrity" "sha512-DgxSi9DaHReL9gYuul2rrQCAapgnCJkh3LSHPKsY26zytYppG0HgkgVF80zjIlvEsUbGBP/GHQzBtrezj/Zq1Q=="
-  "resolved" "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.14.43.tgz"
-  "version" "0.14.43"
-
-"esbuild-windows-32@0.14.43":
-  "integrity" "sha512-Ih3+2O5oExiqm0mY6YYE5dR0o8+AspccQ3vIAtRodwFvhuyGLjb0Hbmzun/F3Lw19nuhPMu3sW2fqIJ5xBxByw=="
-  "resolved" "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.14.43.tgz"
-  "version" "0.14.43"
-
 "esbuild-windows-64@0.14.43":
 "esbuild-windows-64@0.14.43":
   "integrity" "sha512-8NsuNfI8xwFuJbrCuI+aBqNTYkrWErejFO5aYM+yHqyHuL8mmepLS9EPzAzk8rvfaJrhN0+RvKWAcymViHOKEw=="
   "integrity" "sha512-8NsuNfI8xwFuJbrCuI+aBqNTYkrWErejFO5aYM+yHqyHuL8mmepLS9EPzAzk8rvfaJrhN0+RvKWAcymViHOKEw=="
   "resolved" "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.43.tgz"
   "resolved" "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.14.43.tgz"
   "version" "0.14.43"
   "version" "0.14.43"
 
 
-"esbuild-windows-arm64@0.14.43":
-  "integrity" "sha512-7ZlD7bo++kVRblJEoG+cepljkfP8bfuTPz5fIXzptwnPaFwGS6ahvfoYzY7WCf5v/1nX2X02HDraVItTgbHnKw=="
-  "resolved" "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.43.tgz"
-  "version" "0.14.43"
-
 "esbuild@^0.14.27":
 "esbuild@^0.14.27":
   "integrity" "sha512-Uf94+kQmy/5jsFwKWiQB4hfo/RkM9Dh7b79p8yqd1tshULdr25G2szLz631NoH3s2ujnKEKVD16RmOxvCNKRFA=="
   "integrity" "sha512-Uf94+kQmy/5jsFwKWiQB4hfo/RkM9Dh7b79p8yqd1tshULdr25G2szLz631NoH3s2ujnKEKVD16RmOxvCNKRFA=="
   "resolved" "https://registry.npmjs.org/esbuild/-/esbuild-0.14.43.tgz"
   "resolved" "https://registry.npmjs.org/esbuild/-/esbuild-0.14.43.tgz"
@@ -2813,11 +2718,6 @@
   "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
   "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
   "version" "1.0.0"
   "version" "1.0.0"
 
 
-"fsevents@~2.3.2":
-  "integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="
-  "resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
-  "version" "2.3.2"
-
 "function-bind@^1.1.1":
 "function-bind@^1.1.1":
   "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
   "integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
   "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
   "resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
@@ -5290,7 +5190,7 @@
     "@volar/shared" "0.29.8"
     "@volar/shared" "0.29.8"
     "vscode-vue-languageservice" "0.29.8"
     "vscode-vue-languageservice" "0.29.8"
 
 
-"vue@^3.2.26":
+"vue@^3.0.0", "vue@^3.2.26":
   "integrity" "sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ=="
   "integrity" "sha512-bOKEZxrm8Eh+fveCqS1/NkG/n6aMidsI6hahas7pa0w/l7jkbssJVsRhVDs07IdDq7h9KHswZOgItnwJAgtVtQ=="
   "resolved" "https://registry.npmjs.org/vue/-/vue-3.2.37.tgz"
   "resolved" "https://registry.npmjs.org/vue/-/vue-3.2.37.tgz"
   "version" "3.2.37"
   "version" "3.2.37"