wangxy 1 month ago
parent
commit
3061043875
2 changed files with 16 additions and 5 deletions
  1. 5 1
      pages/chanpinXuanze/components/shuxueList.vue
  2. 11 4
      pages/chanpinXuanze/index.vue

+ 5 - 1
pages/chanpinXuanze/components/shuxueList.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="sx-card-list">
+	<view class="sx-card-list" v-if="list.length">
 		<view v-for="item in list" :key="item.chanpinId" class="sx-card-box">
 			<view class="card-head-box">
 				<!-- 封面 -->
@@ -21,6 +21,10 @@
 			</view>
 		</view>
 	</view>
+	<view class="no-kc-list" v-else>
+		<icon></icon>
+		<text>暂无数据</text>
+	</view>
 </template>
 
 <script setup>

+ 11 - 4
pages/chanpinXuanze/index.vue

@@ -11,13 +11,20 @@
 				:class="{active: item.value == data.chanpinActiveSelect}" @click="handleSelectChanpin(item)">{{item.name}}</view>
 			</view>
 			<!-- 英语列表 -->
-			<view v-if="data.chanpinActiveSelect == 1"> </view>
+			<view v-if="data.chanpinActiveSelect == 1"> 
+				<view class="no-kc-list" v-if="data.list.length">
+					<icon></icon>
+					<text>暂无数据</text>
+				</view>
+			</view>
 			<!-- 数学列表 -->
 			<shuxueListVue v-if="data.chanpinActiveSelect == 2" :list="data.shuxueList"></shuxueListVue>
 			<!-- 语文列表 -->
-			<view class="no-kc-list" v-if="data.chanpinActiveSelect == 3">
-				<icon></icon>
-				<text>暂无数据</text>
+			<view v-if="data.chanpinActiveSelect == 3">
+				<view class="no-kc-list" v-if="data.list.length">
+					<icon></icon>
+					<text>暂无数据</text>
+				</view>
 			</view>
 		</view>
 	</view>