Files
xj-ios/XinjiangProject/XinjiangProject/Manager/XJHealthKnowledgeManager.h
T
jiayangyangandClaude Opus 4.7 6337454956 feat(home): 首页增加健康知识/资讯模块,含双视图列表及H5跳转
- 新增健康知识视图(标签切换+搜索+列表)和健康资讯视图(纯列表无搜索)
- 对接健康栏目列表和文章分页接口,资讯无子分类直接用父级ID
- 接入更多/搜索/详情H5跳转,统一用通用加密串传参
- 键盘弹起时自动避让,从H5回来刷新文章收藏数

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-29 18:46:58 +08:00

48 lines
1.5 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// XJHealthKnowledgeManager.h
// XinjiangProject
//
// Created by Apple on 2026/6/29.
//
#import <Foundation/Foundation.h>
#import "XJHealthCategoryModel.h"
#import "XJHealthArticleModel.h"
NS_ASSUME_NONNULL_BEGIN
/// 健康知识网络管理器
@interface XJHealthKnowledgeManager : NSObject
+ (instancetype)sharedManager;
/// 当前 token(获取后缓存)
@property (nonatomic, copy, readonly, nullable) NSString * cachedToken;
/// 清除缓存的 token(退出登录时调用)
- (void)clearToken;
/// 获取 token
- (void)getTokenWithUserId:(NSString *)userId
workNo:(NSString *)workNo
success:(void (^)(NSString * token))success
failure:(void (^)(NSString * errorMsg))failure;
/// 获取栏目列表
- (void)getCategoryListWithToken:(NSString *)token
success:(void (^)(NSArray<XJHealthCategoryModel *> * categories))success
failure:(void (^)(NSString * errorMsg))failure;
/// 分页查询文章(showAppHomepage 固定 Y
- (void)getArticleListWithToken:(NSString *)token
categoryId:(NSInteger)categoryId
articleType:(nullable NSString *)articleType
pageNum:(NSInteger)pageNum
pageSize:(NSInteger)pageSize
success:(void (^)(NSArray<XJHealthArticleModel *> * articles, NSInteger total))success
failure:(void (^)(NSString * errorMsg))failure;
@end
NS_ASSUME_NONNULL_END