From f245239ddd363244a3919ab4e0ea4fd2db5df63a Mon Sep 17 00:00:00 2001 From: lmj <3407000732@qq.com> Date: Tue, 6 Dec 2022 16:20:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=AD=A6=E4=B9=A0=E6=97=B6?= =?UTF-8?q?=E9=95=BF=E5=92=8C=E7=BB=8F=E9=AA=8C=E6=8E=92=E8=A1=8C=E6=A6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/my/rankingList.vue | 152 +++++++++++++++++++-------------------- 1 file changed, 75 insertions(+), 77 deletions(-) diff --git a/pages/my/rankingList.vue b/pages/my/rankingList.vue index 5379377..080fe3e 100644 --- a/pages/my/rankingList.vue +++ b/pages/my/rankingList.vue @@ -12,7 +12,7 @@ color: '#333333', fontWeight: '600', }"> - + {{userInfo.name}} {{cutOrgNamePath(userInfo.departFullName)}} {{experience.data.total}} - - + --> + {{userInfo.name}} {{cutOrgNamePath(userInfo.departFullName)}} {{formatSecondToHour(learningDuration.data.total)}} - + --> 我的排名:{{learningDays.data.rankingNo}} @@ -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 = {