Merge branch 'zcwy_0806_paihangb' into dev_master

This commit is contained in:
nisen
2024-10-17 17:42:12 +08:00

View File

@@ -382,7 +382,7 @@ export default {
aid:this.userInfo.aid,// #用户id
statType:21, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
field:this.experience.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
num:5,// #显示的条数
num:10,// #显示的条数
}
if(data.field == 'now'){
data.statType = 20
@@ -421,8 +421,26 @@ export default {
sex: null
}
})
this.getUserData(ids,res.result.rankingData)
this.experience.list = res.result.rankingData;
// this.getUserData(ids,res.result.rankingData)
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(rs => {
if (rs.status == 200) {
const listData = []
rs.result.forEach((item, index) => {
res.result.rankingData.forEach(author => {
if (author.aid == item.aid) {
author.authorInfo = item;
listData.push(author)
}
});
});
this.experience.list = listData.sort((a,b)=>{
return b.total-a.total
}).slice(0,5);
} else {
this.$message.error(res.message);
}
});
}
})
},
@@ -431,7 +449,7 @@ export default {
aid:this.userInfo.aid,// #用户id
statType:12, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
field:this.learningDuration.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
num:5,// #显示的条数
num:10,// #显示的条数
}
if(data.field == 'now'){
data.statType = 10
@@ -469,8 +487,26 @@ export default {
sex: null
}
})
this.getUserData(ids,res.result.rankingData)
this.learningDuration.list = res.result.rankingData;
// this.getUserData(ids,res.result.rankingData)
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(rs => {
if (rs.status == 200) {
const listData = []
rs.result.forEach((item, index) => {
res.result.rankingData.forEach(author => {
if (author.aid == item.aid) {
author.authorInfo = item;
listData.push(author)
}
});
});
this.learningDuration.list = listData.sort((a,b)=>{
return b.total-a.total
}).slice(0,5);
} else {
this.$message.error(res.message);
}
});
}
})
},
@@ -480,7 +516,7 @@ export default {
aid:this.userInfo.aid,// #用户id
statType:11, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
field:this.learningDays.field,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
num:5,// #显示的条数
num:10,// #显示的条数
}
if(data.field == 'now'){
data.statType = 13
@@ -517,8 +553,26 @@ export default {
sex: null
}
})
this.getUserData(ids,res.result.rankingData)
this.learningDays.list = res.result.rankingData;
// this.getUserData(ids,res.result.rankingData)
const noReapetIds = [...new Set(ids)];
apiUser.getByIds(noReapetIds).then(rs => {
if (rs.status == 200) {
const listData = []
rs.result.forEach((item, index) => {
res.result.rankingData.forEach(author => {
if (author.aid == item.aid) {
author.authorInfo = item;
listData.push(author)
}
});
});
this.learningDays.list = listData.sort((a,b)=>{
return b.total-a.total
}).slice(0,5);
} else {
this.$message.error(res.message);
}
});
}
})
},