Переглянути джерело

频道分享 无数据显示提示

DESKTOP-O04BTUJ\muzen 2 роки тому
батько
коміт
b5d52ce4b5
1 змінених файлів з 13 додано та 2 видалено
  1. 13 2
      src/pages/share/list.vue

+ 13 - 2
src/pages/share/list.vue

@@ -21,7 +21,7 @@
       </view>
     </view>
     <!-- 列表 -->
-    <view class="list">
+    <view class="list" v-if="list.length > 0">
       <view class="item" v-for="item in list" :key="item.audioId" @click="getNav(item)">
         <img class="logo" :src="item.audioPic" />
         <view class="title">
@@ -31,6 +31,10 @@
         <img class="play" src="@/static/share/playbtn.png" @click.stop="open" />
       </view>
     </view>
+    <view class="no-data" v-else>
+      <img src="@/static/share/empty.png" style="width: 240rpx; height:240rpx" />
+      <view style="">暂无频道内容哦</view>
+    </view>
   </view>
 </template>
 
@@ -51,7 +55,7 @@ export default {
   onLoad(e) {
     if (e.userId) {
       this.form.userId = e.userId,
-      this.form.channelId = e.channelId
+        this.form.channelId = e.channelId
       // 频道详情
       channelDetail({
         channelId: e.channelId,
@@ -232,4 +236,11 @@ export default {
     }
   }
 }
+
+.no-data{
+  text-align: center;
+  margin-top: 200rpx;
+  color: rgba(255, 255, 255, 0.7);
+  font-size: 24rpx;
+}
 </style>