调整UID记录逻辑,防止刷新时导致的UID绑定丢失

This commit is contained in:
Kokomi 2023-06-04 05:08:33 +08:00
parent 97fc00231e
commit 2c35bf1153
1 changed files with 4 additions and 1 deletions

View File

@ -289,7 +289,10 @@ export default class NoteUser extends BaseModel {
game = this.gameKey(game) game = this.gameKey(game)
if (uid < 100 || !uid) { if (uid < 100 || !uid) {
let uids = this.getUidList(game) let uids = this.getUidList(game)
uid = (uids[uid] || uids[0]).uid || '' uid = (uids?.[uid] || uids?.[0])?.uid || ''
}
if (!uid) {
return false
} }
if (this.hasUid(uid, game)) { if (this.hasUid(uid, game)) {
let gameDs = this.getGameDs(game) let gameDs = this.getGameDs(game)