Преглед на файлове

Merge branch 'develop/3.1.5' into test

DESKTOP-SVI9JE1\muzen преди 1 година
родител
ревизия
dee92b2f10
променени са 2 файла, в които са добавени 8 реда и са изтрити 9 реда
  1. 3 3
      src/components/my-audio/my-audio.vue
  2. 5 6
      src/pages/content/index.vue

+ 3 - 3
src/components/my-audio/my-audio.vue

@@ -6,8 +6,8 @@
       <view class="song">{{ name }}</view>
       <view class="singer">{{ singer ? singer : '暂无歌手名' }}</view>
     </view>
-    <image v-if="newStatus === 1" class="btn" src="../../static/stop.png" @click="getPlay" />
-    <image v-else class="btn" src="../../static/play.png" @click="getPlay" />
+    <image v-if="newStatus !== 1" class="btn" src="../../static/play.png" @click="getPlay" />
+    <image v-else class="btn" src="../../static/stop.png" @click="getPlay" />
   </view>
 </template>
 
@@ -32,7 +32,7 @@ export default {
   },
   methods: {
     getPlay() {
-      this.$emit('click', this.newStatus)
+      this.$emit('click')
     }
   }
 }

+ 5 - 6
src/pages/content/index.vue

@@ -11,7 +11,7 @@
           <!-- 音频 -->
           <my-audio v-if="item.layoutType === 1" :ref="`video${item.sort}`" :bg="form.audioBackgroundImage"
             :pic="item.contentPic" :name="item.contentName" :singer="item.contentInfo.singerName"
-            :status="item.playStatus" @click="getPlay($event, item)" />
+            :status="item.playStatus" @click="getPlay(item)" />
           <!-- 歌单 、专辑 -->
           <my-list v-if="item.layoutType === 2" :pic="item.contentPic" :name="item.contentName" :data="item.contentInfo"
             :type="item.contentType" @click="getOpen(item)" />
@@ -47,8 +47,7 @@ export default {
         8: '/mobile/playAlbumPage',
         10: '/mobile/playSongsPage',
         15: '/mobile/playSongsPage'
-      },
-      activeAudio: {}
+      }
     }
   },
   onLoad(e) {
@@ -104,11 +103,11 @@ export default {
     },
 
     // 单个音频
-    getPlay(e, item) {
+    getPlay(item) {
       if (this.inside) {
-        let status = e === 2 ? 1 : 2
-        openPage.postMessage(`?page=/mobile/audioPage&audioId=${item.contentInfo.audioId}&audioType=${item.contentInfo.audioType}&platformId=${item.platformId}&playStatus=${status}&openAudioPage=0&cmd=openPage`)
+        openPage.postMessage(`?page=/mobile/audioPage&audioId=${item.contentInfo.audioId}&audioType=${item.contentInfo.audioType}&platformId=${item.platformId}&playStatus=1&openAudioPage=0&cmd=openPage`)
         window['setOpenPage'] = res => {
+          this.form.contentShareLayoutList.map(i => i.playStatus = 2)
           item.playStatus = JSON.parse(res).status
         }
       } else {