DESKTOP-SVI9JE1\muzen 1 سال پیش
والد
کامیت
f891dd44e9
2فایلهای تغییر یافته به همراه174 افزوده شده و 0 حذف شده
  1. 68 0
      src/components/my-audio/my-audio.vue
  2. 106 0
      src/components/my-list/my-list.vue

+ 68 - 0
src/components/my-audio/my-audio.vue

@@ -0,0 +1,68 @@
+<template>
+  <!-- 播放器 -->
+  <view class="audio" :style="{ 'background': (bg ? `url(${bg}) no-repeat 100% / 100%` : '#EEE') }">
+    <image class="pic" :src="pic" />
+    <view class="info">
+      <view class="song">{{ name }}</view>
+      <view class="singer">暂无歌手名</view>
+    </view>
+    <image class="btn" src="../../static/play.png" />
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    bg: String,
+    pic: String,
+    name: String
+  },
+  data() {
+    return {
+
+    }
+  },
+  mounted() {
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.audio {
+  width: 100%;
+  height: 104px;
+  padding: 8px 16px 8px 8px;
+  border-radius: 8px;
+  display: flex;
+  align-items: center;
+  font-weight: bold;
+
+  .pic {
+    width: 88px;
+    height: 88px;
+    border-radius: 8px;
+    margin-right: 16px;
+  }
+
+  .info {
+    width: calc(100% - 144px);
+    color: #000;
+
+    .song {
+      font-size: 16px;
+      margin-bottom: 16px;
+    }
+
+    .singer {
+      font-size: 12px;
+      opacity: 0.6;
+    }
+  }
+
+  .btn {
+    width: 40px;
+    height: 40px;
+  }
+}
+</style>

+ 106 - 0
src/components/my-list/my-list.vue

@@ -0,0 +1,106 @@
+<template>
+  <view class="box">
+    <view class="info">
+      <view class="name">{{ name }}</view>
+      <button>收听{{ audioOption[type] }}</button>
+    </view>
+    <view class="list">
+      <ol>
+        <li v-for="(item, index) in data.childList" :key="item.id">{{ index + 1 }}、{{ item.audioName }}</li>
+      </ol>
+      <img class="pic" :src="pic" />
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  props: {
+    pic: String,
+    name: String,
+    type: Number,
+    data: Object
+  },
+  data() {
+    return {
+      audioOption: {
+        8: '播客专辑',
+        10: '歌单',
+        15: '音乐专辑'
+      }
+    }
+  },
+  mounted() {
+    
+  },
+  methods: {
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.box {
+  width: 100%;
+  height: 203px;
+  padding: 18px 16px 24px;
+  background: #EEE;
+  border-radius: 8px;
+  color: #000;
+
+  .info {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    .name {
+      flex: 1;
+      font-weight: bold;
+      overflow: hidden;
+      white-space: nowrap;
+      text-overflow: ellipsis
+    }
+
+    button {
+      height: auto;
+      line-height: 1;
+      padding: 14px 28px;
+      font-size: 16px;
+      font-weight: bold;
+      color: #FFF;
+      border-radius: 25px;
+      background: linear-gradient(146deg, #000000 0%, #333333 100%);
+    }
+  }
+
+  .list {
+    display: flex;
+    justify-content: space-between;
+    position: relative;
+
+    ol {
+      padding-inline-start: 18px;
+      font-size: 14px;
+      font-weight: bold;
+      padding: 0;
+
+      li {
+        width: 140px;
+        margin-bottom: 12px;
+        overflow: hidden;
+        white-space: nowrap;
+        text-overflow: ellipsis;
+      }
+    }
+
+    .pic {
+      position: absolute;
+      right: 0;
+      bottom: 8px;
+      width: 100px;
+      height: 100px;
+      border-radius: 8px;
+    }
+  }
+}
+</style>