41 lines
1.3 KiB
Objective-C
41 lines
1.3 KiB
Objective-C
//
|
|
// XPMonentsInteractivePresenter.m
|
|
// xplan-ios
|
|
//
|
|
// Created by 冯硕 on 2022/5/18.
|
|
//
|
|
|
|
#import "XPMonentsInteractivePresenter.h"
|
|
#import "Api+Monents.h"
|
|
#import "XPMonentsInteractiveProtocol.h"
|
|
#import "AccountInfoStorage.h"
|
|
#import "MonentsInteractiveModel.h"
|
|
|
|
@implementation XPMonentsInteractivePresenter
|
|
|
|
|
|
/// 获取互动消息
|
|
/// @param dynamicId 动态的id
|
|
/// @param pageSize 一页的个数
|
|
/// @param state 状态
|
|
- (void)getMonentsInteractiveList:(NSString *)dynamicId pageSize:(int)pageSize state:(int)state{
|
|
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
|
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
[Api monentsInteractiveList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
NSArray * array = [MonentsInteractiveModel modelsWithArray:data.data];
|
|
[[self getView] getMonentsInteractiveListSueccess:array state:state];
|
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
|
[[self getView] getMonentsInteractiveListFail:msg state:state];
|
|
}] dynamicId:dynamicId pageSize:pageSizeStr uid:uid];
|
|
}
|
|
|
|
///清空互动消息
|
|
- (void)clearInteractiveMessage {
|
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
|
[Api monentsInteractiveClear:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
|
[[self getView] clearInteractiveMessageSuccess];
|
|
} showLoading:YES] uid:uid];
|
|
}
|
|
|
|
@end
|