mo пре 3 година
родитељ
комит
7440e84c56

+ 31 - 5
src/components/col-header/modals/index.module.less

@@ -23,6 +23,34 @@
   width: 250px;
 
   overflow: hidden;
+  .dropdownWrapUser {
+    position: relative;
+    .userInfoWrap {
+      z-index: 100;
+      left: 16px;
+      top: 15px;
+      position: absolute;
+      min-height: 60px;
+      line-height: 60px;
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      .title {
+        font-size: 16px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #ffffff;
+      }
+      .userHeader {
+        width: 44px;
+        height: 44px;
+        margin-right: 9px;
+        margin-left: 0;
+        border-radius: 50%;
+        overflow: hidden;
+      }
+    }
+  }
   img {
     width: 100%;
     position: relative;
@@ -52,17 +80,15 @@
       color: #666666;
       line-height: 28px;
     }
-
   }
-
 }
 :global {
   .el-dropdown__popper.el-popper {
     border: none !important;
     border-radius: 10px 10px;
   }
-  .el-dropdown-menu__item{
-    line-height: 42px!important;
+  .el-dropdown-menu__item {
+    line-height: 42px !important;
     img {
       width: 16px;
       height: 16px;
@@ -72,7 +98,7 @@
 
   .backWrap {
     width: 100%;
-    border-top: 1px solid #F2F2F2;
+    border-top: 1px solid #f2f2f2;
     display: flex;
     flex-direction: row;
     align-items: center;

+ 23 - 8
src/components/col-header/modals/loganInfo.tsx

@@ -73,13 +73,11 @@ export default defineComponent({
       })
     }
     const logout = async () => {
-      try{
-        const res = await request.get('/api-auth/exit', {
-
-        })
+      try {
+        const res = await request.get('/api-auth/exit', {})
         router.push({ path: '/' })
         window.location.reload()
-      }catch(e){
+      } catch (e) {
         console.log(e)
       }
     }
@@ -106,13 +104,28 @@ export default defineComponent({
     return (
       <>
         <ElDropdown
-          onCommand={val => this.changeState(val)}
 
+          onCommand={val => this.changeState(val)}
           v-slots={{
             dropdown: () => (
               <>
                 <div class={classes.dropdownWrap}>
-                  <img src={userBanner} alt="" />
+                  <div class={classes.dropdownWrapUser}>
+                    <div class={classes.userInfoWrap}>
+                      <img
+                        src={
+                          this.user.heardUrl
+                            ? this.user.heardUrl
+                            : teacherHeader
+                        }
+                        class={classes.userHeader}
+                        alt=""
+                      />
+                      <p class={classes.title}>{this.user.username}</p>
+                    </div>
+                    <img src={userBanner} alt="" />
+                  </div>
+
                   {this.userType == 'TEACHER' ? (
                     <div class={classes.dropdownInfo}>
                       <div class={classes.dropdownItem}>
@@ -122,7 +135,9 @@ export default defineComponent({
                         <p class={classes.dropdownItemsubTitle}>粉丝</p>
                       </div>
                       <div class={classes.dropdownItem}>
-                        <p class={classes.dropdownItemTitle}>{this.user.musicSheetNum || 0}</p>
+                        <p class={classes.dropdownItemTitle}>
+                          {this.user.musicSheetNum || 0}
+                        </p>
                         <p class={classes.dropdownItemsubTitle}>乐谱</p>
                       </div>
                       {/* <div class={classes.dropdownItem}>

+ 8 - 6
src/components/hotSearch/index.tsx

@@ -17,6 +17,10 @@ export default defineComponent({
     type: {
       type: String,
       default: 'more'
+    },
+    searchType:{
+      type: String,
+      default: 'MUSIC'
     }
   },
   setup(props,conent) {
@@ -27,16 +31,14 @@ export default defineComponent({
       tagTree: [],
       chioseTagList: [],
       chioseParentList: [],
-      searchTagList: []
+      searchTagList: [],
+      searchType:props.searchType
     })
     const router = useRouter()
     const getHotList = async () => {
       try {
-        const res = await request.get('/api-website/open/music/sheet/hotTag', {
-          params: {
-            status: 1
-          }
-        })
+        const res = await request.get(`/api-website/open/music/sheet/hotTag/${state.searchType}`
+        )
 
         state.hotList = res.data
       } catch (e) {

+ 1 - 1
src/views/home/index.tsx

@@ -87,7 +87,7 @@ export default defineComponent({
                 <h4>热门专辑</h4>
                 <img src={titleDot} class={styles.dotImg} alt="" />
               </div>
-              <hotSearch onHotTag={(val:string)=>{gotoSearch(val)}}></hotSearch>
+              <hotSearch searchType='MUSIC' onHotTag={(val:string)=>{gotoSearch(val)}}></hotSearch>
               <div class={styles.albumList}>
                 {state.albumList.map(item => {
                   return  <albumItem detail={item} ></albumItem>

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

@@ -61,7 +61,7 @@ export default defineComponent({
       state.searchs.search = val
     }
     const startSearch = (val: any) => {
-      console.log(val,'valstartSearch')
+      console.log(val, 'valstartSearch')
       state.searchs = {
         ...state.searchs,
         lessonSubject: val.subject,
@@ -86,6 +86,7 @@ export default defineComponent({
                 }}
               ></searchInput>
               <hotSearch
+                searchType="COURSE"
                 onHotTag={(val: string) => {
                   gotoSearch(val)
                 }}