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') >('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': { case 'nodeIKernelGroupService/getNextMemberList': {
// const authData = await ctx.chronocat.getAuthData() // const authData = await ctx.chronocat.getAuthData()
const { profiles, infos } = payload as OnProfileChanged const { profiles, infos, info } = payload as OnProfileChanged
// if (profiles.get(authData.uid)) // if (profiles.get(authData.uid))
// selfProfile.value = profiles.get(authData.uid) // selfProfile.value = profiles.get(authData.uid)
if (info) ctx.chronocat.uix.add(info.uid, info.uin)
const profile = profiles ?? infos 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 return
} }

View File

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

View File

@ -1,23 +1,60 @@
export interface Profile { export interface Profile {
uid: string uid: string
/**
*
*/
qid: string qid: string
uin: string uin: string
nick: string nick: string
/**
*
*/
remark: string remark: string
/**
*
*/
longNick: string longNick: string
/**
*
*/
avatarUrl: string avatarUrl: string
/**
* 0
*/
birthday_year: number birthday_year: number
/**
* 0
*/
birthday_month: number birthday_month: number
/**
* 0
*/
birthday_day: number birthday_day: number
sex: number
topTime: string sex: number // 255
topTime: string // '0'
/**
*
*/
isBlock: boolean isBlock: boolean
isMsgDisturb: boolean isMsgDisturb: boolean
isSpecialCareOpen: boolean isSpecialCareOpen: boolean
isSpecialCareZone: boolean isSpecialCareZone: boolean
ringId: string ringId: string
status: number status: number // 10
extStatus: number extStatus: number // 0
categoryId: number categoryId: number
onlyChat: boolean onlyChat: boolean
qzoneNotWatch: boolean qzoneNotWatch: boolean
@ -26,8 +63,6 @@ export interface Profile {
yearVipFlag: boolean yearVipFlag: boolean
svipFlag: boolean svipFlag: boolean
vipLevel: number vipLevel: number
// 以下为 >9.9.1 添加
qidianMasterFlag: number qidianMasterFlag: number
qidianCrewFlag: number qidianCrewFlag: number
qidianCrewFlag2: number qidianCrewFlag2: number
@ -35,6 +70,44 @@ export interface Profile {
zplanCoupleSceneId: number zplanCoupleSceneId: number
teenagerFlag: number teenagerFlag: number
studyFlag: 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 { export interface Member {

View File

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