mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 19:06:46 +08:00
热门搜索词无记录时不保存
This commit is contained in:
@@ -423,8 +423,8 @@
|
||||
}else{
|
||||
this.historyWords.unshift(this.keyword);
|
||||
if(this.historyWords.length>50){
|
||||
this.historyWords.splice(this.historyWords.length-1,1);
|
||||
}
|
||||
this.historyWords.splice(this.historyWords.length-1,1);
|
||||
}
|
||||
}
|
||||
uni.setStorageSync(this.hotSaveKey,JSON.stringify(this.historyWords));
|
||||
//存储到服务器,移到查询里面,查询无记录不存储
|
||||
@@ -562,6 +562,10 @@
|
||||
this.course.list.push(...rs.result.list);
|
||||
this.course.count=rs.result.count;
|
||||
if(rs.result.list.length == 0) {
|
||||
this.course.loadStatus='noMore';
|
||||
} else {
|
||||
this.course.loadStatus='more'
|
||||
}
|
||||
//
|
||||
if(rs.result.count>0 && this.keyword){
|
||||
apiHotSearch.save({keyword:this.keyword,type:this.conType});
|
||||
@@ -588,6 +592,9 @@
|
||||
userIds.push(item.sysCreateAid)
|
||||
});
|
||||
if(this.article.params.pageIndex>=rs.result.totalPages){
|
||||
this.article.loadStatus='noMore';
|
||||
}
|
||||
this.article.count=rs.result.count;
|
||||
this.loadUserInfos(rs.result.list,userIds);
|
||||
if(rs.result.count>0 && this.keyword){
|
||||
apiHotSearch.save({keyword:this.keyword,type:this.conType});
|
||||
@@ -614,6 +621,9 @@
|
||||
userIds.push(item.sysCreateAid)
|
||||
})
|
||||
if(this.qa.params.pageIndex>=rs.result.totalPages){
|
||||
this.qa.loadStatus='noMore';
|
||||
}
|
||||
this.qa.count=rs.result.count;
|
||||
this.loadUserInfos(rs.result.list,userIds);
|
||||
if(rs.result.count>0 && this.keyword){
|
||||
apiHotSearch.save({keyword:this.keyword,type:this.conType});
|
||||
|
||||
Reference in New Issue
Block a user