mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
去掉学习时长和经验排行榜
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
color: '#333333',
|
||||
fontWeight: '600',
|
||||
}"></u-tabs>
|
||||
<view v-show="activeTab == 0">
|
||||
<!-- <view v-show="activeTab == 0">
|
||||
<view class="box-info-top">
|
||||
<text class="top-text">我的排名:<text class="text-num">{{experience.data.rankingNo}}</text></text>
|
||||
<text class="top-text" style="margin-left: 30upx;">我的经验值:<text class="text-num">{{experience.data.total}}</text></text>
|
||||
@@ -48,15 +48,14 @@
|
||||
</view>
|
||||
<view class="table-cell-tow">
|
||||
<author-img :avatar="userInfo.avatar" :sex="userInfo.sex"></author-img>
|
||||
<!-- <image style="width: 80upx;height:80upx;vertical-align: middle;" src="../../static/images/woman.png" mode=""></image> -->
|
||||
<text class="table-cell-tow-name" style="color:#326DFF">{{userInfo.name}}</text>
|
||||
<text class="table-cell-tow-org" style="color:#326DFF">{{cutOrgNamePath(userInfo.departFullName)}}</text>
|
||||
</view>
|
||||
<view class="table-cell-three" style="color:#326DFF">{{experience.data.total}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="activeTab == 1">
|
||||
</view> -->
|
||||
<!-- <view v-show="activeTab == 1">
|
||||
<view class="box-info-top">
|
||||
<text class="top-text">我的排名:<text class="text-num">{{learningDuration.data.rankingNo}}</text></text>
|
||||
<text class="top-text" style="margin-left: 30upx;">我的学习时长:<text class="text-num">{{formatSecondToHour(learningDuration.data.total)}}</text>h</text>
|
||||
@@ -92,14 +91,13 @@
|
||||
</view>
|
||||
<view class="table-cell-tow">
|
||||
<author-img :avatar="userInfo.avatar" :sex="userInfo.sex"></author-img>
|
||||
<!-- <image style="width: 80upx;height:80upx;vertical-align: middle;" src="../../static/images/woman.png" mode=""></image> -->
|
||||
<text class="table-cell-tow-name" style="color:#326DFF">{{userInfo.name}}</text>
|
||||
<text class="table-cell-tow-org" style="color:#326DFF">{{cutOrgNamePath(userInfo.departFullName)}}</text>
|
||||
</view>
|
||||
<view class="table-cell-three" style="color:#326DFF">{{formatSecondToHour(learningDuration.data.total)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-show="activeTab == 2">
|
||||
<view class="box-info-top">
|
||||
<text class="top-text">我的排名:<text class="text-num">{{learningDays.data.rankingNo}}</text></text>
|
||||
@@ -158,11 +156,11 @@
|
||||
formatSecondToHour,
|
||||
cutOrgNamePath,
|
||||
tabList:[
|
||||
{ name: '经验值'},
|
||||
{ name: '学习时长'},
|
||||
// { name: '经验值'},
|
||||
// { name: '学习时长'},
|
||||
{ name: '学习天数'},
|
||||
],
|
||||
activeTab:0,
|
||||
activeTab:2,
|
||||
rankingList:{},
|
||||
userInfo:{},
|
||||
learningDays:{
|
||||
@@ -203,8 +201,8 @@
|
||||
onLoad(options) {
|
||||
this.$store.dispatch('GetUserInfo').then(rs => {
|
||||
this.userInfo = rs;
|
||||
this.getExperience();
|
||||
this.getDuration();
|
||||
// this.getExperience();
|
||||
// this.getDuration();
|
||||
this.getDays();
|
||||
this.userInfo.avatar = this.userInfo.avatar.substring(this.userInfo.avatar.indexOf("upload")+6);
|
||||
});
|
||||
@@ -214,72 +212,72 @@
|
||||
back(){
|
||||
uni.navigateBack();
|
||||
},
|
||||
clickTabs(item) {
|
||||
this.activeTab = item.index;
|
||||
},
|
||||
getExperience() {//经验值
|
||||
let data = {
|
||||
aid:this.userInfo.aid,// #用户id
|
||||
statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
res.result.currentUserRankingData.authorInfo={
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
this.experience.data = res.result.currentUserRankingData;
|
||||
}
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
})
|
||||
this.getUserData(ids,res.result.rankingData)
|
||||
this.experience.list = res.result.rankingData;
|
||||
}
|
||||
})
|
||||
},
|
||||
getDuration() {//学习时长
|
||||
let data = {
|
||||
aid:this.userInfo.aid,// #用户id
|
||||
statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
num:5,// #显示的条数
|
||||
}
|
||||
apiStat.getRanking(data).then(res=>{
|
||||
if(res.status==200){
|
||||
if(res.result.currentUserRankingData) {
|
||||
this.learningDuration.data = res.result.currentUserRankingData;
|
||||
}
|
||||
const ids= [];
|
||||
res.result.rankingData.forEach(item=>{
|
||||
ids.push(item.aid)
|
||||
item.authorInfo = {
|
||||
aid: "",
|
||||
name: "",
|
||||
orgInfo: "",
|
||||
avatar: "",
|
||||
sex: null
|
||||
}
|
||||
})
|
||||
this.getUserData(ids,res.result.rankingData)
|
||||
this.learningDuration.list = res.result.rankingData;
|
||||
}
|
||||
})
|
||||
},
|
||||
// clickTabs(item) {
|
||||
// this.activeTab = item.index;
|
||||
// },
|
||||
// getExperience() {//经验值
|
||||
// let data = {
|
||||
// aid:this.userInfo.aid,// #用户id
|
||||
// statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
// field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
// num:5,// #显示的条数
|
||||
// }
|
||||
// apiStat.getRanking(data).then(res=>{
|
||||
// if(res.status==200){
|
||||
// if(res.result.currentUserRankingData) {
|
||||
// res.result.currentUserRankingData.authorInfo={
|
||||
// aid: "",
|
||||
// name: "",
|
||||
// orgInfo: "",
|
||||
// avatar: "",
|
||||
// sex: null
|
||||
// }
|
||||
// this.experience.data = res.result.currentUserRankingData;
|
||||
// }
|
||||
// const ids= [];
|
||||
// res.result.rankingData.forEach(item=>{
|
||||
// ids.push(item.aid)
|
||||
// item.authorInfo = {
|
||||
// aid: "",
|
||||
// name: "",
|
||||
// orgInfo: "",
|
||||
// avatar: "",
|
||||
// sex: null
|
||||
// }
|
||||
// })
|
||||
// this.getUserData(ids,res.result.rankingData)
|
||||
// this.experience.list = res.result.rankingData;
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// getDuration() {//学习时长
|
||||
// let data = {
|
||||
// aid:this.userInfo.aid,// #用户id
|
||||
// statType:10, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数
|
||||
// field:'total',// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计
|
||||
// num:5,// #显示的条数
|
||||
// }
|
||||
// apiStat.getRanking(data).then(res=>{
|
||||
// if(res.status==200){
|
||||
// if(res.result.currentUserRankingData) {
|
||||
// this.learningDuration.data = res.result.currentUserRankingData;
|
||||
// }
|
||||
// const ids= [];
|
||||
// res.result.rankingData.forEach(item=>{
|
||||
// ids.push(item.aid)
|
||||
// item.authorInfo = {
|
||||
// aid: "",
|
||||
// name: "",
|
||||
// orgInfo: "",
|
||||
// avatar: "",
|
||||
// sex: null
|
||||
// }
|
||||
// })
|
||||
// this.getUserData(ids,res.result.rankingData)
|
||||
// this.learningDuration.list = res.result.rankingData;
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
//学习天数
|
||||
getDays() {
|
||||
let data = {
|
||||
|
||||
Reference in New Issue
Block a user