Files
real-e-party-iOS/YuMi/E-P/NewMoments/Services/EPMomentAPIHelper.h
edwinQQQ e8d59495a4 refactor: 重构 EPMomentViewController,替换 UITableView 为 EPMomentListView
主要变更:
1. 移除 UITableView,改为使用 EPMomentListView 以简化数据展示和交互。
2. 添加顶部固定文案 UILabel,提升用户体验。
3. 通过 EPMomentAPIHelper 统一管理 Moments 列表 API 请求,优化数据加载逻辑。
4. 更新 UI 约束,确保布局适配不同屏幕。

此重构旨在提升代码可维护性和用户界面的一致性。
2025-10-10 17:22:39 +08:00

37 lines
975 B
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.

//
// EPMomentAPIHelper.h
// YuMi
//
// Created by AI on 2025-10-10.
//
#import <Foundation/Foundation.h>
#import "BaseMvpPresenter.h"
#import "MomentsInfoModel.h"
#import "MomentsListInfoModel.h"
NS_ASSUME_NONNULL_BEGIN
/// 推荐/我的动态列表数据源类型
typedef NS_ENUM(NSInteger, EPMomentListSourceType) {
EPMomentListSourceTypeRecommend = 0,
EPMomentListSourceTypeMine = 1
};
/// 统一封装 Moments 列表 API
@interface EPMomentAPIHelper : BaseMvpPresenter
/// 拉取动态列表(默认 types:"0,2" 图片+文字)
/// page 从 0 开始pageSize > 0
/// completion 返回 data 数组(字典数组) 或错误
- (void)fetchMomentsWithType:(EPMomentListSourceType)sourceType
page:(NSInteger)page
pageSize:(NSInteger)pageSize
completion:(void (^)(NSArray <MomentsInfoModel *>* _Nullable list, NSInteger code, NSString * _Nullable msg))completion;
@end
NS_ASSUME_NONNULL_END