还原 查询条件

This commit is contained in:
daihh
2022-06-02 19:42:25 +08:00
parent df1487c04f
commit cae843fab1

View File

@@ -71,7 +71,7 @@
<div class="course-author-left" > <div class="course-author-left" >
{{ course.authorInfo.name }} {{ course.authorInfo.name }}
</div> </div>
<div style="flex:1; text-align: center; "> <div style="flex:1; text-align: center; ">
<span class="study-num">{{ course.studys }}人学习</span> <span class="study-num">{{ course.studys }}人学习</span>
</div> </div>
<div style="padding-left:15px"> <div style="padding-left:15px">
@@ -108,9 +108,9 @@
</div> </div>
<!-- 推荐案例 --> <!-- 推荐案例 -->
<!-- <div class="modules"> <!-- <div class="modules">
<div class="modules-title"> <div class="modules-title">
<span class="modules-text">推荐案例</span> <span class="modules-text">推荐案例</span>
<span class="quyer-tag"> <span class="quyer-tag">
<a :class="caseList.orderType==1?'current':''" @click="changeCaseOrder(1)">最新</a> <a :class="caseList.orderType==1?'current':''" @click="changeCaseOrder(1)">最新</a>
@@ -119,7 +119,7 @@
<span class="more"><router-link to="/case">更多&nbsp;></router-link></span> <span class="more"><router-link to="/case">更多&nbsp;></router-link></span>
</div> </div>
<el-row :gutter="15" class="modules-list"> <el-row :gutter="15" class="modules-list">
<el-col :span="12" v-for="ca in caseList.list" :key="ca.id"> <el-col :span="12" v-for="ca in caseList.list" :key="ca.id">
<el-card class="case-card" :body-style="{ padding: '16px' }"> <el-card class="case-card" :body-style="{ padding: '16px' }">
<div class="case-info-image-box" v-if="ca.coverUrl && ca.coverUrl.length > 0"> <div class="case-info-image-box" v-if="ca.coverUrl && ca.coverUrl.length > 0">
@@ -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;
@@ -406,9 +390,9 @@ export default {
} else { } else {
console.log('加载课程信息失败:' + res.error); console.log('加载课程信息失败:' + res.error);
} }
}); });
// apiCourse.list({orderType,num,device:1}).then(res => { // apiCourse.list({orderType,num,device:1}).then(res => {
// if(res.status==200){ // if(res.status==200){
@@ -552,7 +536,7 @@ export default {
res.result.some(author => { res.result.some(author => {
if (author.aid == item.authorInfo.aid) { if (author.aid == item.authorInfo.aid) {
item.authorInfo = author; item.authorInfo = author;
return true; return true;
} else { } else {
return false; return false;
@@ -952,7 +936,7 @@ export default {
color: #343434; color: #343434;
margin-bottom: 5px; margin-bottom: 5px;
margin-top: 5px; margin-top: 5px;
.article-info-time { .article-info-time {
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;