课程多选查询

This commit is contained in:
daihh
2022-12-14 18:52:14 +08:00
parent bfd4b41294
commit f9f779308c

View File

@@ -415,6 +415,7 @@ export default {
},
course: {
orderField: "studys",
keywrod:'',//关键词
topOrder: true,
orderAsc: false,
pageIndex: 1, // 第几页
@@ -482,7 +483,7 @@ export default {
this.loadSysTypes();
this.getScoreList();
this.getHotList();
//this.getHotList();
//查询排行榜,页面打开只查询一次
let localKey="user_"+this.userInfo.sysId+"_gids";
if(this.audiences.length==0){
@@ -508,8 +509,8 @@ export default {
}
}
this.searchterm();
this.couresreso();
//this.searchterm();//搜索词已经没有了
this.couresreso();//广告位
},
beforeDestroy() {
@@ -840,26 +841,50 @@ export default {
}
//console.log(this.userInfo)
//this.course.companyId=this.userInfo.companyId;
this.isFind = true;
this.course.type = this.category;
if (this.types.sysTypes == 0 || this.types.sysTypes == null) {
this.course.type = "";//不使用单查询了
this.course.types = "";
this.course.sysType1 = "";
this.course.sysType2 = "";
this.course.sysType3 = "";
} else {
this.course.sysType1 = this.types.sysTypes;
this.stagList.forEach(item=>{
if(item.checked){
}
this.course.sysType2 = this.types.subOne;
this.course.sysType3 = this.types.subTow;
if (this.course.sysType2 == 0) {
this.course.sysType2 = "";
}
if (this.course.sysType3 == 0) {
this.course.sysType3 = "";
if(item.type==1){
if(that.course.types){ that.course.types+='-'; }
that.course.types+=item.id;
}else if(item.type==11){
if(that.course.sysType1){ that.course.sysType1+='-'; }
that.course.sysType1+=item.id;
}else if(item.type==12){
if(that.course.sysType2){ that.course.sysType2+='-'; }
that.course.sysType2+=item.id;
}else if(item.type==13){
if(that.course.sysType3){ that.course.sysType3+='-'; }
that.course.sysType3+=item.id;
}
});
this.isFind = true;
// this.course.type = this.category;
// if (this.types.sysTypes == 0 || this.types.sysTypes == null) {
// this.course.sysType1 = "";
// this.course.sysType2 = "";
// this.course.sysType3 = "";
// } else {
// this.course.sysType1 = this.types.sysTypes;
// }
// this.course.sysType2 = this.types.subOne;
// this.course.sysType3 = this.types.subTow;
// if (this.course.sysType2 == 0) {
// this.course.sysType2 = "";
// }
// if (this.course.sysType3 == 0) {
// this.course.sysType3 = "";
// }
this.course.device = 1;
this.getTags();
//this.getTags();
// if(this.course.pageIndex == 1) {
// this.courseList = [];
// }
@@ -867,9 +892,7 @@ export default {
let isTopList = [];
// 隐藏loadMore
this.moreState = 2;
await apiCoursePortal
.courseSearch(this.course)
.then(res => {
await apiCoursePortal.courseSearch(this.course).then(res => {
if (res.status == 200 && res.result.list.length > 0) {
this.totalPages = res.result.totalPages;
res.result.list.forEach(item => {