generated from tailored/router-db-template
feat: add summary
This commit is contained in:
@@ -104,6 +104,16 @@ export class XhsServices {
|
||||
}
|
||||
return user.userid === xhsUserInfo.userid;
|
||||
}
|
||||
isReplayAi(data: any, key?: string) {
|
||||
const mention = data?.mention || {};
|
||||
const user_info = mention?.comment_info?.target_comment?.user_info || {};
|
||||
if (user_info?.userid) {
|
||||
const xhsUserInfo = this.getXhsUserInfo(key);
|
||||
// 处理用户信息
|
||||
return user_info.userid === xhsUserInfo.userid;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
setCookie(cookie: string, key?: string) {
|
||||
const xhsClient = this.map.get(this.getKey(key));
|
||||
if (xhsClient) {
|
||||
@@ -123,4 +133,17 @@ export class XhsServices {
|
||||
xhsClient.options.username = user.username;
|
||||
}
|
||||
}
|
||||
|
||||
setSignConfig(signConfig: { signUrl: string }, key?: string) {
|
||||
const xhsClient = this.map.get(this.getKey(key));
|
||||
if (xhsClient) {
|
||||
xhsClient.options.signConfig = signConfig;
|
||||
xhsClient.client.signConfig = signConfig;
|
||||
}
|
||||
console.log('setSignConfig', xhsClient?.options?.signConfig);
|
||||
}
|
||||
getSignConfig(key?: string) {
|
||||
const xhsClient = this.map.get(this.getKey(key));
|
||||
return xhsClient?.options?.signConfig || {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user