feat: 自己的笔记也需要at才能评论了,优化一下

This commit is contained in:
2025-06-22 09:30:03 +08:00
parent 71359fba88
commit 530a4f21f5
7 changed files with 78 additions and 13 deletions

View File

@@ -125,22 +125,26 @@ app
const handleMention: any[] = [];
for (const mention of mentionList) {
const mention_id = mention.id;
const note_id = mention.item_info.id;
const note_id = mention.item_info.id; // item_info 是笔记信息
const note_userid = mention.item_info.user_info?.userid || '';
const note_username = mention.item_info.user_info?.nickname || '';
const xsec_token = mention.item_info.xsec_token;
let comment: any = Parse.getComment(mention);
// console.log('note_id', note_id, 'xsec_token', xsec_token, comment);
handleMention.push({
mention_id,
note_id,
note_userid,
note_username,
xsec_token,
comment,
mention,
});
}
console.log('获取提及列表成功', res.code, res.data?.message_list?.length);
console.log('获取提及列表成功', '[小红书code]', res.code, '提及数量', res.data?.message_list?.length);
ctx.body = handleMention;
} else {
console.log('获取提及列表失败', res.code);
console.log('获取提及列表失败', '[小红书code]', res.code);
ctx.throw(res.code, '获取提及列表失败');
}
})