diff --git a/public/images/homeWu/u-close.png b/public/images/homeWu/u-close.png index 046668e4..4ea9b1b4 100644 Binary files a/public/images/homeWu/u-close.png and b/public/images/homeWu/u-close.png differ diff --git a/src/api/phase2/stat.js b/src/api/phase2/stat.js index 4236fb75..84615ed1 100644 --- a/src/api/phase2/stat.js +++ b/src/api/phase2/stat.js @@ -116,7 +116,7 @@ const exportUserCoinRecord = function(aid) { } */ const getRanking = function(queryData) { - return ajax.post(baseURL,'/xboe/m/stat/user/ranking',queryData); + return ajax.postJson(baseURL,'/xboe/m/stat/user/ranking',queryData); } diff --git a/src/components/UcHeader/Index.vue b/src/components/UcHeader/Index.vue index 2c079cd5..ac3983bb 100644 --- a/src/components/UcHeader/Index.vue +++ b/src/components/UcHeader/Index.vue @@ -161,9 +161,9 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; }, methods:{ getLevel(){//获取经验值和等级 - apiStart.getUserEValueAndLevel(this.userInfo.aid).then(res=>{ + apiStart.getUserStatTotalInfo(this.userInfo.aid).then(res=>{ if(res.status == 200) { - this.userData.evalue = res.result.evalue; + this.userData.evalue = res.result.experienceValue; this.userData.level = res.result.level; } }); diff --git a/src/icons/svg/doubt.svg b/src/icons/svg/doubt.svg new file mode 100644 index 00000000..59f48bd3 --- /dev/null +++ b/src/icons/svg/doubt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/homepage/page.vue b/src/views/homepage/page.vue index 9b8c26c3..0e9dd393 100644 --- a/src/views/homepage/page.vue +++ b/src/views/homepage/page.vue @@ -88,7 +88,7 @@ import apiUser from "@/api/system/user.js"; import {cutFullName} from "@/utils/tools.js"; import apiDict from "@/api/modules/dict.js"; -import ItemVue from '../../layout/components/Sidebar/Item.vue' + import ItemVue from '../../layout/components/Sidebar/Item.vue' export default{ components:{top,UcHeader,CaseList,CourseList,NoteList,PutList,AnswerList,ArticleList,FollowList,BookList}, diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index d4a31064..ddae2d53 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -2,7 +2,7 @@
-
我的U币:367
U币规则 +
我的U币:367
U币规则 导出记录
@@ -23,29 +23,29 @@
- 经验值排行榜 + 经验值排行榜
- - - 累计 - - - 累计 - 本周 - 本月 - 本年 - + + + 累计 + + + 累计 + 本周 + 本月 + 本年 +
- 我的排名 : 128 + 我的排名 : {{currentUserRankingData.rankingNo}}
- 我的经验值 : 367 + 我的经验值 : {{currentUserRankingData.total}}
@@ -58,52 +58,25 @@ LV2
-
+
排名
姓名
部门
经验值
-
-
-
-
小李
-
BOE / 企划中心 / 数据资产部
+
+
+
+ + + +
{{index+1}}
+
+
{{ran.authorInfo.name}}
+
{{ran.authorInfo.orgInfo}}
-
1093
-
-
-
-
-
小李
-
BOE / 企划中心 / 数据资产部
-
-
1093
-
-
-
-
-
小李
-
BOE / 企划中心 / 数据资产部
-
-
1093
-
-
-
-
4
-
小李
-
BOE / 企划中心 / 数据资产部
-
-
1093
-
-
-
-
5
-
小李
-
BOE / 企划中心 / 数据资产部
-
-
1093
+
{{ran.total}}
@@ -111,11 +84,11 @@
.
.
.
-
128
-
小李
-
BOE / 企划中心 / 数据资产部
+
{{currentUserRankingData.rankingNo}}
+
{{currentUserRankingData.authorInfo.name}}
+
{{currentUserRankingData.authorInfo.orgInfo}}
-
1093
+
{{currentUserRankingData.total}}
@@ -130,7 +103,8 @@

U币规则

学员每日通过积分规则获得积分的上限为150积分,当天达到上限后,将 不能通过积分规则获得积分

-
+
+

学习

@@ -177,23 +151,24 @@ label="描述" width="180">
+
+
@@ -206,38 +181,104 @@ import apiStat from '@/api/phase2/stat.js'; import { mapGetters } from 'vuex'; import {getUType} from '@/utils/tools.js' + import authorImg from '@/components/Portal/authorImg.vue'; + import author from '@/components/Portal/authorInfo.vue'; + import apiUser from "@/api/system/user.js"; import * as echarts from 'echarts' export default{ computed: { ...mapGetters(['userInfo']), }, - components: {}, + components: {authorImg,author}, data(){ return{ + cycle:'total', getUType, dialogVisible:false, tableData:[ - {name:'试听学习',hear:['每日累计学习10分钟','每日累计学习20分钟','每日累计学习30分钟','每日累计学习45分钟','每日累计学习60分钟',],value:[10,20,30,40,50],upperlimit:50}, - {name:'案例学习',hear:['完成一个案例的阅读(最低三分钟)',],value:[5],upperlimit:30}, - {name:'文章学习',hear:['完成一个文章的阅读(最低2分钟)',],value:[5],upperlimit:30}, + {name:'试听学习',hear:['每日累计学习10分钟','每日累计学习20分钟','每日累计学习30分钟','每日累计学习45分钟','每日累计学习60分钟',],value:['+10','+20','+30','+40',"+50"],upperlimit:50}, + {name:'案例学习',hear:['完成一个案例的阅读',],value:['+5'],upperlimit:30,label:'(最低3分钟)'}, + {name:'文章学习',hear:['完成一个文章的阅读',],value:['+5'],upperlimit:30,label:'(最低2分钟)'}, ], tableList:[ - {name:'发布音视频课程',hear:['完成一个案音视频课',],value:[60],upperlimit:null}, - {name:'面授课记录',hear:['有一个完成的面授课记录(<4h)','有一个完成的面授课记录(>=4h)'],value:[40,60],upperlimit:null}, - {name:'发布文章',hear:['每发布1篇文章',],value:[40],upperlimit:null}, - {name:'发布案例',hear:['每发布1篇案例',],value:[50],upperlimit:null}, - {name:'发布笔记',hear:['每发布公开笔记1篇',],value:[5],upperlimit:30}, - {name:'发表评论',hear:['在课程,问答,案例中发表1个评论',],value:[2],upperlimit:20}, + {name:'发布音视频课程',hear:['完成一个案音视频课',],value:['+60'],upperlimit:null}, + {name:'面授课记录',hear:['有一个完成的面授课记录(<4h)','有一个完成的面授课记录(>=4h)'],value:['+40','+60'],upperlimit:null}, + {name:'发布文章',hear:['每发布1篇文章',],value:['+40'],upperlimit:null}, + {name:'发布案例',hear:['每发布1篇案例',],value:['+50'],upperlimit:null}, + {name:'发布笔记',hear:['每发布公开笔记1篇',],value:["+5"],upperlimit:30}, + {name:'发表评论',hear:['在课程,问答,案例中发表1个评论',],value:['+2'],upperlimit:20}, ], uCoinRecord:[], chart:null, + currentUserRankingData:{}, + rankingData:[] } }, mounted() { this.getList(); + this.getRanking(); }, methods:{ + handleCommand(e) { + this.cycle = e; + this.getRanking(); + }, + getRanking() { + let data = { + aid:this.userInfo.aid,// #用户id + statType:20, // #统计类型 10学习时长 11 学习天数 20表经验值 30表u币 40表获取天数 + field:this.cycle,// #统计周期 todays-当天,weeks-周,months-月,years-年 total-总计 + num:4,// #显示的条数 + } + apiStat.getRanking(data).then(res=>{ + if(res.status==200){ + res.result.currentUserRankingData.authorInfo={ + aid: "", + name: "", + orgInfo: "", + avatar: "", + sex: null + } + this.getUserData([res.result.currentUserRankingData.aid],[res.result.currentUserRankingData]) + this.currentUserRankingData = res.result.currentUserRankingData; + console.log(this.currentUserRankingData,'this.currentUserRankingData'); + const ids= []; + res.result.rankingData.forEach(item=>{ + item.aid = '952948626497724414' + ids.push(item.aid) + item.authorInfo = { + aid: "", + name: "", + orgInfo: "", + avatar: "", + sex: null + } + }) + this.getUserData(ids,res.result.rankingData) + this.rankingData = res.result.rankingData; + } + }) + }, + getUserData(ids,list) { + const noReapetIds = [...new Set(ids)]; + apiUser.getByIds(noReapetIds).then(res => { + if (res.status == 200) { + list.forEach((item, index) => { + res.result.some(author => { + if (author.aid == item.aid) { + item.authorInfo = author; + return true; + } else { + return false; + } + }); + }); + } else { + this.$message.error(res.message); + } + }); + }, exportRecord() { let urlPre=window.location.protocol+'//'+window.location.host; window.open(urlPre + '/xboe/m/stat/usercoinrecord/export?aid='+this.userInfo.aid) @@ -329,12 +370,26 @@