mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
课程搜索连续点击重复加载问题
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user