Browse Source

feat:静态页面修改 音乐页面修改

PIWALIN 1 tuần trước cách đây
mục cha
commit
8aba989923

+ 63 - 86
src/pages/music/component/musicRecommend.vue

@@ -1,12 +1,11 @@
 <template>
-  <view>
-    <!-- Header -->
+  <view class="bg">
+    <!-- 播放全部 -->
     <view class="header">
       <view class="header-left">
         <!-- 播放按钮 -->
-        <view class="play-circle">
+        <view class="play-circle" @click="palyHeaderBtn">
           <image
-            @click="palyBtn"
             style="width: 48rpx; height: 48rpx"
             src="/src/static//icon/fi-rr-play-alt.svg"
           ></image>
@@ -15,35 +14,27 @@
       </view>
 
       <!-- 循环播放 -->
-      <view class="header-right">
-        <image @click="cycleBtn" class="imgIcon" src="/src/static/icon/fi-rr-refresh.svg"></image>
-        <image class="imgIcon" src="/src/static/icon/fi-rr-shuffle.svg"></image>
+      <view class="header-right" @click="cycleBtn">
+        <image v-if="isRefresh" class="imgIcon" src="/src/static/icon/fi-rr-refresh.svg"></image>
+        <image v-else class="imgIcon" src="/src/static/icon/fi-rr-shuffle.svg"></image>
       </view>
     </view>
 
-    <!-- 当前播放 -->
-    <view class="currently-playing">
+    <!-- 当前播放   循环播放-->
+    <view class="currently-playing" v-show="playDom">
       <view class="currently-playing-left">
-        <view class="play-circle">
-          <image
-            @click="palyBtn"
-            class="palyIcon"
-            src="/src/static//icon/fi-rr-play.svg"
-            v-if="type === 0"
-          ></image>
-          <image
-            @click="palyBtn"
-            class="palyIcon"
-            src="/src/static//icon/fi-rr-play.svg"
-            v-else
-          ></image>
+        <view class="play-circle" @click="palyBtn">
+          <image v-if="isRePaly" class="palyIcon" src="/src/static/icon/fi-rr-play.svg"></image>
+          <image v-else class="imgIcon" src="/src/static/icon/fi-rr-pause.svg"></image>
         </view>
-        <text class="text-gray">继续播放: 小燕子(供暖版) - 贝乐虎儿歌贝乐虎儿歌贝乐虎儿歌</text>
+        <text class="text-gray">继续播放: {{ songTitle }}</text>
       </view>
-      <!-- 循环播放 -->
       <view style="display: flex; gap: 80rpx">
-        <image @click="cycleBtn" class="imgIcon" src="/src/static/icon/fi-rr-pause.svg"></image>
-        <image class="imgIcon" src="/src/static/icon/fi-rr-cross-small.svg"></image>
+        <image
+          @click="cleanBtn"
+          class="imgIcon"
+          src="/src/static/icon/fi-rr-cross-small.svg"
+        ></image>
       </view>
     </view>
 
@@ -51,12 +42,10 @@
     <view class="playlist">
       <view v-for="(song, index) in songs" :key="index" class="playlist-item">
         <view class="album-cover">
-          <view class="cover-inner">
-            <image
-              style="width: 100rpx; height: 100rpx"
-              src="/src/static/icon/fi-rr-big-play.svg"
-            ></image>
-          </view>
+          <image
+            style="width: 100rpx; height: 100rpx"
+            src="/src/static/icon/fi-rr-big-play.svg"
+          ></image>
         </view>
         <view class="song-details" @click="playFavoriteBtn(song, index)">
           <text class="song-name">{{ song.name }}</text>
@@ -89,6 +78,7 @@
 <script setup>
   import { ref } from 'vue'
 
