Browse Source

Merge branch 'iteration_1.3.3' into dev

lex 2 years ago
parent
commit
1eb7f246c7

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

@@ -144,7 +144,7 @@ export default defineComponent({
   },
   render() {
     return (
-      <div class={[styles.colUpload, 'w-full']}>
+      <div class={[styles.colUpload, 'w-full']} style={{ lineHeight: 0 }}>
         <ElUpload
           disabled={this.disabled}
           showFileList={false}

+ 3 - 7
src/components/musicLIstItem/index.tsx

@@ -59,7 +59,7 @@ export default defineComponent({
     }
     return () => (
       <div
-      class={classes.itemWrapAll}
+        class={classes.itemWrapAll}
         onClick={() => {
           props.onClick(state.item)
         }}
@@ -74,7 +74,7 @@ export default defineComponent({
           <div class={classes.leftWrap}>
             <div class={classes.left}>
               <div class={classes.imgWrap}>
-                <img src={music} alt="" />
+                <img src={state.item.titleImg || music} alt="" />
               </div>
               <div class={classes.textWrap}>
                 <p class={classes.musicName}>{state.item.musicSheetName}</p>
@@ -97,10 +97,7 @@ export default defineComponent({
             </div>
           </div>
           <div class={classes.right}>
-            <div
-
-              class={[classes.touchButtonO]}
-            >
+            <div class={[classes.touchButtonO]}>
               {state.item.hoverTop ? (
                 <div
                   class={[
@@ -109,7 +106,6 @@ export default defineComponent({
                   ]}
                 >
                   <p>查看详情</p>
-
                 </div>
               ) : (
                 <div

+ 28 - 30
src/views/albumDetail/modals/musicLIstItem/index.tsx

@@ -17,6 +17,7 @@ type Props = {
   addName: String
   addUserAvatar: String
   musicSheetName: String
+  titleImg: String
   subjectNames: String
   composer: String
   chargeType: String
@@ -60,7 +61,7 @@ export default defineComponent({
     }
     return () => (
       <div
-      class={classes.itemAllWrap}
+        class={classes.itemAllWrap}
         onClick={() => {
           props.onClick(state.item)
         }}
@@ -75,7 +76,7 @@ export default defineComponent({
           <div class={classes.leftWrap}>
             <div class={classes.left}>
               <div class={classes.imgWrap}>
-                <img src={music} alt="" />
+                <img src={state.item.titleImg || music} alt="" />
               </div>
               <div class={classes.textWrap}>
                 <p class={classes.musicName}>{state.item.musicSheetName}</p>
@@ -84,37 +85,34 @@ export default defineComponent({
                   <img src={state.item.favorite ? lineStart : start} alt="" />
                   <span>{state.item.favoriteCount | 0} 收藏</span>
                 </div>
-                <div
-
-                class={[classes.touchButtonO]}
-              >
-                {state.item.hoverTop ? (
-                  <div
-                    class={[
-                      classes.touchButton,
-                      classes[state.item.chargeType?.toLocaleLowerCase()]
-                    ]}
-                  >
-                    <p>查看</p>
-                  </div>
-                ) : (
-                  <div
-                    class={[
-                      classes.touchButton,
-                      classes[state.item.chargeType?.toLocaleLowerCase()]
-                    ]}
-                  >
-                    {/* <div class={classes.touchButtonWrap}>
+                <div class={[classes.touchButtonO]}>
+                  {state.item.hoverTop ? (
+                    <div
+                      class={[
+                        classes.touchButton,
+                        classes[state.item.chargeType?.toLocaleLowerCase()]
+                      ]}
+                    >
+                      <p>查看</p>
+                    </div>
+                  ) : (
+                    <div
+                      class={[
+                        classes.touchButton,
+                        classes[state.item.chargeType?.toLocaleLowerCase()]
+                      ]}
+                    >
+                      {/* <div class={classes.touchButtonWrap}>
                     <img src={chargeImg[state.item.chargeType]} alt="" />
                   </div> */}
-                    <div class={classes.touchButtonText}>
-                      {chargeTypes[state.item.chargeType]
-                        ? chargeTypes[state.item.chargeType]
-                        : '点播'}
+                      <div class={classes.touchButtonText}>
+                        {chargeTypes[state.item.chargeType]
+                          ? chargeTypes[state.item.chargeType]
+                          : '点播'}
+                      </div>
                     </div>
-                  </div>
-                )}
-              </div>
+                  )}
+                </div>
               </div>
             </div>
             <div class={classes.authorBottom}>

+ 10 - 2
src/views/muiscDetial/index.tsx

@@ -438,7 +438,11 @@ export default defineComponent({
                           alt=""
                         />
                       </div>
-                      <img src={music} class={classes.musiceIcon} alt="" />
+                      <img
+                        src={state.musicDetail.titleImg || music}
+                        class={classes.musiceIcon}
+                        alt=""
+                      />
                       <div>
                         <div class={classes.collect} onClick={favoriteMusic}>
                           <img
@@ -518,7 +522,11 @@ export default defineComponent({
                                 ) : (
                                   <div class={classes.iconWrapList}>
                                     <img
-                                      src={ state.teacherDetail.isVip?vipIcon:noVipIcon}
+                                      src={
+                                        state.teacherDetail.isVip
+                                          ? vipIcon
+                                          : noVipIcon
+                                      }
                                       class={classes.vipIcon}
                                       alt=""
                                     />

+ 11 - 12
src/views/muiscDetial/modals/musicItem.tsx

@@ -1,4 +1,4 @@
-import { defineComponent, reactive,watch } from 'vue'
+import { defineComponent, reactive, watch } from 'vue'
 import icon from '../videoDetailItem/images/icon.png'
 import classes from './musicItem.module.less'
 import music from '@/components/musicLIstItem/images/music.png'
@@ -11,6 +11,7 @@ type Props = {
   addUserAvatar: String
   musicSheetName: String
   subjectNames: String
+  titleImg: String
   composer: String
   chargeType: String
 }
@@ -22,7 +23,7 @@ const chargeTypes = {
 
 export default defineComponent({
   name: 'musicItem',
-  emits:['musicDetail'],
+  emits: ['musicDetail'],
   props: {
     item: {
       type: Object as () => Props,
@@ -33,10 +34,10 @@ export default defineComponent({
       default: (item: any) => {}
     }
   },
-  setup(props: any,conent) {
+  setup(props: any, conent) {
     const router = useRouter()
     const state = reactive({
-      item:props.item
+      item: props.item
     })
 
     watch(
@@ -46,9 +47,8 @@ export default defineComponent({
       }
     )
 
-
     const gotoMusicDetail = () => {
-      conent.emit('musicDetail',state.item.id)
+      conent.emit('musicDetail', state.item.id)
       // router.push({path:'/muiscDetial',query:{id:state.item.id}})
     }
     return () => (
@@ -60,17 +60,16 @@ export default defineComponent({
         <div class={classes.itemWrap} onClick={() => gotoMusicDetail()}>
           <div class={classes.left}>
             <div class={classes.imgWrap}>
-              <img src={music} alt="" />
+              <img src={state.item.titleImg || music} alt="" />
             </div>
             <div class={classes.textWrap}>
-
               <p>
-                <ElTooltip placement="top" content={state.item.musicSheetName}>{state.item.musicSheetName}</ElTooltip>
-
-
+                <ElTooltip placement="top" content={state.item.musicSheetName}>
+                  {state.item.musicSheetName}
+                </ElTooltip>
               </p>
               <p>
-              <span>作曲: {state.item.composer}</span>
+                <span>作曲: {state.item.composer}</span>
               </p>
             </div>
           </div>

+ 1 - 0
src/views/student-info/my-score/list.tsx

@@ -119,6 +119,7 @@ export default defineComponent({
                   addName: item.addName,
                   addUserAvatar: item.addUserAvatar,
                   musicSheetName: item.musicSheetName,
+                  titleImg: item.titleImg,
                   subjectNames: item.subjectNames,
                   composer: item.composer,
                   chargeType: item.chargeType

+ 2 - 1
src/views/user-info/music-class/item.tsx

@@ -14,6 +14,7 @@ type Props = {
   musicSheetName: string
   subjectNames: string
   composer: string
+  titleImg: string
   chargeType: string
 }
 const chargeTypes = {
@@ -59,7 +60,7 @@ export default defineComponent({
         <div class={classes.itemWrap} onClick={() => gotoMusicDetail()}>
           <div class={classes.left}>
             <div class={classes.imgWrap}>
-              <img src={music} alt="" />
+              <img src={state.item.titleImg || music} alt="" />
             </div>
             <div class={classes.textWrap}>
               <p>

+ 1 - 0
src/views/user-info/music-class/list.tsx

@@ -132,6 +132,7 @@ export default defineComponent({
                       addUserAvatar: item.addUserAvatar,
                       musicSheetName: item.musicSheetName,
                       subjectNames: item.subjectNames,
+                      titleImg: item.titleImg,
                       composer: item.composer,
                       chargeType: item.chargeType
                     }}