From d5f304e458316d9b3fbb5b9722328935c4a9bb99 Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Wed, 28 Sep 2022 19:17:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=98=BE=E7=A4=BA=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=B4=AF=E8=AE=A1U=E5=B8=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ucurrency/Index.vue | 60 ++++++++++++++++++++--------------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index b46db8da..05169a8e 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -2,8 +2,8 @@
-
我的U币:367
U币规则 - 导出记录 +
我的U币:{{uinfo.uCurrency}}
U币规则 + 导出记录
@@ -14,18 +14,18 @@

{{day.dayNmae}}

-
{{getUType(info.eventKey)}}
+
{{info.content}}
{{info.uvalue > 0? '+':''}} {{info.uvalue}}
- +

最近7天你可能太忙了,快开始 努力获得U币吧

- +
@@ -44,7 +44,7 @@ 本月 本年 - +
@@ -99,7 +99,7 @@
{{currentUserRankingData.total}}
- + - +
@@ -197,7 +197,7 @@ export default{ computed: { ...mapGetters(['userInfo']), - + }, components: {authorImg,author}, data(){ @@ -225,15 +225,19 @@ uCoinRecord:[], chart:null, currentUserRankingData:{}, - rankingData:[] + rankingData:[], + uinfo:{ + uCurrency:0 // 用户累计U币 + }, } }, mounted() { this.getList(); this.getRanking(); + this.getLevel(); }, methods:{ - + handleCommand(e) { this.cycle = e; this.name = this.translate(e) @@ -271,7 +275,7 @@ this.current = this.experienceValue(res.result.currentUserRankingData.years); } } - + const ids= []; res.result.rankingData.forEach(item=>{ ids.push(item.aid) @@ -381,7 +385,7 @@ }) } let chatData = []; - + for(let key in res.result.chatData){ chatData.push({ value:res.result.chatData[key], @@ -391,14 +395,21 @@ this.initChat(chatData); } }) - } + }, + getLevel(){//获取用户累计U币 + apiStat.getUserStatTotalInfo(this.userInfo.aid).then(res=>{ + if(res.status == 200) { + this.uinfo.uCurrency = res.result.coinValue; + } + }); + }, } } - \ No newline at end of file