mo 3 lat temu
rodzic
commit
edfb134b61

+ 162 - 0
src/views/muiscDetial/index.module.less

@@ -121,6 +121,7 @@
       background-color: #fff;
       padding: 24px;
       width: 494px;
+      margin-bottom: 14px;
       h2 {
         font-size: 20px;
         font-family: PingFangSC-Semibold, PingFang SC;
@@ -133,6 +134,7 @@
         display: flex;
         flex-direction: row;
         align-items: center;
+        margin-bottom: 21px;
         .start {
           width: 23px;
           height: 23px;
@@ -145,7 +147,167 @@
           color: #000000;
           line-height: 25px;
         }
+      }
+      .subTitle {
+        margin-bottom: 15px;
+        span {
+          font-size: 16px;
+          line-height: 22px;
+          color: #666;
+        }
+      }
+    }
+    .btooom {
+      background-color: #fff;
+      .teacherInfo {
+        padding: 20px;
+        background-color: #fff;
+        margin-bottom: 25px;
+        .teacherHeadWrap {
+          display: flex;
+          flex-direction: row;
+          align-items: center;
+          justify-content: space-between;
+          .teacherHeadLeft {
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            .teacherHeader {
+              width: 54px;
+              height: 54px;
+              border-radius: 50%;
+              overflow: hidden;
+              margin-right: 16px;
+            }
+            .teacherHeadName {
+              padding-top: 2px;
+              display: flex;
+              flex-direction: row;
+              align-items: center;
+              font-size: 20px;
+              font-family: PingFangSC-Semibold, PingFang SC;
+              font-weight: 600;
+              color: #000000;
+              line-height: 28px;
+              span {
+                margin-right: 12px;
+              }
+              .teacherIcon {
+                width: 54px;
+                height: 22px;
+                margin-right: 5px;
+              }
+            }
+            .fens {
+              font-size: 16px;
+              font-family: PingFangSC-Regular, PingFang SC;
+              font-weight: 400;
+              color: #999999;
+              line-height: 22px;
+              span {
+                color: #333333;
+              }
+            }
+          }
+          .teacherHeadRight {
+            width: 67px;
+            height: 30px;
+            background: #2dc7aa;
+            border-radius: 21px;
+            font-size: 18px;
+            font-family: PingFangSC-Semibold, PingFang SC;
+            font-weight: 600;
+            color: #ffffff;
+            line-height: 30px;
+            text-align: center;
+            cursor: pointer;
+          }
+        }
+        //
+        .courseWrap {
+          padding: 20px;
+          background-color: #fff;
+          .courseTitle {
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            font-size: 20px;
+            font-family: PingFangSC-Medium, PingFang SC;
+            font-weight: 500;
+            color: #000000;
+            line-height: 28px;
+            img {
+              width: 26px;
+              height: 26px;
+              margin-right: 8px;
+            }
+          }
+        }
 
+        .titleWrap {
+          display: flex;
+          flex-direction: row;
+          align-items: center;
+          justify-content: flex-start;
+          margin-top: 20px;
+          padding-bottom: 12px;
+          span {
+            font-size: 20px;
+            color: #000;
+            line-height: 28px;
+            font-weight: 600;
+          }
+          img {
+            width: 24px;
+            height: 24px;
+            margin-right: 10px;
+          }
+        }
+        .teacherDetail {
+          font-size: 18px;
+          font-family: PingFangSC-Regular, PingFang SC;
+          font-weight: 400;
+          color: #666666;
+          line-height: 25px;
+        }
+        .teacherVideoList {
+          display: flex;
+          flex-direction: row;
+          flex-wrap: wrap;
+          .videoItem {
+            .Styles {
+              width: 218px;
+              height: 145px;
+            }
+            .videoItemVideo {
+              width: 218px;
+              height: 145px;
+            }
+            margin-right: 18px;
+            margin-bottom: 12px;
+            width: 218px;
+            height: 145px;
+            position: relative;
+            &:nth-child(2n) {
+              margin-right: 0;
+            }
+          }
+        }
+      }
+      .otherMusic {
+        padding: 0 20px;
+        h2 {
+          font-size: 18px;
+          font-family: PingFangSC-Semibold, PingFang SC;
+          font-weight: 600;
+          color: #000000;
+          line-height: 25px;
+          margin-bottom: 14px;
+        }
+        .otherMusicList {
+          padding: 18px 0;
+          border-top: 1px solid #DEDEDE;
+        }
       }
     }
   }

+ 123 - 19
src/views/muiscDetial/index.tsx

