浏览代码

Update hashtag component

Daniel Supernault 1 年之前
父节点
当前提交
cee979eda8
共有 1 个文件被更改,包括 3 次插入10 次删除
  1. 3 10
      resources/assets/components/Hashtag.vue

+ 3 - 10
resources/assets/components/Hashtag.vue

@@ -202,16 +202,12 @@
 					if(res.data && res.data.length) {
 					if(res.data && res.data.length) {
 						this.feed = res.data;
 						this.feed = res.data;
 						this.maxId = res.data[res.data.length - 1].id;
 						this.maxId = res.data[res.data.length - 1].id;
-						return true;
+					    this.canLoadMore = true;
 					} else {
 					} else {
 						this.feedLoaded = true;
 						this.feedLoaded = true;
 						this.isLoaded = true;
 						this.isLoaded = true;
-						return false;
 					}
 					}
 				})
 				})
-				.then(res => {
-					this.canLoadMore = res;
-				})
 				.finally(() => {
 				.finally(() => {
 					this.feedLoaded = true;
 					this.feedLoaded = true;
 					this.isLoaded = true;
 					this.isLoaded = true;
@@ -242,14 +238,11 @@
 					if(res.data && res.data.length) {
 					if(res.data && res.data.length) {
 						this.feed.push(...res.data);
 						this.feed.push(...res.data);
 						this.maxId = res.data[res.data.length - 1].id;
 						this.maxId = res.data[res.data.length - 1].id;
-						return true;
+                        this.canLoadMore = true;
 					} else {
 					} else {
-						return false;
+                        this.canLoadMore = false;
 					}
 					}
 				})
 				})
-				.then(res => {
-					this.canLoadMore = res;
-				})
 				.finally(() => {
 				.finally(() => {
 					this.isIntersecting = false;
 					this.isIntersecting = false;
 				})
 				})