Przeglądaj źródła

加一些为空提示

zhangsijie 2 lat temu
rodzic
commit
cd78f54e8c
2 zmienionych plików z 16 dodań i 2 usunięć
  1. 8 1
      pages/cb/sy/imgList.vue
  2. 8 1
      pages/cb/thxydetail/photolist.vue

+ 8 - 1
pages/cb/sy/imgList.vue

@@ -98,7 +98,14 @@
 					}
 				})
 				console.log(res)
-				this.imglists = [...this.imglists,...res.data]
+        this.imglists = [...this.imglists, ...res.data]
+        if(this.imglists.length == 0) {
+					uni.showToast({
+						title: '数据为空',
+						duration: 2000,
+						icon:'none'
+					});
+				}
 			},
 			top() {
 				uni.pageScrollTo({

+ 8 - 1
pages/cb/thxydetail/photolist.vue

@@ -98,7 +98,14 @@
 					}
 				})
 				console.log(res)
-				this.imglists = [...this.imglists,...res.data]
+        this.imglists = [...this.imglists, ...res.data]
+        if(this.imglists.length == 0) {
+					uni.showToast({
+						title: '数据为空',
+						duration: 2000,
+						icon:'none'
+					});
+				}
 			},
 			top() {
 				uni.pageScrollTo({