feat(event): adapt onProfileDetailInfoChanged payload

This commit is contained in:
Il Harper 2024-08-23 12:07:30 +08:00
parent d4f322dd4d
commit d645e264ff
No known key found for this signature in database
GPG Key ID: 4B71FCA698E7E8EC
5 changed files with 102 additions and 10 deletions

View File

@ -9,3 +9,13 @@ export const getUserSimpleInfo = define<
},
]
>('ns-ntApi-2', 'nodeIKernelProfileService/getUserSimpleInfo')
export const getUserDetailInfoWithBizInfo = define<
unknown,
[
{
uid: string
keys: [0]
},
]
>('ns-ntApi-2', 'nodeIKernelProfileService/getUserDetailInfoWithBizInfo')

View File

@ -155,13 +155,16 @@ const responseDispatcher = async (
case 'nodeIKernelGroupService/getNextMemberList': {
// const authData = await ctx.chronocat.getAuthData()
const { profiles, infos } = payload as OnProfileChanged
const { profiles, infos, info } = payload as OnProfileChanged
// if (profiles.get(authData.uid))
// selfProfile.value = profiles.get(authData.uid)
if (info) ctx.chronocat.uix.add(info.uid, info.uin)
const profile = profiles ?? infos
for (const [uid, { uin }] of profile) ctx.chronocat.uix.add(uid, uin)
if (profile)
for (const [uid, { uin }] of profile) ctx.chronocat.uix.add(uid, uin)
return
}

View File

@ -125,13 +125,16 @@ const dispatcher = async (
case 'nodeIKernelGroupService/getNextMemberList': {
// const authData = await ctx.chronocat.getAuthData()
const { profiles, infos } = payload as OnProfileChanged
const { profiles, infos, info } = payload as OnProfileChanged
// if (profiles.get(authData.uid))
// selfProfile.value = profiles.get(authData.uid)
if (info) ctx.chronocat.uix.add(info.uid, info.uin)
const profile = profiles ?? infos
for (const [uid, { uin }] of profile) ctx.chronocat.uix.add(uid, uin)
if (profile)
for (const [uid, { uin }] of profile) ctx.chronocat.uix.add(uid, uin)
return
}

View File

@ -1,23 +1,60 @@
export interface Profile {
uid: string
/**
*
*/
qid: string
uin: string
nick: string
/**
*
*/
remark: string
/**
*
*/
longNick: string
/**
*
*/
avatarUrl: string
/**
* 0
*/
birthday_year: number
/**
* 0
*/
birthday_month: number
/**
* 0
*/
birthday_day: number
sex: number
topTime: string
sex: number // 255
topTime: string // '0'
/**
*
*/
isBlock: boolean
isMsgDisturb: boolean
isSpecialCareOpen: boolean
isSpecialCareZone: boolean
ringId: string
status: number
extStatus: number
status: number // 10
extStatus: number // 0
categoryId: number
onlyChat: boolean
qzoneNotWatch: boolean
@ -26,8 +63,6 @@ export interface Profile {
yearVipFlag: boolean
svipFlag: boolean
vipLevel: number
// 以下为 >9.9.1 添加
qidianMasterFlag: number
qidianCrewFlag: number
qidianCrewFlag2: number
@ -35,6 +70,44 @@ export interface Profile {
zplanCoupleSceneId: number
teenagerFlag: number
studyFlag: number
constellation: number // 0
shengXiao: number // 0
kBloodType: number // 0
homeTown: string // ''
makeFriendCareer: number // 0
pos: string // ''
eMail: string // ''
phoneNum: string // ''
college: string // ''
country: string // ''
province: string // ''
city: string // ''
postCode: string // ''
address: string // ''
regTime: number // 0
interest: string // ''
termType: number // 65793
labels: unknown[]
qqLevel: {
crownNum: number // 0
sunNum: number // 0
moonNum: number // 0
starNum: number // 0
}
isHideQQLevel: number // 0
privilegeIcon: {
jumpUrl: string // ''
openIconList: unknown[]
closeIconList: unknown[]
}
isHidePrivilegeIcon: number // 0
photoWall: {
picList: unknown[]
}
recommendImgFlag: number // 0
disableEmojiShortCuts: number // 0
pendantId: string // '0'
vipNameColorId: string // '0'
}
export interface Member {

View File

@ -25,12 +25,15 @@ export interface OnProfileChanged {
][] & {
get: (uid: string) => Profile
}
infos: [
string,
{
uin: string
},
][]
info: Profile
}
export interface OnMemberInfoChange {