mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
案例
This commit is contained in:
@@ -199,12 +199,15 @@
|
||||
<div class="case-tittext">
|
||||
<span class="title-line-ellipsis" v-html="item.title"></span>
|
||||
</div>
|
||||
<div class="case-activeText" @click.stop="toExcellent(item)">
|
||||
<span v-if="item.breCommend" class="comWords"
|
||||
<div class="case-activeText">
|
||||
<!-- <span v-if="item.breCommend" class="comWords"
|
||||
style="background-color:rgba(232, 139, 72);">荐</span>
|
||||
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span>
|
||||
<span class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 3px 12px 4px 9px;">
|
||||
2024年度最佳
|
||||
<span v-if="item.excellent" class="comWords" style="background-color:red;">最佳</span> -->
|
||||
<span v-if="item.excellentTag" class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 3px 12px 4px 9px;">
|
||||
{{item.excellentTag}}
|
||||
</span>
|
||||
<span @click.stop="toExcellent(tag)" v-if="item.viewRankTags.length != 0" v-for="tag in item.viewRankTags" class="comWords" style="width: 98px;height: 24px;background: #F99000;border-radius: 2px;font-weight: 400;font-size: 12px;color: #FFFFFF;padding: 3px 12px 4px 9px;">
|
||||
{{tag.tagName}}
|
||||
</span>
|
||||
</div>
|
||||
<div class="case-info-date portal-time">
|
||||
@@ -217,7 +220,7 @@
|
||||
<!-- </router-link> -->
|
||||
<div style="height:58px;padding-top:14px ">
|
||||
<author :avatar="item.authorInfo.avatar" :name="item.authorInfo.name" :info="item.authorInfo.orgInfo"
|
||||
:sex="item.authorInfo.sex" :aid="item.authorInfo.aid">
|
||||
:sex="item.authorInfo.sex" :authorTags="item.authorTags" :aid="item.authorInfo.aid">
|
||||
<template>
|
||||
<div v-if="item.breCommend"
|
||||
style="padding-top: 6px;flex: 1;display: flex;justify-content: flex-end;color: #999;font-size: 12px;">
|
||||
@@ -531,7 +534,7 @@ export default {
|
||||
caseType: '',
|
||||
authorName: '',
|
||||
notInIds: [],
|
||||
type: 'excellent',
|
||||
type: 'all',
|
||||
userId: '',
|
||||
parent: '',
|
||||
children: [],
|
||||
@@ -916,8 +919,7 @@ export default {
|
||||
this.$router.push({ path: '/case/detail', query: { id } });
|
||||
},
|
||||
toExcellent(item){
|
||||
console.log(item,'xixi')
|
||||
this.$router.push({path:'/case/excellent',query:{id:item.id}})
|
||||
this.$router.push({path:'/case/excellent',query:{majorId:item.majorId,majorName:item.majorName,riseRankTime:item.riseRankTime.split(' ')[0]}})
|
||||
},
|
||||
tylClick() {
|
||||
window.open("https://m.qingxuetang.com/x/?appId=qxtcorp306130");
|
||||
@@ -1228,6 +1230,8 @@ export default {
|
||||
if(this.pubTimeNum != 0){
|
||||
this.pageViewNum = 0;
|
||||
}
|
||||
this.queryCondition.orderField = 'sysCreateTime'
|
||||
this.queryCondition.orderAsc = this.pubTimeNum == 2 ? true : this.pubTimeNum == 1 ? false : ''
|
||||
this.search(true);
|
||||
},
|
||||
searchPageView(){
|
||||
@@ -1238,6 +1242,8 @@ export default {
|
||||
if(this.pageViewNum != 0){
|
||||
this.pubTimeNum = 0;
|
||||
}
|
||||
this.queryCondition.orderField = 'views'
|
||||
this.queryCondition.orderAsc = this.pageViewNum == 2 ? true : this.pageViewNum == 1 ? false : ''
|
||||
this.search(true);
|
||||
},
|
||||
searchexcellent(num) {
|
||||
@@ -1410,8 +1416,74 @@ export default {
|
||||
// this.caseList.list = [];
|
||||
// }
|
||||
this.moreState = 2;
|
||||
this.queryCondition.pubTimeNum = this.pubTimeNum
|
||||
this.queryCondition.pageViewNum = this.pageViewNum
|
||||
// this.queryCondition.pubTimeNum = this.pubTimeNum
|
||||
// this.queryCondition.pageViewNum = this.pageViewNum
|
||||
if(this.queryCondition.type == 'collect'){
|
||||
const params = {
|
||||
pageIndex:this.queryCondition.pageIndex,
|
||||
pageSize:10,
|
||||
orderField:this.queryCondition.orderField,
|
||||
orderAsc:this.queryCondition.orderAsc
|
||||
}
|
||||
await apiCase.queryFavoriteCaseOfIndex(params).then(res=>{
|
||||
if(res.status == 200){
|
||||
if(res.result.list.length > 0){
|
||||
this.isSeach = false;
|
||||
res.result.list.forEach(item => {
|
||||
item.majorType = item.majorType ? item.majorType.split(",") : [];
|
||||
item.isAll = false;
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
};
|
||||
});
|
||||
this.caseList.list = res.result.list
|
||||
console.log(res.result.list ,'有没有1111数据')
|
||||
this.getCaseUserData(res.result.list);
|
||||
// 给所有的赋值
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.showPagCount = res.result.count;
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
if(this.queryCondition.type=='time'){
|
||||
const data = {
|
||||
pageIndex: this.queryCondition.pageIndex,
|
||||
pageSize: 10,
|
||||
contentType: 3,
|
||||
aid: this.userInfo.aid || '965628977500655616',
|
||||
hidden: '',
|
||||
}
|
||||
await apiCase.queryViewRecord(data).then(res=>{
|
||||
if(res.status == 200){
|
||||
if(res.result.list.length > 0){
|
||||
this.isSeach = false;
|
||||
res.result.list.forEach(item => {
|
||||
item.majorType = item.majorType ? item.majorType.split(",") : [];
|
||||
item.isAll = false;
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
};
|
||||
});
|
||||
this.caseList.list = res.result.list
|
||||
this.getCaseUserData(res.result.list);
|
||||
// 给所有的赋值
|
||||
this.caseList.count = res.result.count;
|
||||
this.caseList.showPagCount = res.result.count;
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
await apiCase.queryListV2(this.queryCondition).then((res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.result.list.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user