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:
@@ -368,37 +368,21 @@ export default {
|
|||||||
device:1,
|
device:1,
|
||||||
orderField: orderType == 1 ? '' : 'studys',
|
orderField: orderType == 1 ? '' : 'studys',
|
||||||
orderAsc: false,
|
orderAsc: false,
|
||||||
// topOrder:true,
|
topOrder:true,
|
||||||
pageIndex: pageIndex
|
pageIndex: pageIndex
|
||||||
};
|
};
|
||||||
let isTopList = [];
|
|
||||||
let data = [];
|
|
||||||
this.courseList.list = [];
|
|
||||||
apiCoursePortal.pageList(course).then(res => {
|
apiCoursePortal.pageList(course).then(res => {
|
||||||
|
|
||||||
if (res.status == 200 && res.result.list.length > 0) {
|
if (res.status == 200 && res.result.list.length > 0) {
|
||||||
|
|
||||||
let courseIds = [];
|
let courseIds = [];
|
||||||
res.result.list.forEach(item => {
|
res.result.list.forEach(item => {
|
||||||
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '', code: '' ,sex:null};
|
item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '', code: '' ,sex:null};
|
||||||
courseIds.push(item.id);
|
courseIds.push(item.id);
|
||||||
console.log(item.isTop)
|
|
||||||
if(item.isTop) {
|
|
||||||
isTopList.push(item);
|
|
||||||
console.log(isTopList)
|
|
||||||
|
|
||||||
}else{
|
|
||||||
data.push(item);
|
|
||||||
// console.log(data)
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
this.loadCouserTeacher(res.result.list, courseIds);
|
this.loadCouserTeacher(res.result.list, courseIds);
|
||||||
this.courseList.list.push(...isTopList,...data);
|
this.courseList.list=res.result.list;
|
||||||
this.couname = res.result.list.name;
|
this.couname = res.result.list.name;
|
||||||
|
if(res.result.count - pageIndex * num < 8) {
|
||||||
|
|
||||||
|
|
||||||
if (res.result.count - pageIndex * num < 8) {
|
|
||||||
this.pageIndex = 0;
|
this.pageIndex = 0;
|
||||||
}
|
}
|
||||||
this.isNext = true;
|
this.isNext = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user