当获取首页产品列表时,返回数据length为0时取消发送请求
This commit is contained in:
@@ -65,11 +65,8 @@
|
||||
this.tagsArray = tag.split(',')
|
||||
item.tags = this.tagsArray[0]
|
||||
}
|
||||
this.$emit("getChild", tags.length);
|
||||
|
||||
// if (res.data.data.length == 0) {
|
||||
// requestTask.abort()
|
||||
// }
|
||||
console.log(res);
|
||||
// 为数据赋值:通过展开运算符的形式,进行新旧数据的拼接
|
||||
this.productList = [...this.productList, ...res.data.data]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user