@@ -6,7 +6,13 @@ import banner from './images/banner.png'
 import colVideo from '@/components/col-video/index'
 import iconClose from '@/views/login/images/icon_close.png'
 import start from '@/components/albumItem/images/start.png'
+import teacher from '@/views/videoDetailList/images/teacher.png'
+import teacherHeader from '@/common/images/icon_teacher.png'
+import musiceIcon from '@/views/videoDetailList/images/musiceIcon.png'
+import tagItem from '@/components/tagItem'
 import code from './images/code.png'
+import musicItem from './modals/musicItem'
+import request from '@/helpers/request'
 export default defineComponent({
   name: 'muiscDetial',
   props: {
@@ -15,18 +21,42 @@ export default defineComponent({
       default: ''
     }
   },
-  components:{
-    colVideo
+  components: {
+    colVideo,
+    tagItem,
+    musicItem
   },
   setup(props, conent) {
     const state = reactive({
       title: props.title,
       subjectId: '',
-      subjectList:[]
+      subjectList: [],
+      tagList: [],
+      teacherDetail: {} as any,
+      musicList:[]
+    })
+    const getMusicList = async () => {
+      try {
+        const res = await request.post('/api-website/open/music/sheet/list', {
+          data: {
+            albumStatus: 'PASS',
+            page: 1,
+            rows: 5,
+            state: 1
+          }
+        })
+
+        state.musicList = res.data.rows
+      } catch (e) {
+        console.log(e)
+      }
+    }
+    onMounted(()=>{
+      getMusicList()
     })
     return () => (
       <>
-      <div class={classes.wall}></div>
+        <div class={classes.wall}></div>
         <div class={[classes.width1200, classes.musicWrap]}>
           <div class={classes.left}>
             <div class={classes.title}>
@@ -53,26 +83,100 @@ export default defineComponent({
                 <img class={classes.close} src={iconClose} alt="" />
                 <img class={classes.code} src={code} alt="" />
                 <h2 class={classes.title}>酷乐秀</h2>
-                <p  class={classes.conent}>扫码下载酷乐秀APP</p>
-                <p  class={classes.subConent}>使用小酷Ai即可智能练习本首曲目哦!</p>
-              <img src={banner} alt="" />
+                <p class={classes.conent}>扫码下载酷乐秀APP</p>
+                <p class={classes.subConent}>
+                  使用小酷Ai即可智能练习本首曲目哦!
+                </p>
+                <img src={banner} alt="" />
               </div>
-
             </div>
-            <colVideo src="" styleValue={{
-              height:'68px',
-              bacground:'#333'
-            }} type={'audto'} settings={['captions', 'quality', 'speed', 'loop']} class={classes.audios}></colVideo>
+            <colVideo
+              src=""
+              styleValue={{
+                height: '68px',
+                bacground: '#333'
+              }}
+              type={'audto'}
+              settings={['captions', 'quality', 'speed', 'loop']}
+              class={classes.audios}
+            ></colVideo>
           </div>
           <div class={classes.right}>
-          <div class={classes.musicInfo}>
-            <h2>曲目:红莲华</h2>
-            <div class={classes.collect}>
-              <img src={start} class={classes.start} alt="" />
-              <p>321人收藏</p>
+            <div class={classes.musicInfo}>
+              <h2>曲目:红莲华</h2>
+              <div class={classes.collect}>
+                <img src={start} class={classes.start} alt="" />
+                <p>321人收藏</p>
+              </div>
+              <div class={classes.tagList}>
+                {state.tagList.map((item: any) => {
+                  return <tagItem title={item.key}>{item.key}</tagItem>
+                })}
+              </div>
+              <p class={classes.subTitle}>
+                作曲人:<span>草野华余子</span>
+              </p>
+              <p class={classes.subTitle}>
+                声部:<span>长笛、萨克斯、单簧管</span>
+              </p>
+            </div>
+            <div class={classes.btooom}>
+              <div class={classes.teacherInfo}>
+                <div class={classes.teacherHeadWrap}>
+                  <div class={classes.teacherHeadLeft}>
+                    <img
+                      src={
+                        state.teacherDetail.avatar
+                          ? state.teacherDetail.avatar
+                          : teacherHeader
+                      }
+                      alt=""
+                      class={classes.teacherHeader}
+                    />
+                    <div class={classes.teacherHeadInfo}>
+                      <div class={classes.teacherHeadName}>
+                        <span>{state.teacherDetail.username}</span>
+                        {state.teacherDetail.teacherType &&
+                        state.teacherDetail.teacherType.indexOf('ENTRY') ==
+                          -1 ? (
+                          ''
+                        ) : (
+                          <img
+                            src={teacher}
+                            class={classes.teacherIcon}
+                            alt=""
+                          />
+                        )}
+                        {state.teacherDetail.teacherType &&
+                        state.teacherDetail.teacherType.indexOf('MUSICIAN') ==
+                          -1 ? (
+                          ''
+                        ) : (
+                          <img
+                            src={musiceIcon}
+                            class={classes.teacherIcon}
+                            alt=""
+                          />
+                        )}
+                      </div>
+                      <p class={classes.fens}>
+                        粉丝 <span>{state.teacherDetail.fansNum}</span>
+                      </p>
+                    </div>
+                  </div>
+                  <div class={classes.teacherHeadRight}>关注</div>
+                </div>
+              </div>
+              <div class={classes.otherMusic}>
+                <h2>Ta的曲谱</h2>
+                <div class={classes.otherMusicList}>
+                  {state.musicList.map(item=>{
+                    return  <musicItem item={item}></musicItem>
+                  })}
+
+                </div>
+              </div>
             </div>
-            <div class={classes.tagList}></div>
-          </div>
           </div>
         </div>
       </>

+ 50 - 0
src/views/muiscDetial/modals/musicItem.module.less

@@ -0,0 +1,50 @@
+.itemWrap {
+  height: 40px;
+  background: #ffffff;
+  border-radius: 12px;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  width: 100%;
+  border-radius: 12px;
+  margin-bottom: 10px;
+  cursor: pointer;
+  .left {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    .imgWrap {
+      width: 40px;
+      height: 40px;
+      margin-right: 18px;
+    }
+    .textWrap {
+      p {
+        font-weight: 600;
+        color: #333333;
+        line-height: 22px;
+        font-size: 14px;
+        span {
+          font-weight: 400;
+          color: #6a6a6a;
+        }
+      }
+      .authorInfo {
+        display: flex;
+        flex-direction: row;
+        align-items: center;
+        .icon {
+          width: 20px;
+          height: 20px;
+          border-radius: 27px;
+          margin-right: 6px;
+        }
+        .authorName {
+          color: #333;
+          font-size: 12px;
+          margin-right: 8px;
+        }
+      }
+    }
+  }
+}

+ 70 - 0
src/views/muiscDetial/modals/musicItem.tsx

@@ -0,0 +1,70 @@
+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'
+import arrow from '@/components/musicLIstItem/images/arrow.png'
+
+type Props = {
+  id?: Number
+  addName: String
+  addUserAvatar: String
+  musicSheetName: String
+  subjectNames: String
+  composer: String
+  chargeType: String
+}
+const chargeTypes = {
+  CHARGE: '点播',
+  FREE: '免费',
+  VIP: 'VIP'
+}
+
+export default defineComponent({
+  name: 'musicItem',
+  props: {
+    item: {
+      type: Object as () => Props,
+      default: () => ({})
+    },
+    onClick: {
+      type: Function,
+      default: (item: any) => {}
+    }
+  },
+  setup(props: any) {
+    const state = reactive({
+      item:props.item
+    })
+
+    watch(
+      () => props.item,
+      item => {
+        state.item = item
+      }
+    )
+    return () => (
+      <div
+        onClick={() => {
+          props.onClick(state.item)
+        }}
+      >
+        <div class={classes.itemWrap}>
+          <div class={classes.left}>
+            <div class={classes.imgWrap}>
+              <img src={music} alt="" />
+            </div>
+            <div class={classes.textWrap}>
+              <p>
+                {state.item.musicSheetName}
+
+              </p>
+              <p>
+              <span>作曲: {state.item.composer}</span>
+              </p>
+            </div>
+          </div>
+        </div>
+      </div>
+    )
+  }
+})

+ 1 - 1
src/views/videoDetailList/videoDetail.tsx

@@ -9,8 +9,8 @@ import teacherIcon from './images/teacherIcon.png'
 import player from './images/player.png'
 import teacher from './images/teacher.png'
 import teacherHeader from '@/common/images/icon_teacher.png'
-import TimetableIcon from './images/TimetableIcon.png'
 import musiceIcon from './images/musiceIcon.png'
+import TimetableIcon from './images/TimetableIcon.png'
 import styles from './index.module.less'
 import videoDetailItem from '@/components/videoDetailItem'
 import colVideo from '@/components/col-video/index'