Files
yinmeng-ios/xplan-ios/Main/Room/View/Setting/Presenter/XPRoomTopicPresenter.m

49 lines
1.5 KiB
Mathematica
Raw Normal View History

2022-03-14 19:46:10 +08:00
//
// XPRoomTopicPresenter.m
// xplan-ios
//
// Created by on 2022/3/14.
//
#import "XPRoomTopicPresenter.h"
#import "XPConstant.h"
#import "DESEncrypt.h"
#import "AccountInfoStorage.h"
#import "Api+RoomSetting.h"
#import "XPRoomTopicProtocol.h"
#import "RoomInfoModel.h"
@implementation XPRoomTopicPresenter
///
- (void)roomTopicUpdate:(NSString *)roomDesc introduction:(NSString *)introduction roomInfo:(RoomInfoModel *)roomInfo {
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
NSMutableDictionary * params = [NSMutableDictionary dictionary];
[params setObject:ticket forKey:@"ticket"];
[params setObject:uid forKey:@"uid"];
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
if (roomInfo.title.length > 0) {
[params setObject:roomInfo.title forKey:@"title"];
}
if (roomInfo.roomPwd.length > 0) {
[params setObject:roomInfo.roomPwd forKey:@"roomPwd"];
}
if (roomInfo.tagId > 0) {
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
}
[params setValue:roomDesc forKey:@"roomDesc"];
if (introduction.length > 0) {
[params setValue:introduction forKey:@"introduction"];
}
[params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
[Api ownerUpdateRoomInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
[[self getView] updateRoomTopicSuccess];
} showLoading:YES] params:params];
}
@end