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) {