+  // 综合还是收藏
   const props = defineProps({
     type: {
       type: Number,
@@ -109,16 +99,35 @@
     { name: '世上只有妈妈好', duration: '3:35', favorite: false },
     { name: '蜗牛与黄鹂鸟', duration: '3:35', favorite: true },
   ])
-  // 播放
+  const isRefresh = ref(true) // 循环
+  const isRePaly = ref(true) // 播放暂停切换
+  const playDom = ref(true)
+  const songTitle = ref('')
+  // 播放 暂停
+  const palyHeaderBtn = () => {
+    console.log(111, '播放', '暂停')
+  }
+  // 播放 暂停
   const palyBtn = () => {
-    console.log(111, '播放')
+    isRePaly.value = !isRePaly.value
+    console.log(111, '播放', '暂停')
   }
   // 循环播放
   const cycleBtn = () => {
+    isRefresh.value = !isRefresh.value
     console.log(111, '循环播放')
   }
+  // 清除当前播放DOM
+  const cleanBtn = () => {
+    playDom.value = false
+  }
   // 当前列表
   const playFavoriteBtn = (song, index) => {
+    console.log(222)
+
+    playDom.value = true
+    songTitle.value = song.name
+    console.log(song, 'songsong')
     const songData = encodeURIComponent(JSON.stringify(song))
     uni.navigateTo({
       url: `/pages/music/component/musicPlayback?songDate=${songData}`,
@@ -138,67 +147,51 @@
   })
 </script>
 
-<style scoped>
+<style scoped lang="scss">
   .header {
     display: flex;
     align-items: center;
     justify-content: space-between;
     border-bottom: 2rpx solid #f0f0f0;
-  }
+    padding: 16rpx 32rpx;
+    background: #fff;
 
-  .header-left {
-    display: flex;
-    align-items: center;
+    .header-left {
+      display: flex;
+      align-items: center;
+    }
   }
   .play-circle {
     display: flex;
-    /* justify-content: center; */
     align-items: center;
-    width: 70rpx;
     height: 100rpx;
   }
-  .orange-icon {
-    margin-right: 16rpx;
-    color: #f97316;
-  }
 
   .text-gray {
-    display: flex;
-    align-items: center;
-    width: 440rpx;
-    overflow: hidden;
-    font-family: 'PingFang SC';
+    padding-left: 25rpx;
     font-size: 24rpx;
-    font-style: normal;
-    font-weight: 400;
     color: #333;
+    overflow: hidden;
     text-overflow: ellipsis;
     white-space: nowrap;
   }
-
-  .header-right {
-    display: flex;
-    gap: 32rpx;
-  }
-
-  .gray-icon {
-    color: #6b7280;
-    cursor: pointer;
-  }
   /* 播放 */
   .currently-playing {
     display: flex;
     align-items: center;
     justify-content: space-between;
+    padding: 16rpx 32rpx;
+    background: #fff;
+    border-bottom: 2rpx solid #f0f0f0;
+    .currently-playing-left {
+      display: flex;
+      align-items: center;
+    }
   }
 
-  .currently-playing-left {
-    display: flex;
-    align-items: center;
-  }
   /* 列表 */
   .playlist {
-    height: calc(100vh - 630rpx);
+    height: calc(100vh - 620rpx);
     overflow: auto;
   }
   .playlist::-webkit-scrollbar {
@@ -207,13 +200,9 @@
   .playlist-item {
     display: flex;
     align-items: center;
-    padding: 24rpx 0px;
-    cursor: pointer;
     border-bottom: 2rpx solid #f0f0f0;
-  }
-
-  .playlist-item:hover {
-    background-color: #f9fafb;
+    padding: 16rpx 32rpx;
+    background: #fff;
   }
 
   .album-cover {
@@ -223,22 +212,12 @@
     overflow: hidden;
   }
 
-  .cover-inner {
-    display: flex;
-    align-items: center;
-    width: 100%;
-    height: 100%;
-  }
-
   .song-details {
     flex: 1;
   }
 
   .song-name {
-    font-family: 'PingFang SC';
     font-size: 32rpx;
-    font-style: normal;
-    font-weight: 400;
     color: #333;
   }
 
@@ -247,9 +226,7 @@
     gap: 32rpx;
     align-items: center;
     font-size: 24rpx;
-    font-style: normal;
-    font-weight: 400;
-    color: var(--999, #999);
+    color: #999;
   }
   .imgIcon {
     width: 32rpx;

+ 14 - 5
src/pages/music/music.vue

@@ -43,16 +43,25 @@
 <style scoped lang="scss">
   .music-search {
     display: flex;
-    flex: 1 0 0;
-    gap: 20rpx;
-    align-items: center;
-    padding: 20rpx 0px;
   }
   .wd-search {
     width: 100%;
   }
+  ::v-deep .wd-search__block {
+    border-radius: 50px;
+  }
+  ::v-deep .wd-search__input {
+    height: 42px;
+  }
   .music-recommend {
-    padding: 16rpx 32rpx 32rpx 32rpx;
     overflow: auto;
+    height: calc(100vh - 320rpx);
+    background: #f2f2f2;
+  }
+  ::v-deep .wd-tabs__line {
+    background: #f88842;
+  }
+  ::v-deep .is-active {
+    color: #f88842;
   }
 </style>

+ 0 - 5
src/pages/myUser/component/babyInformation.vue

@@ -218,13 +218,8 @@
       line-height: 48rpx;
     }
     .nickname {
-      display: flex;
-      align-items: center;
       height: 60rpx;
-      font-family: 'PingFang SC';
       font-size: 28rpx;
-      font-style: normal;
-      font-weight: 400;
     }
   }
   .baby-Bottom {

+ 5 - 1
src/pages/user/login.vue

@@ -239,7 +239,11 @@
     display: flex;
     justify-content: center;
     min-height: 100vh;
-    background: linear-gradient(0deg, #fff 0%, #ffac78 100%);
+    // background: linear-gradient(0deg, #fff 0%, #ffac78 100%);
+    background-image: url('/src/static/icon/loginGg.svg');
+    background-size: cover;
+    background-position: center;
+    background-repeat: no-repeat;
   }
 
   .login-box {

+ 48 - 0
src/static/icon/loginGg.svg

@@ -0,0 +1,48 @@
+<svg width="375" height="812" viewBox="0 0 375 812" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_965_13005)">
+<rect width="375" height="812" fill="white"/>
+<rect width="375" height="812" fill="url(#paint0_linear_965_13005)"/>
+<mask id="mask0_965_13005" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="375" height="812">
+<rect width="375" height="812" fill="url(#paint1_linear_965_13005)"/>
+</mask>
+<g mask="url(#mask0_965_13005)">
+<ellipse cx="161.844" cy="161.844" rx="161.844" ry="161.844" transform="matrix(-0.100546 -0.994933 -0.994933 0.100546 546.555 538.01)" fill="url(#paint2_linear_965_13005)" fill-opacity="0.2"/>
+<ellipse cx="113.799" cy="113.799" rx="113.799" ry="113.799" transform="matrix(-0.659412 0.751782 0.751782 0.659412 53.7467 565.666)" fill="url(#paint3_linear_965_13005)" fill-opacity="0.2"/>
+</g>
+<mask id="mask1_965_13005" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="375" height="812">
+<rect width="375" height="812" fill="url(#paint4_linear_965_13005)"/>
+</mask>
+<g mask="url(#mask1_965_13005)">
+<ellipse cx="151.91" cy="154.528" rx="151.91" ry="154.528" transform="matrix(-0.8158 0.578334 0.578334 0.8158 77.2617 -142.453)" fill="url(#paint5_linear_965_13005)" fill-opacity="0.2"/>
+</g>
+</g>
+<defs>
+<linearGradient id="paint0_linear_965_13005" x1="187.5" y1="812" x2="187.5" y2="0" gradientUnits="userSpaceOnUse">
+<stop stop-color="white" stop-opacity="0"/>
+<stop offset="1" stop-color="#FFEBDF"/>
+</linearGradient>
+<linearGradient id="paint1_linear_965_13005" x1="187.5" y1="812" x2="187.5" y2="0" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="#FFE0D8"/>
+</linearGradient>
+<linearGradient id="paint2_linear_965_13005" x1="188.837" y1="108.116" x2="163.065" y2="323.834" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FFAC78"/>
+<stop offset="1" stop-color="white"/>
+</linearGradient>
+<linearGradient id="paint3_linear_965_13005" x1="30.3849" y1="187.274" x2="173.692" y2="79.2539" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="#FFAC78"/>
+</linearGradient>
+<linearGradient id="paint4_linear_965_13005" x1="187.5" y1="812" x2="187.5" y2="0" gradientUnits="userSpaceOnUse">
+<stop stop-color="white"/>
+<stop offset="1" stop-color="#FFAC78"/>
+</linearGradient>
+<linearGradient id="paint5_linear_965_13005" x1="170.558" y1="199.576" x2="151.91" y2="309.056" gradientUnits="userSpaceOnUse">
+<stop stop-color="#FFAC78"/>
+<stop offset="1" stop-color="white"/>
+</linearGradient>
+<clipPath id="clip0_965_13005">
+<rect width="375" height="812" fill="white"/>
+</clipPath>
+</defs>
+</svg>