为MysUser增加uid属性的兼容

This commit is contained in:
Kokomi 2023-06-07 04:39:01 +08:00
parent 9da46bc899
commit 86b2b7d60a
1 changed files with 5 additions and 0 deletions

View File

@ -55,6 +55,11 @@ export default class MysUser extends BaseModel {
} }
// 可传入ltuid、cookie、ck对象来创建MysUser实例 // 可传入ltuid、cookie、ck对象来创建MysUser实例
get uid () {
return this.uids?.gs?.[0] || ''
}
// 在仅传入ltuid时必须是之前传入过的才能被识别 // 在仅传入ltuid时必须是之前传入过的才能被识别
static async create (ltuid, db = false) { static async create (ltuid, db = false) {
ltuid = MysUtil.getLtuid(ltuid) ltuid = MysUtil.getLtuid(ltuid)