mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
课程搜索连续点击重复加载问题
This commit is contained in:
@@ -428,7 +428,7 @@ export default {
|
|||||||
oneList:[], //一级分类{type:11}
|
oneList:[], //一级分类{type:11}
|
||||||
twoList:[], //二级分类{type:12}
|
twoList:[], //二级分类{type:12}
|
||||||
threeList:[],//三级分类{type:13}
|
threeList:[],//三级分类{type:13}
|
||||||
|
searching:false,//是否正在搜索中
|
||||||
resonimg:{},
|
resonimg:{},
|
||||||
formatDate,
|
formatDate,
|
||||||
formatNum:formatUserNumber,
|
formatNum:formatUserNumber,
|
||||||
@@ -973,6 +973,12 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
async search() {
|
async search() {
|
||||||
|
//
|
||||||
|
if(this.searching){
|
||||||
|
this.$message.warning("正在搜索中,请待搜索完成后再重新搜索");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.searching=true;
|
||||||
//测试时间格式化
|
//测试时间格式化
|
||||||
// let s=1650973801;
|
// let s=1650973801;
|
||||||
// var d = new Date(1650973801*1000);
|
// var d = new Date(1650973801*1000);
|
||||||
@@ -1021,6 +1027,7 @@ export default {
|
|||||||
// 隐藏loadMore
|
// 隐藏loadMore
|
||||||
this.moreState = 2;
|
this.moreState = 2;
|
||||||
await apiCoursePortal.courseSearch(this.course).then(res => {
|
await apiCoursePortal.courseSearch(this.course).then(res => {
|
||||||
|
this.searching=false;
|
||||||
if (res.status == 200 && res.result.list.length > 0) {
|
if (res.status == 200 && res.result.list.length > 0) {
|
||||||
this.totalPages = res.result.totalPages;
|
this.totalPages = res.result.totalPages;
|
||||||
res.result.list.forEach(item => {
|
res.result.list.forEach(item => {
|
||||||
|
|||||||
Reference in New Issue
Block a user