From 821c080d1ff9707393e385ea8899a3252f79cfbe Mon Sep 17 00:00:00 2001 From: Kokomi <102026640+yoimiya-kokomi@users.noreply.github.com> Date: Tue, 9 May 2023 11:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3user=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E6=97=B6ltuid=E8=AE=B0=E5=BD=95=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/genshin/model/mys/NoteUser.js | 3 ++- plugins/genshin/model/user.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/genshin/model/mys/NoteUser.js b/plugins/genshin/model/mys/NoteUser.js index 3dd0abb..b5a7cac 100644 --- a/plugins/genshin/model/mys/NoteUser.js +++ b/plugins/genshin/model/mys/NoteUser.js @@ -88,11 +88,12 @@ export default class NoteUser extends BaseModel { /** * 创建NoteUser实例 * @param qq NoterUser对应id(qq) + * @param db * * 若传入e对象则会识别e.user_id,并将user对象添加至e.user * @param data 用户对应MysCookie数据,为空则自动读取 * @returns {Promise} */ - static async create (qq, db) { + static async create (qq, db = false) { // 兼容处理传入e if (qq && qq.user_id) { let e = qq diff --git a/plugins/genshin/model/user.js b/plugins/genshin/model/user.js index 3d86c42..3d9837a 100644 --- a/plugins/genshin/model/user.js +++ b/plugins/genshin/model/user.js @@ -302,12 +302,12 @@ export default class User extends base { } async loadOldData (data) { - let ltuids = {} let count = 0 if (!lodash.isPlainObject(data)) { return } for (let u in data) { + let ltuids = {} let v = data[u] let qq for (let k in v) {