修正user初始化时ltuid记录错误的问题
This commit is contained in:
parent
7268865d15
commit
821c080d1f
|
@ -88,11 +88,12 @@ export default class NoteUser extends BaseModel {
|
||||||
/**
|
/**
|
||||||
* 创建NoteUser实例
|
* 创建NoteUser实例
|
||||||
* @param qq NoterUser对应id(qq)
|
* @param qq NoterUser对应id(qq)
|
||||||
|
* @param db
|
||||||
* * 若传入e对象则会识别e.user_id,并将user对象添加至e.user
|
* * 若传入e对象则会识别e.user_id,并将user对象添加至e.user
|
||||||
* @param data 用户对应MysCookie数据,为空则自动读取
|
* @param data 用户对应MysCookie数据,为空则自动读取
|
||||||
* @returns {Promise<NoteUser|*>}
|
* @returns {Promise<NoteUser|*>}
|
||||||
*/
|
*/
|
||||||
static async create (qq, db) {
|
static async create (qq, db = false) {
|
||||||
// 兼容处理传入e
|
// 兼容处理传入e
|
||||||
if (qq && qq.user_id) {
|
if (qq && qq.user_id) {
|
||||||
let e = qq
|
let e = qq
|
||||||
|
|
|
@ -302,12 +302,12 @@ export default class User extends base {
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadOldData (data) {
|
async loadOldData (data) {
|
||||||
let ltuids = {}
|
|
||||||
let count = 0
|
let count = 0
|
||||||
if (!lodash.isPlainObject(data)) {
|
if (!lodash.isPlainObject(data)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for (let u in data) {
|
for (let u in data) {
|
||||||
|
let ltuids = {}
|
||||||
let v = data[u]
|
let v = data[u]
|
||||||
let qq
|
let qq
|
||||||
for (let k in v) {
|
for (let k in v) {
|
||||||
|
|
Loading…
Reference in New Issue