This commit is contained in:
2025-12-04 19:12:34 +08:00
parent 8f63741d8c
commit 64887054e0
18 changed files with 331 additions and 50 deletions

View File

@@ -20,6 +20,10 @@ typedef void(^KBHomeRankCompletion)(NSArray<KBCharacter *> * _Nullable list,
typedef void(^KBHomeTagCompletion)(NSArray<KBTag *> * _Nullable list,
NSError * _Nullable error);
/// 添加用户人设回调
typedef void(^KBHomeAddUserCharacterCompletion)(BOOL success,
NSError * _Nullable error);
@interface KBHomeVM : NSObject
/// 最近一次成功请求到的排行榜数据
@@ -51,6 +55,11 @@ typedef void(^KBHomeTagCompletion)(NSArray<KBTag *> * _Nullable list,
needShow:(BOOL)needShow
completion:(KBHomeTagCompletion)completion;
/// 添加用户人设(例如在首页排行榜中点 “+”)
/// GET /character/addUserCharacter?id={characterId}
- (void)addUserCharacterWithId:(NSNumber *)characterId
completion:(KBHomeAddUserCharacterCompletion)completion;
@end
NS_ASSUME_NONNULL_END