From 7fcbe22c3d16caaaf8966e867436e444188d671f Mon Sep 17 00:00:00 2001 From: Kokomi <592981798@qq.com> Date: Tue, 8 Nov 2022 14:42:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3enka=E5=A4=A9=E8=B5=8B?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/profile-data/enka-data.js | 9 ++++++--- models/ProfileRank.js | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/profile-data/enka-data.js b/components/profile-data/enka-data.js index eec49775..e3ecac18 100644 --- a/components/profile-data/enka-data.js +++ b/components/profile-data/enka-data.js @@ -171,11 +171,14 @@ let EnkaData = { let tid = talentId[id] key = talentKey[tid] elem = elem || talentElem[tid] + ret[key] = { + original: lv + } } else { key = ['a', 'e', 'q'][idx++] - } - ret[key] = ret[key] || { - original: lv + ret[key] = ret[key] || { + original: lv + } } }) return { diff --git a/models/ProfileRank.js b/models/ProfileRank.js index 63200a73..7a2223d3 100644 --- a/models/ProfileRank.js +++ b/models/ProfileRank.js @@ -21,12 +21,12 @@ export default class ProfileRank { return false } const key = this.key(profile, 'mark') - let rank = await redis.zRank(key, this.uid) + let rank = await redis.zRevRank(key, this.uid) if (!lodash.isNumber(rank) || force) { let mark = profile.getArtisMark(false) if (mark) { await redis.zAdd(key, { score: mark._mark, value: this.uid }) - rank = await redis.zRank(key, this.uid) + rank = await redis.zRevRank(key, this.uid) } } if (lodash.isNumber(rank)) {