From 2441c76cc6e278af6e74ee0e5f91b21a3e06908f Mon Sep 17 00:00:00 2001 From: weinan2087 Date: Mon, 17 Oct 2022 15:26:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=8F=E9=AA=8C=E5=80=BC?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E8=BF=9B=E5=BA=A6=E6=9D=A1=E6=A6=9C=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ucurrency/Index.vue | 52 +++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 14 deletions(-) diff --git a/src/views/ucurrency/Index.vue b/src/views/ucurrency/Index.vue index 0b901067..a51e488b 100644 --- a/src/views/ucurrency/Index.vue +++ b/src/views/ucurrency/Index.vue @@ -57,10 +57,13 @@ {{currentUserRankingData.total || currentUserRankingData.months || currentUserRankingData.years || currentUserRankingData.weeks}} -
-
{{currentUserRankingData.total}}/{{current.endValue}}
+
+
{{currentUserRankingData.total || currentUserRankingData.months || currentUserRankingData.years || currentUserRankingData.weeks}}/{{current.endValue}}
- +
@@ -308,7 +311,10 @@ avatar: "", sex: null } - this.getUserData([res.result.currentUserRankingData.aid], [res.result.currentUserRankingData]) + this.getUserData([res.result.currentUserRankingData.aid], [res.result.currentUserRankingData]) + if (res.result.currentUserRankingData.total == undefined) { + res.result.currentUserRankingData.total = 0; + } if (res.result.currentUserRankingData.weeks == undefined) { res.result.currentUserRankingData.weeks = 0; } @@ -318,16 +324,34 @@ if (res.result.currentUserRankingData.years == undefined) { res.result.currentUserRankingData.years = 0; } - this.currentUserRankingData = res.result.currentUserRankingData; console.log() - if (res.result.currentUserRankingData.total >= 0) { - this.current = this.experienceValue(res.result.currentUserRankingData.total); - } else if (res.result.currentUserRankingData.weeks >= 0) { - this.current = this.experienceValue(res.result.currentUserRankingData.weeks); - } else if (res.result.currentUserRankingData.months >= 0) { - this.current = this.experienceValue(res.result.currentUserRankingData.months); - } else if (res.result.currentUserRankingData.years >= 0) { - this.current = this.experienceValue(res.result.currentUserRankingData.years); - } + this.currentUserRankingData = res.result.currentUserRankingData; + // if (res.result.currentUserRankingData.total >= 0) { + // console.log("11"); + // this.current = this.experienceValue(res.result.currentUserRankingData.total); + // } else if (res.result.currentUserRankingData.weeks >= 0) { + // console.log("22"); + // this.current = this.experienceValue(res.result.currentUserRankingData.weeks); + // } else if (res.result.currentUserRankingData.months >= 0) { + // console.log("33"); + // this.current = this.experienceValue(res.result.currentUserRankingData.months); + // } else if (res.result.currentUserRankingData.years >= 0) { + // console.log("44"); + // this.current = this.experienceValue(res.result.currentUserRankingData.years); + // } + if(this.cycle == 'total'){ + this.current = this.experienceValue(res.result.currentUserRankingData.total); + } + if(this.cycle == 'weeks'){ + this.current = this.experienceValue(res.result.currentUserRankingData.weeks); + } + if(this.cycle == 'months'){ + this.current = this.experienceValue(res.result.currentUserRankingData.months); + } + if(this.cycle == 'years'){ + this.current = this.experienceValue(res.result.currentUserRankingData.years); + } + + } const ids = [];