Ver Fonte

无内容

zhengkaixin há 3 anos atrás
pai
commit
2ce2e056b3
1 ficheiros alterados com 17 adições e 2 exclusões
  1. 17 2
      pages/news/index.vue

+ 17 - 2
pages/news/index.vue

@@ -6,11 +6,11 @@
 				<u-tabs :list="tabList" :current="current" @change="change" :show-bar="false" active-color="#333" inactive-color="#c4c0c0"></u-tabs>
 			</view>
 		</view>
-		<view class="homeWrap">
+		<view class="homeWrap" v-if="wrapList.length">
 			<u-swiper :list="wrapList" @click="clickBanner" :img-mode="'aspectFit'" :name="'picUrl'" height="300" border-radius="24"></u-swiper>
 			
 		</view>
-		<view class="newsList">
+		<view class="newsList" v-if="list.length">
 			<view class="newsList-item" 
 				 @click="gotoUrl('pages/news/detalis?id='+item.id)"
 				v-for="(item ,index) in list" :key="item.id" >
@@ -26,6 +26,10 @@
 			
 			<u-divider color="#B6BDC3"  v-if="list.length ==recordsTotal" style="margin-top:20px;">已经到底了</u-divider>
 		</view>
+		<view class="jpDefault" v-else>
+			<u-image width="179px" height="126px" src="/static/img/default1.png"></u-image>
+			<p>暂无资讯内容</p>
+		</view>
  	</view>
 </template>
 
@@ -167,6 +171,17 @@
 </script>
 
 <style lang="scss" scoped>
+	.jpDefault{
+		padding-top:90px;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		p{
+			color: #A69F9F;
+			font-size: 16px;
+			margin-top: 12px;
+		}
+	}
 	.navbar-tit{
 		padding-left:15px;
 		font-size: 24px;