课程搜索连续点击重复加载问题

This commit is contained in:
daihh
2023-06-07 18:31:44 +08:00
parent fe9663453c
commit 35ef44ab6a

View File

@@ -428,7 +428,7 @@ export default {
oneList:[], //一级分类{type:11}
twoList:[], //二级分类{type:12}
threeList:[],//三级分类{type:13}
searching:false,//是否正在搜索中
resonimg:{},
formatDate,
formatNum:formatUserNumber,
@@ -973,6 +973,12 @@ export default {
return list;
},
async search() {
//
if(this.searching){
this.$message.warning("正在搜索中,请待搜索完成后再重新搜索");
return;
}
this.searching=true;
//测试时间格式化
// let s=1650973801;
// var d = new Date(1650973801*1000);
@@ -1021,6 +1027,7 @@ export default {
// 隐藏loadMore
this.moreState = 2;
await apiCoursePortal.courseSearch(this.course).then(res => {
this.searching=false;
if (res.status == 200 && res.result.list.length > 0) {
this.totalPages = res.result.totalPages;
res.result.list.forEach(item => {