修复了设置字典的时候可能引起崩溃的问题
This commit is contained in:
@@ -9,6 +9,7 @@
|
|||||||
///Api
|
///Api
|
||||||
#import "Api+Login.h"
|
#import "Api+Login.h"
|
||||||
#import "LoginFullInfoProtocol.h"
|
#import "LoginFullInfoProtocol.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Tool
|
///Tool
|
||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
///Model
|
///Model
|
||||||
@@ -55,25 +56,25 @@
|
|||||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||||
NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
||||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||||
[params setObject:avatar forKey:@"avatar"];
|
[params safeSetObject:avatar forKey:@"avatar"];
|
||||||
[params setObject:gender forKey:@"gender"];
|
[params safeSetObject:gender forKey:@"gender"];
|
||||||
[params setObject:nick forKey:@"nick"];
|
[params safeSetObject:nick forKey:@"nick"];
|
||||||
[params setObject:uid forKey:@"uid"];
|
[params safeSetObject:uid forKey:@"uid"];
|
||||||
[params setObject:ticket forKey:@"ticket"];
|
[params safeSetObject:ticket forKey:@"ticket"];
|
||||||
if (inviteCode.length > 0) {
|
if (inviteCode.length > 0) {
|
||||||
[params setObject:inviteCode forKey:@"inviteCode"];
|
[params safeSetObject:inviteCode forKey:@"inviteCode"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomUid.length > 0) {
|
if (roomUid.length > 0) {
|
||||||
[params setObject:roomUid forKey:@"roomUid"];
|
[params safeSetObject:roomUid forKey:@"roomUid"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shareUid.length > 0) {
|
if (shareUid.length > 0) {
|
||||||
[params setObject:shareUid forKey:@"shareUid"];
|
[params safeSetObject:shareUid forKey:@"shareUid"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shareChannel.length > 0) {
|
if (shareChannel.length > 0) {
|
||||||
[params setObject:shareChannel forKey:@"shareChannel"];
|
[params safeSetObject:shareChannel forKey:@"shareChannel"];
|
||||||
}
|
}
|
||||||
[Api completeUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
[Api completeUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
[[self getView] complementInfoSuccess];
|
[[self getView] complementInfoSuccess];
|
||||||
|
@@ -11,7 +11,6 @@
|
|||||||
#import <ReactiveObjC/ReactiveObjC.h>
|
#import <ReactiveObjC/ReactiveObjC.h>
|
||||||
///Tool
|
///Tool
|
||||||
#import "ThemeColor.h"
|
#import "ThemeColor.h"
|
||||||
#import "CountDownHelper.h"
|
|
||||||
#import "XPMacro.h"
|
#import "XPMacro.h"
|
||||||
///Presenter
|
///Presenter
|
||||||
#import "LoginVerifCodePresent.h"
|
#import "LoginVerifCodePresent.h"
|
||||||
@@ -20,7 +19,7 @@
|
|||||||
///View
|
///View
|
||||||
#import "LoginVerifCodeView.h"
|
#import "LoginVerifCodeView.h"
|
||||||
|
|
||||||
@interface LoginVerifCodeViewController ()<LoginVerifCodeProtocol, CountDownHelperDelegate>
|
@interface LoginVerifCodeViewController ()<LoginVerifCodeProtocol>
|
||||||
///标题的容器
|
///标题的容器
|
||||||
@property (nonatomic,strong) UIStackView *titleStackView;
|
@property (nonatomic,strong) UIStackView *titleStackView;
|
||||||
///标题
|
///标题
|
||||||
@@ -37,14 +36,11 @@
|
|||||||
@property (nonatomic,strong) UIButton *retryCodeButton;
|
@property (nonatomic,strong) UIButton *retryCodeButton;
|
||||||
///返回按钮
|
///返回按钮
|
||||||
@property (nonatomic,strong) UIButton *backButton;
|
@property (nonatomic,strong) UIButton *backButton;
|
||||||
|
@property (strong, nonatomic) dispatch_source_t timer;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation LoginVerifCodeViewController
|
@implementation LoginVerifCodeViewController
|
||||||
|
|
||||||
- (void)dealloc {
|
|
||||||
[[CountDownHelper shareHelper] stopCountDown];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)isHiddenNavBar {
|
- (BOOL)isHiddenNavBar {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
@@ -67,12 +63,11 @@
|
|||||||
|
|
||||||
- (void)viewDidDisappear:(BOOL)animated {
|
- (void)viewDidDisappear:(BOOL)animated {
|
||||||
[super viewDidDisappear:animated];
|
[super viewDidDisappear:animated];
|
||||||
[[CountDownHelper shareHelper] stopCountDown];
|
[self stopCountDown];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Private Method
|
#pragma mark - Private Method
|
||||||
- (void)initSubViews {
|
- (void)initSubViews {
|
||||||
[CountDownHelper shareHelper].delegate = self;
|
|
||||||
[self.view addSubview:self.backButton];
|
[self.view addSubview:self.backButton];
|
||||||
[self.view addSubview:self.titleStackView];
|
[self.view addSubview:self.titleStackView];
|
||||||
[self.view addSubview:self.codeView];
|
[self.view addSubview:self.codeView];
|
||||||
@@ -140,7 +135,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)disMissVC {
|
- (void)disMissVC {
|
||||||
[[CountDownHelper shareHelper] stopCountDown];
|
[self stopCountDown];
|
||||||
UIViewController *vc = self.presentingViewController;
|
UIViewController *vc = self.presentingViewController;
|
||||||
while (vc.presentingViewController) {
|
while (vc.presentingViewController) {
|
||||||
vc = vc.presentingViewController;
|
vc = vc.presentingViewController;
|
||||||
@@ -149,10 +144,49 @@
|
|||||||
[self.navigationController popToRootViewControllerAnimated:NO];
|
[self.navigationController popToRootViewControllerAnimated:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 停止倒计时
|
||||||
|
- (void)stopCountDown {
|
||||||
|
if (self.timer != nil) {
|
||||||
|
dispatch_source_cancel(self.timer);
|
||||||
|
self.timer = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 开始倒计时
|
||||||
|
- (void)openCountdownWithTime:(int)totalTime{
|
||||||
|
if (time <= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
__block int time = totalTime; //倒计时时间
|
||||||
|
if (self.timer != nil) {
|
||||||
|
dispatch_source_cancel(self.timer);
|
||||||
|
}
|
||||||
|
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
||||||
|
self.timer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, queue);
|
||||||
|
dispatch_source_set_timer(self.timer,dispatch_walltime(NULL, 0),1.0*NSEC_PER_SEC, 0); //每秒执行
|
||||||
|
__weak typeof(self) weakself = self;
|
||||||
|
dispatch_source_set_event_handler(self.timer, ^{
|
||||||
|
__strong typeof(weakself) self = weakself;
|
||||||
|
if(time <= 0){ //倒计时结束,关闭
|
||||||
|
dispatch_source_cancel(self.timer);
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[self onCountdownFinish];
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
time--;
|
||||||
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
//设置按钮显示读秒效果
|
||||||
|
[self onCountdownOpen:time];
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
dispatch_resume(self.timer);
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - LoginVerifCodeProtocol
|
#pragma mark - LoginVerifCodeProtocol
|
||||||
- (void)loginSuccess {
|
- (void)loginSuccess {
|
||||||
[self showSuccessToast:@"登录成功"];
|
[self showSuccessToast:@"登录成功"];
|
||||||
[[CountDownHelper shareHelper] stopCountDown];
|
|
||||||
[self disMissVC];
|
[self disMissVC];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -164,7 +198,7 @@
|
|||||||
- (void)phoneSmsCodeSuccess {
|
- (void)phoneSmsCodeSuccess {
|
||||||
self.codeSendLabel.hidden = NO;
|
self.codeSendLabel.hidden = NO;
|
||||||
self.codeSendLabel.text = [NSString stringWithFormat:@"验证码已发送至:%@", self.phone];
|
self.codeSendLabel.text = [NSString stringWithFormat:@"验证码已发送至:%@", self.phone];
|
||||||
[[CountDownHelper shareHelper] openCountdownWithTime:60];
|
[self openCountdownWithTime:60];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - CountDownHelperDelegate
|
#pragma mark - CountDownHelperDelegate
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
#import "XPMineGuildViewController.h"
|
#import "XPMineGuildViewController.h"
|
||||||
#import "XCCurrentVCStackManager.h"
|
#import "XCCurrentVCStackManager.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
#define MESSAGE_MAX_WIDTH 230
|
#define MESSAGE_MAX_WIDTH 230
|
||||||
#define MESSAGE_TEXT_PADDING 10
|
#define MESSAGE_TEXT_PADDING 10
|
||||||
@interface MessageContentGuildView ()
|
@interface MessageContentGuildView ()
|
||||||
@@ -270,8 +271,8 @@
|
|||||||
}
|
}
|
||||||
if (recordId.length > 0) {
|
if (recordId.length > 0) {
|
||||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||||
[params setObject:recordId forKey:@"recordId"];
|
[params safeSetObject:recordId forKey:@"recordId"];
|
||||||
[params setObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
[params safeSetObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
||||||
///0拒绝 1同意
|
///0拒绝 1同意
|
||||||
NSString * type = sender.tag == 1000? @"0" : @"1";
|
NSString * type = sender.tag == 1000? @"0" : @"1";
|
||||||
if (self.attachment.second == Custom_Message_Sub_Hall_Apply_Join || self.attachment.second == Custom_Message_Sub_Hall_Manager_Invite || self.attachment.second == Custom_Message_Sub_Hall_Apply_Exit) {
|
if (self.attachment.second == Custom_Message_Sub_Hall_Apply_Join || self.attachment.second == Custom_Message_Sub_Hall_Manager_Invite || self.attachment.second == Custom_Message_Sub_Hall_Apply_Exit) {
|
||||||
|
@@ -11,6 +11,7 @@
|
|||||||
///Tool
|
///Tool
|
||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
#import "UploadImage.h"
|
#import "UploadImage.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "XPMineUserInfoEditModel.h"
|
#import "XPMineUserInfoEditModel.h"
|
||||||
#import "UserInfoModel.h"
|
#import "UserInfoModel.h"
|
||||||
@@ -83,23 +84,23 @@
|
|||||||
NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
NSString * ticket = [[AccountInfoStorage instance] getTicket];
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
if (avatar.length > 0) {
|
if (avatar.length > 0) {
|
||||||
[dic setValue:avatar forKey:@"avatar"];
|
[dic safeSetObject:avatar forKey:@"avatar"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nick.length > 0) {
|
if (nick.length > 0) {
|
||||||
[dic setValue:nick forKey:@"nick"];
|
[dic safeSetObject:nick forKey:@"nick"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (birth.length > 0) {
|
if (birth.length > 0) {
|
||||||
[dic setValue:birth forKey:@"birth"];
|
[dic safeSetObject:birth forKey:@"birth"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userDesc.length > 0) {
|
if (userDesc.length > 0) {
|
||||||
[dic setValue:userDesc forKey:@"userDesc"];
|
[dic safeSetObject:userDesc forKey:@"userDesc"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[dic setObject:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[dic setObject:ticket forKey:@"ticket"];
|
[dic safeSetObject:ticket forKey:@"ticket"];
|
||||||
[Api completeUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
[Api completeUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
||||||
[[self getView] completeUserInfoSuccess:infoModel];
|
[[self getView] completeUserInfoSuccess:infoModel];
|
||||||
|
@@ -0,0 +1,40 @@
|
|||||||
|
//
|
||||||
|
// Api+EnterpriseRecharge.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by 冯硕 on 2022/5/14.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "Api+EnterpriseRecharge.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
|
@implementation Api (EnterpriseRecharge)
|
||||||
|
|
||||||
|
///企业包的充值列表
|
||||||
|
+ (void)enterpriseRechargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType {
|
||||||
|
[self makeRequest:@"chargeprod/listV2" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, channelType, nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// 请求支付参数
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param chargeProdId 订单的id
|
||||||
|
/// @param payChannel 支付的渠道
|
||||||
|
/// @param clientIp ip
|
||||||
|
/// @param uid uid
|
||||||
|
/// @param ticket ticket
|
||||||
|
+ (void)requestPay:(HttpRequestHelperCompletion)completion chargeProdId:(NSString *)chargeProdId payChannel:(NSString *)payChannel clientIp:(NSString *)clientIp uid:(NSString *)uid ticket:(NSString *)ticket roomUid:(NSString *)roomUid {
|
||||||
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
|
[dic safeSetObject:chargeProdId forKey:@"chargeProdId"];
|
||||||
|
[dic safeSetObject:payChannel forKey:@"payChannel"];
|
||||||
|
[dic safeSetObject:clientIp forKey:@"clientIp"];
|
||||||
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
|
[dic safeSetObject:ticket forKey:@"ticket"];
|
||||||
|
if (roomUid.integerValue> 0) {
|
||||||
|
[dic safeSetObject:roomUid forKey:@"roomUid"];
|
||||||
|
}
|
||||||
|
[HttpRequestHelper request:@"charge/pay/apply" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@end
|
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "Api+NobleCenter.h"
|
#import "Api+NobleCenter.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
@implementation Api (NobleCenter)
|
@implementation Api (NobleCenter)
|
||||||
|
|
||||||
/// 贵族中心等级列表
|
/// 贵族中心等级列表
|
||||||
@@ -75,5 +75,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// 使用钻石开通贵族
|
||||||
|
/// @param complection 完成回调
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
+ (void)openWithDiamond:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid {
|
||||||
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
|
if (roomUid.length > 0) {
|
||||||
|
[dic safeSetObject:roomUid forKey:@"roomUid"];
|
||||||
|
}
|
||||||
|
[HttpRequestHelper request:@"vip/openWithDiamond" method:HttpRequestHelperMethodPOST params:dic completion:complection];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#import "Api+RoomSetting.h"
|
#import "Api+RoomSetting.h"
|
||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
#import "ClientConfig.h"
|
#import "ClientConfig.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "XPMineItemModel.h"
|
#import "XPMineItemModel.h"
|
||||||
#import "UserInfoModel.h"
|
#import "UserInfoModel.h"
|
||||||
@@ -536,23 +537,23 @@
|
|||||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||||
[params setObject:ticket forKey:@"ticket"];
|
[params safeSetObject:ticket forKey:@"ticket"];
|
||||||
[params setObject:uid forKey:@"uid"];
|
[params safeSetObject:uid forKey:@"uid"];
|
||||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
|
[params safeSetObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
|
||||||
if (roomInfo.title.length > 0) {
|
if (roomInfo.title.length > 0) {
|
||||||
[params setObject:roomInfo.title forKey:@"title"];
|
[params safeSetObject:roomInfo.title forKey:@"title"];
|
||||||
}
|
}
|
||||||
if (roomInfo.roomPwd.length > 0) {
|
if (roomInfo.roomPwd.length > 0) {
|
||||||
[params setObject:roomInfo.roomPwd forKey:@"roomPwd"];
|
[params safeSetObject:roomInfo.roomPwd forKey:@"roomPwd"];
|
||||||
} else{
|
} else{
|
||||||
[params setObject:@"" forKey:@"roomPwd"];
|
[params safeSetObject:@"" forKey:@"roomPwd"];
|
||||||
}
|
}
|
||||||
if (roomInfo.tagId > 0) {
|
if (roomInfo.tagId > 0) {
|
||||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
[params safeSetObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
||||||
}
|
}
|
||||||
[params setObject:@(RoomType_MiniGame) forKey:@"type"];
|
[params safeSetObject:@(RoomType_MiniGame) forKey:@"type"];
|
||||||
[params setObject:mgId forKey:@"mgId"];
|
[params safeSetObject:mgId forKey:@"mgId"];
|
||||||
[params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
[params safeSetObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
||||||
[Api ownerUpdateRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
[Api ownerUpdateRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
[XPRoomViewController openRoom:[AccountInfoStorage instance].getUid mgId:mgId viewController:self];
|
[XPRoomViewController openRoom:[AccountInfoStorage instance].getUid mgId:mgId viewController:self];
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
#import "Api+Monents.h"
|
#import "Api+Monents.h"
|
||||||
#import "NSObject+MJExtension.h"
|
#import "NSObject+MJExtension.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
@implementation Api (Monents)
|
@implementation Api (Monents)
|
||||||
|
|
||||||
/// 朋友圈动态推荐列表
|
/// 朋友圈动态推荐列表
|
||||||
@@ -43,9 +44,9 @@
|
|||||||
/// @param uid 类型 uid
|
/// @param uid 类型 uid
|
||||||
+ (void)monentsInteractiveList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize uid:(NSString *)uid {
|
+ (void)monentsInteractiveList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId pageSize:(NSString *)pageSize uid:(NSString *)uid {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:dynamicId forKey:@"id"];
|
[dic safeSetObject:dynamicId forKey:@"id"];
|
||||||
[dic setValue:pageSize forKey:@"pageSize"];
|
[dic safeSetObject:pageSize forKey:@"pageSize"];
|
||||||
[dic setValue:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[HttpRequestHelper request:@"interactive/list" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
[HttpRequestHelper request:@"interactive/list" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -124,11 +125,11 @@
|
|||||||
/// @param timestamp 上一个评论的时间戳
|
/// @param timestamp 上一个评论的时间戳
|
||||||
+ (void)monentsCommentList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid pageSize:(NSString *)pageSize timestamp:(NSString *)timestamp {
|
+ (void)monentsCommentList:(HttpRequestHelperCompletion)completion dynamicId:(NSString *)dynamicId uid:(NSString *)uid pageSize:(NSString *)pageSize timestamp:(NSString *)timestamp {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:dynamicId forKey:@"dynamicId"];
|
[dic safeSetObject:dynamicId forKey:@"dynamicId"];
|
||||||
[dic setValue:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[dic setValue:pageSize forKey:@"pageSize"];
|
[dic safeSetObject:pageSize forKey:@"pageSize"];
|
||||||
if (timestamp.length > 0) {
|
if (timestamp.length > 0) {
|
||||||
[dic setValue:timestamp forKey:@"timestamp"];
|
[dic safeSetObject:timestamp forKey:@"timestamp"];
|
||||||
}
|
}
|
||||||
[HttpRequestHelper request:@"dynamic/comment/list" method:HttpRequestHelperMethodGET params:dic completion:completion];
|
[HttpRequestHelper request:@"dynamic/comment/list" method:HttpRequestHelperMethodGET params:dic completion:completion];
|
||||||
}
|
}
|
||||||
@@ -164,15 +165,15 @@
|
|||||||
/// @param resList 发布的图片
|
/// @param resList 发布的图片
|
||||||
+ (void)monentsPublish:(HttpRequestHelperCompletion)completion uid:(NSString *)uid type:(NSString *)type worldId:(NSString *)worldId content:(NSString *)content resList:(NSArray *)resList {
|
+ (void)monentsPublish:(HttpRequestHelperCompletion)completion uid:(NSString *)uid type:(NSString *)type worldId:(NSString *)worldId content:(NSString *)content resList:(NSArray *)resList {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setObject:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[dic setObject:type forKey:@"type"];
|
[dic safeSetObject:type forKey:@"type"];
|
||||||
|
|
||||||
[dic setObject:content.length > 0 ? content : @"" forKey:@"content"];
|
[dic safeSetObject:content.length > 0 ? content : @"" forKey:@"content"];
|
||||||
if (worldId.length > 0) {
|
if (worldId.length > 0) {
|
||||||
[dic setObject:worldId forKey:@"worldId"];
|
[dic safeSetObject:worldId forKey:@"worldId"];
|
||||||
}
|
}
|
||||||
if (resList.count > 0) {
|
if (resList.count > 0) {
|
||||||
[dic setObject:resList forKey:@"resList"];
|
[dic safeSetObject:resList forKey:@"resList"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpRequestHelper postSkillCard:@"dynamic/square/publish" params:dic.toJSONString completion:completion];
|
[HttpRequestHelper postSkillCard:@"dynamic/square/publish" params:dic.toJSONString completion:completion];
|
||||||
@@ -188,12 +189,12 @@
|
|||||||
/// @param pageSize 一页多少个
|
/// @param pageSize 一页多少个
|
||||||
+ (void)monentsTopicLatestList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid dynamicId:(NSString *)dynamicId types:(NSString *)types worldId:(NSString *)worldId pageSize:(NSString *)pageSize {
|
+ (void)monentsTopicLatestList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid dynamicId:(NSString *)dynamicId types:(NSString *)types worldId:(NSString *)worldId pageSize:(NSString *)pageSize {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[dic setValue:types forKey:@"types"];
|
[dic safeSetObject:types forKey:@"types"];
|
||||||
[dic setValue:worldId forKey:@"worldId"];
|
[dic safeSetObject:worldId forKey:@"worldId"];
|
||||||
[dic setValue:pageSize forKey:@"pageSize"];
|
[dic safeSetObject:pageSize forKey:@"pageSize"];
|
||||||
if (dynamicId.length > 0) {
|
if (dynamicId.length > 0) {
|
||||||
[dic setValue:dynamicId forKey:@"dynamicId"];
|
[dic safeSetObject:dynamicId forKey:@"dynamicId"];
|
||||||
}
|
}
|
||||||
[HttpRequestHelper request:@"dynamic/latestList" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
[HttpRequestHelper request:@"dynamic/latestList" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||||
}
|
}
|
||||||
@@ -207,12 +208,12 @@
|
|||||||
/// @param pageSize 一页多少个
|
/// @param pageSize 一页多少个
|
||||||
+ (void)monentsTopicRecommendList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid dynamicId:(NSString *)dynamicId types:(NSString *)types worldId:(NSString *)worldId pageSize:(NSString *)pageSize {
|
+ (void)monentsTopicRecommendList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid dynamicId:(NSString *)dynamicId types:(NSString *)types worldId:(NSString *)worldId pageSize:(NSString *)pageSize {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[dic setValue:types forKey:@"types"];
|
[dic safeSetObject:types forKey:@"types"];
|
||||||
[dic setValue:worldId forKey:@"worldId"];
|
[dic safeSetObject:worldId forKey:@"worldId"];
|
||||||
[dic setValue:pageSize forKey:@"pageSize"];
|
[dic safeSetObject:pageSize forKey:@"pageSize"];
|
||||||
if (dynamicId.length > 0) {
|
if (dynamicId.length > 0) {
|
||||||
[dic setValue:dynamicId forKey:@"dynamicId"];
|
[dic safeSetObject:dynamicId forKey:@"dynamicId"];
|
||||||
}
|
}
|
||||||
[HttpRequestHelper request:@"dynamic/listV2" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
[HttpRequestHelper request:@"dynamic/listV2" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||||
}
|
}
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
#import "UploadImage.h"
|
#import "UploadImage.h"
|
||||||
#import "TTPopup.h"
|
#import "TTPopup.h"
|
||||||
#import "NSArray+Safe.h"
|
#import "NSArray+Safe.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "MonentsTopicModel.h"
|
#import "MonentsTopicModel.h"
|
||||||
#import "MonentsPicResInfo.h"
|
#import "MonentsPicResInfo.h"
|
||||||
@@ -185,18 +186,18 @@
|
|||||||
NSMutableDictionary * dict= [NSMutableDictionary dictionary];
|
NSMutableDictionary * dict= [NSMutableDictionary dictionary];
|
||||||
MonentsPicResInfo * infor = [MonentsPicResInfo modelWithDictionary:resp];
|
MonentsPicResInfo * infor = [MonentsPicResInfo modelWithDictionary:resp];
|
||||||
if (infor.path) {
|
if (infor.path) {
|
||||||
[dict setValue:infor.path forKey:@"resUrl"];
|
[dict safeSetObject:infor.path forKey:@"resUrl"];
|
||||||
}
|
}
|
||||||
if (infor.format) {
|
if (infor.format) {
|
||||||
[dict setValue:infor.format forKey:@"format"];
|
[dict safeSetObject:infor.format forKey:@"format"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infor.w) {
|
if (infor.w) {
|
||||||
[dict setValue:@(infor.w) forKey:@"width"];
|
[dict safeSetObject:@(infor.w) forKey:@"width"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (infor.h) {
|
if (infor.h) {
|
||||||
[dict setValue:@(infor.h) forKey:@"height"];
|
[dict safeSetObject:@(infor.h) forKey:@"height"];
|
||||||
}
|
}
|
||||||
[dataArray addObject:dict];
|
[dataArray addObject:dict];
|
||||||
if (self.imageCount == array.count) {
|
if (self.imageCount == array.count) {
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#import "ApiHost.h"
|
#import "ApiHost.h"
|
||||||
#import "UIImage+Utils.h"
|
#import "UIImage+Utils.h"
|
||||||
#import "NSArray+Safe.h"
|
#import "NSArray+Safe.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "ArrangeMicModel.h"
|
#import "ArrangeMicModel.h"
|
||||||
#import "AttachmentModel.h"
|
#import "AttachmentModel.h"
|
||||||
@@ -561,10 +562,10 @@
|
|||||||
if (position.length > 0) {
|
if (position.length > 0) {
|
||||||
if (self.userInfo.type == ArrangeMicType_Room_PK) {
|
if (self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:position forKey:@"position"];
|
[dic safeSetObject:position forKey:@"position"];
|
||||||
[dic setValue:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
[dic setValue:@(userInfo.groupType) forKey:@"groupType"];
|
[dic safeSetObject:@(userInfo.groupType) forKey:@"groupType"];
|
||||||
[dic setValue:userInfo.nick forKey:@"nick"];
|
[dic safeSetObject:userInfo.nick forKey:@"nick"];
|
||||||
AttachmentModel * attachment = [[AttachmentModel alloc] init];
|
AttachmentModel * attachment = [[AttachmentModel alloc] init];
|
||||||
attachment.first = CustomMessageType_Room_PK;
|
attachment.first = CustomMessageType_Room_PK;
|
||||||
attachment.second = Custom_Message_Sub_Room_PK_Manager_Up_Mic;
|
attachment.second = Custom_Message_Sub_Room_PK_Manager_Up_Mic;
|
||||||
@@ -578,8 +579,8 @@
|
|||||||
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
[[NIMSDK sharedSDK].chatManager sendMessage:message toSession:session error:nil];
|
||||||
} else {
|
} else {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:@(position.integerValue) forKey:@"micPosition"];
|
[dic safeSetObject:@(position.integerValue) forKey:@"micPosition"];
|
||||||
[dic setValue:@(uid.integerValue) forKey:@"uid"];
|
[dic safeSetObject:@(uid.integerValue) forKey:@"uid"];
|
||||||
AttachmentModel *attachement = [[AttachmentModel alloc]init];
|
AttachmentModel *attachement = [[AttachmentModel alloc]init];
|
||||||
attachement.first = CustomMessageType_Queue;
|
attachement.first = CustomMessageType_Queue;
|
||||||
attachement.second = Custom_Message_Sub_Queue_Invite;
|
attachement.second = Custom_Message_Sub_Queue_Invite;
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#import "StatisticsServiceHelper.h"
|
#import "StatisticsServiceHelper.h"
|
||||||
#import "NSObject+MJExtension.h"
|
#import "NSObject+MJExtension.h"
|
||||||
#import "NSArray+Safe.h"
|
#import "NSArray+Safe.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
#import "MicroQueueModel.h"
|
#import "MicroQueueModel.h"
|
||||||
@@ -1558,30 +1559,30 @@
|
|||||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||||
[params setObject:ticket forKey:@"ticket"];
|
[params safeSetObject:ticket forKey:@"ticket"];
|
||||||
[params setObject:uid forKey:@"uid"];
|
[params safeSetObject:uid forKey:@"uid"];
|
||||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
|
[params safeSetObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
|
||||||
if (roomInfo.title.length > 0) {
|
if (roomInfo.title.length > 0) {
|
||||||
[params setObject:roomInfo.title forKey:@"title"];
|
[params safeSetObject:roomInfo.title forKey:@"title"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomInfo.roomPwd.length > 0) {
|
if (roomInfo.roomPwd.length > 0) {
|
||||||
[params setObject:roomInfo.roomPwd forKey:@"roomPwd"];
|
[params safeSetObject:roomInfo.roomPwd forKey:@"roomPwd"];
|
||||||
} else{
|
} else{
|
||||||
[params setObject:@"" forKey:@"roomPwd"];
|
[params safeSetObject:@"" forKey:@"roomPwd"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomInfo.tagId > 0) {
|
if (roomInfo.tagId > 0) {
|
||||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
[params safeSetObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
||||||
}
|
}
|
||||||
if ([itemInfo.mgId isEqualToString:@"0"]) {
|
if ([itemInfo.mgId isEqualToString:@"0"]) {
|
||||||
[params setObject:@(RoomType_Game) forKey:@"type"];
|
[params safeSetObject:@(RoomType_Game) forKey:@"type"];
|
||||||
[params setObject:@"0" forKey:@"mgId"];
|
[params safeSetObject:@"0" forKey:@"mgId"];
|
||||||
} else {
|
} else {
|
||||||
[params setObject:@(RoomType_MiniGame) forKey:@"type"];
|
[params safeSetObject:@(RoomType_MiniGame) forKey:@"type"];
|
||||||
[params setObject:itemInfo.mgId forKey:@"mgId"];
|
[params safeSetObject:itemInfo.mgId forKey:@"mgId"];
|
||||||
}
|
}
|
||||||
[params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
[params safeSetObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
||||||
[Api ownerUpdateRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
[Api ownerUpdateRoomInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
|
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
#import "UIImage+Utils.h"
|
#import "UIImage+Utils.h"
|
||||||
#import "XPConstant.h"
|
#import "XPConstant.h"
|
||||||
#import "AccountInfoStorage.h"
|
#import "AccountInfoStorage.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "XPMessageRemoteExtModel.h"
|
#import "XPMessageRemoteExtModel.h"
|
||||||
#import "UserInfoModel.h"
|
#import "UserInfoModel.h"
|
||||||
@@ -98,8 +99,8 @@
|
|||||||
}
|
}
|
||||||
id uidStr = [uidArray toJSONObject];
|
id uidStr = [uidArray toJSONObject];
|
||||||
id nickStr = [nickArray toJSONObject];
|
id nickStr = [nickArray toJSONObject];
|
||||||
[remoteExt setObject:uidStr forKey:@"atUids"];
|
[remoteExt safeSetObject:uidStr forKey:@"atUids"];
|
||||||
[remoteExt setObject:nickStr forKey:@"atNames"];
|
[remoteExt safeSetObject:nickStr forKey:@"atNames"];
|
||||||
message.remoteExt = remoteExt;
|
message.remoteExt = remoteExt;
|
||||||
|
|
||||||
///网易易盾 拦截高风险
|
///网易易盾 拦截高风险
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#import "Api+Room.h"
|
#import "Api+Room.h"
|
||||||
#import "XCCurrentVCStackManager.h"
|
#import "XCCurrentVCStackManager.h"
|
||||||
#import "StatisticsServiceHelper.h"
|
#import "StatisticsServiceHelper.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
#import "UserInfoModel.h"
|
#import "UserInfoModel.h"
|
||||||
@@ -254,15 +255,15 @@
|
|||||||
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
||||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||||
NSString *ticket = [AccountInfoStorage instance].getTicket;
|
NSString *ticket = [AccountInfoStorage instance].getTicket;
|
||||||
[params setObject:uid forKey:@"uid"];
|
[params safeSetObject:uid forKey:@"uid"];
|
||||||
[params setObject:@(shareInfo.shareType) forKey:@"shareType"];
|
[params safeSetObject:@(shareInfo.shareType) forKey:@"shareType"];
|
||||||
[params setObject:ticket forKey:@"ticket"];
|
[params safeSetObject:ticket forKey:@"ticket"];
|
||||||
[params setObject:@(shareInfo.type) forKey:@"sharePageId"];
|
[params safeSetObject:@(shareInfo.type) forKey:@"sharePageId"];
|
||||||
if (shareInfo.shareUrl.length > 0) {
|
if (shareInfo.shareUrl.length > 0) {
|
||||||
[params setObject:shareInfo.shareUrl forKey:@"shareUrl"];
|
[params safeSetObject:shareInfo.shareUrl forKey:@"shareUrl"];
|
||||||
}
|
}
|
||||||
if (shareInfo.roomUid > 0) {
|
if (shareInfo.roomUid > 0) {
|
||||||
[params setObject:@(shareInfo.roomUid) forKey:@"targetUid"];
|
[params safeSetObject:@(shareInfo.roomUid) forKey:@"targetUid"];
|
||||||
}
|
}
|
||||||
[HttpRequestHelper POST:@"usershare/save" params:params success:^(BaseModel * _Nonnull data) {
|
[HttpRequestHelper POST:@"usershare/save" params:params success:^(BaseModel * _Nonnull data) {
|
||||||
|
|
||||||
@@ -286,10 +287,10 @@
|
|||||||
}
|
}
|
||||||
self.hadShowCollectInScreen = YES;
|
self.hadShowCollectInScreen = YES;
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
[dic safeSetObject:[AccountInfoStorage instance].getUid forKey:@"uid"];
|
||||||
[dic setValue:self.hostDelegate.getUserInfo.nick forKey:@"nick"];
|
[dic safeSetObject:self.hostDelegate.getUserInfo.nick forKey:@"nick"];
|
||||||
[dic setValue:[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid] forKey:@"targetUid"];
|
[dic safeSetObject:[NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid] forKey:@"targetUid"];
|
||||||
[dic setValue:self.hostDelegate.getRoomInfo.nick forKey:@"targetNick"];
|
[dic safeSetObject:self.hostDelegate.getRoomInfo.nick forKey:@"targetNick"];
|
||||||
NSDictionary * data = @{@"data":dic};
|
NSDictionary * data = @{@"data":dic};
|
||||||
AttachmentModel *attachment = [[AttachmentModel alloc]init];
|
AttachmentModel *attachment = [[AttachmentModel alloc]init];
|
||||||
attachment.first = CustomMessageType_Collection_Room;
|
attachment.first = CustomMessageType_Collection_Room;
|
||||||
@@ -324,14 +325,14 @@
|
|||||||
attachMent.second = Custom_Message_Sub_Room_Tip_ShareRoom;
|
attachMent.second = Custom_Message_Sub_Room_Tip_ShareRoom;
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
[dic setValue:uid forKey:@"uid"];
|
[dic safeSetObject:uid forKey:@"uid"];
|
||||||
NSMutableDictionary * userDic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * userDic = [NSMutableDictionary dictionary];
|
||||||
UserInfoModel * userInfo = [self.hostDelegate getUserInfo];
|
UserInfoModel * userInfo = [self.hostDelegate getUserInfo];
|
||||||
RoomInfoModel * roomInfo = [self.hostDelegate getRoomInfo];
|
RoomInfoModel * roomInfo = [self.hostDelegate getRoomInfo];
|
||||||
[userDic setValue:roomInfo.nick.length > 0 ? roomInfo.nick : @"" forKey:@"targetNick"];
|
[userDic safeSetObject:roomInfo.nick.length > 0 ? roomInfo.nick : @"" forKey:@"targetNick"];
|
||||||
[userDic setValue:@(roomInfo.uid) forKey:@"targetUid"];
|
[userDic safeSetObject:@(roomInfo.uid) forKey:@"targetUid"];
|
||||||
[userDic setValue:userInfo.nick.length > 0 ? userInfo.nick : @"" forKey:@"nick"];
|
[userDic safeSetObject:userInfo.nick.length > 0 ? userInfo.nick : @"" forKey:@"nick"];
|
||||||
[dic setValue:userDic forKey:@"data"];
|
[dic safeSetObject:userDic forKey:@"data"];
|
||||||
attachMent.data = dic;
|
attachMent.data = dic;
|
||||||
NSString *sessionID = [NSString stringWithFormat:@"%ld", [self.hostDelegate getRoomInfo].roomId];
|
NSString *sessionID = [NSString stringWithFormat:@"%ld", [self.hostDelegate getRoomInfo].roomId];
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@
|
|||||||
#import "Api+RoomSetting.h"
|
#import "Api+RoomSetting.h"
|
||||||
#import "XPRoomTopicProtocol.h"
|
#import "XPRoomTopicProtocol.h"
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
|
|
||||||
@implementation XPRoomTopicPresenter
|
@implementation XPRoomTopicPresenter
|
||||||
|
|
||||||
@@ -21,26 +22,26 @@
|
|||||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||||
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
NSMutableDictionary * params = [NSMutableDictionary dictionary];
|
||||||
[params setObject:ticket forKey:@"ticket"];
|
[params safeSetObject:ticket forKey:@"ticket"];
|
||||||
[params setObject:uid forKey:@"uid"];
|
[params safeSetObject:uid forKey:@"uid"];
|
||||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
|
[params safeSetObject:[NSString stringWithFormat:@"%ld", roomInfo.uid] forKey:@"roomUid"];
|
||||||
if (roomInfo.title.length > 0) {
|
if (roomInfo.title.length > 0) {
|
||||||
[params setObject:roomInfo.title forKey:@"title"];
|
[params safeSetObject:roomInfo.title forKey:@"title"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomInfo.roomPwd.length > 0) {
|
if (roomInfo.roomPwd.length > 0) {
|
||||||
[params setObject:roomInfo.roomPwd forKey:@"roomPwd"];
|
[params safeSetObject:roomInfo.roomPwd forKey:@"roomPwd"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (roomInfo.tagId > 0) {
|
if (roomInfo.tagId > 0) {
|
||||||
[params setObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
[params safeSetObject:[NSString stringWithFormat:@"%ld", roomInfo.tagId] forKey:@"tagId"];
|
||||||
}
|
}
|
||||||
|
|
||||||
[params setValue:roomDesc forKey:@"roomDesc"];
|
[params safeSetObject:roomDesc forKey:@"roomDesc"];
|
||||||
if (introduction.length > 0) {
|
if (introduction.length > 0) {
|
||||||
[params setValue:introduction forKey:@"introduction"];
|
[params safeSetObject:introduction forKey:@"introduction"];
|
||||||
}
|
}
|
||||||
[params setObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
[params safeSetObject:@(roomInfo.hasAnimationEffect) forKey:@"hasAnimationEffect"];
|
||||||
///获取房间角色
|
///获取房间角色
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||||
request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#import "XCCurrentVCStackManager.h"
|
#import "XCCurrentVCStackManager.h"
|
||||||
#import "StatisticsServiceHelper.h"
|
#import "StatisticsServiceHelper.h"
|
||||||
#import "NSArray+Safe.h"
|
#import "NSArray+Safe.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "UserInfoModel.h"
|
#import "UserInfoModel.h"
|
||||||
#import "XPUserCardItemModel.h"
|
#import "XPUserCardItemModel.h"
|
||||||
@@ -910,8 +911,8 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:@(model.position.integerValue) forKey:@"micPosition"];
|
[dic safeSetObject:@(model.position.integerValue) forKey:@"micPosition"];
|
||||||
[dic setValue:@(self.targetUserInfo.uid) forKey:@"uid"];
|
[dic safeSetObject:@(self.targetUserInfo.uid) forKey:@"uid"];
|
||||||
AttachmentModel *attachement = [[AttachmentModel alloc]init];
|
AttachmentModel *attachement = [[AttachmentModel alloc]init];
|
||||||
attachement.first = CustomMessageType_Queue;
|
attachement.first = CustomMessageType_Queue;
|
||||||
attachement.second = Custom_Message_Sub_Queue_Invite;
|
attachement.second = Custom_Message_Sub_Queue_Invite;
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#import "Api+WishGift.h"
|
#import "Api+WishGift.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
@implementation Api (WishGift)
|
@implementation Api (WishGift)
|
||||||
|
|
||||||
///添加心愿礼物
|
///添加心愿礼物
|
||||||
@@ -33,12 +33,12 @@
|
|||||||
+ (void)wishGiftAddItem:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid giftId:(NSString *)giftId itemId:(NSString *)itemId seq:(NSString *)seq targetNum:(NSString *)targetNum {
|
+ (void)wishGiftAddItem:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid giftId:(NSString *)giftId itemId:(NSString *)itemId seq:(NSString *)seq targetNum:(NSString *)targetNum {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
if (itemId.length > 0) {
|
if (itemId.length > 0) {
|
||||||
[dic setValue:itemId forKey:@"itemId"];
|
[dic safeSetObject:itemId forKey:@"itemId"];
|
||||||
}
|
}
|
||||||
[dic setValue:roomUid forKey:@"roomUid"];
|
[dic safeSetObject:roomUid forKey:@"roomUid"];
|
||||||
[dic setValue:giftId forKey:@"giftId"];
|
[dic safeSetObject:giftId forKey:@"giftId"];
|
||||||
[dic setValue:seq forKey:@"seq"];
|
[dic safeSetObject:seq forKey:@"seq"];
|
||||||
[dic setValue:targetNum forKey:@"targetNum"];
|
[dic safeSetObject:targetNum forKey:@"targetNum"];
|
||||||
[HttpRequestHelper request:@"wishGift/addItem" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
[HttpRequestHelper request:@"wishGift/addItem" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#import "Api+Room.h"
|
#import "Api+Room.h"
|
||||||
#import "XPCoreDataManager.h"
|
#import "XPCoreDataManager.h"
|
||||||
#import "NSArray+Safe.h"
|
#import "NSArray+Safe.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
#import "MicroQueueModel.h"
|
#import "MicroQueueModel.h"
|
||||||
@@ -639,22 +640,22 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey;
|
|||||||
|
|
||||||
- (NSDictionary *)configUpdateChatRoomQueueExt:(UserInfoModel *)userInfo {
|
- (NSDictionary *)configUpdateChatRoomQueueExt:(UserInfoModel *)userInfo {
|
||||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||||
[dic setValue:@(userInfo.gender) forKey:@"gender"];
|
[dic safeSetObject:@(userInfo.gender) forKey:@"gender"];
|
||||||
[dic setValue:userInfo.avatar forKey:@"avatar"];
|
[dic safeSetObject:userInfo.avatar forKey:@"avatar"];
|
||||||
[dic setValue:@(userInfo.uid) forKey:@"uid"];
|
[dic safeSetObject:@(userInfo.uid) forKey:@"uid"];
|
||||||
[dic setValue:userInfo.nick forKey:@"nick"];
|
[dic safeSetObject:userInfo.nick forKey:@"nick"];
|
||||||
NSString * headWearUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
|
NSString * headWearUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
|
||||||
if (headWearUrl.length > 0) {
|
if (headWearUrl.length > 0) {
|
||||||
[dic setValue:headWearUrl forKey:@"headWearUrl"];
|
[dic safeSetObject:headWearUrl forKey:@"headWearUrl"];
|
||||||
}
|
}
|
||||||
if (userInfo.micCircle.length) {
|
if (userInfo.micCircle.length) {
|
||||||
[dic setValue:userInfo.micCircle forKey:@"micCircle"];
|
[dic safeSetObject:userInfo.micCircle forKey:@"micCircle"];
|
||||||
}
|
}
|
||||||
if (userInfo.micNickColor.length) {
|
if (userInfo.micNickColor.length) {
|
||||||
[dic setValue:userInfo.micNickColor forKey:@"micNickColor"];
|
[dic safeSetObject:userInfo.micNickColor forKey:@"micNickColor"];
|
||||||
}
|
}
|
||||||
[dic setValue:@(userInfo.userVipInfoVO.enterHide) forKey:@"enterHide"];
|
[dic safeSetObject:@(userInfo.userVipInfoVO.enterHide) forKey:@"enterHide"];
|
||||||
[dic setValue:@(userInfo.userVipInfoVO.preventKick) forKey:@"preventKick"];
|
[dic safeSetObject:@(userInfo.userVipInfoVO.preventKick) forKey:@"preventKick"];
|
||||||
return dic;
|
return dic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#import "DESEncrypt.h"
|
#import "DESEncrypt.h"
|
||||||
#import "StatisticsServiceHelper.h"
|
#import "StatisticsServiceHelper.h"
|
||||||
#import "NSArray+Safe.h"
|
#import "NSArray+Safe.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///Model
|
///Model
|
||||||
#import "RoomInfoModel.h"
|
#import "RoomInfoModel.h"
|
||||||
#import "UserInfoModel.h"
|
#import "UserInfoModel.h"
|
||||||
@@ -380,12 +381,12 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (self.userInfo.viewUrl.length > 0) {
|
if (self.userInfo.viewUrl.length > 0) {
|
||||||
[att setValue:self.userInfo.nick forKey:@"nick"];
|
[att safeSetObject:self.userInfo.nick forKey:@"nick"];
|
||||||
[att setValue:self.userInfo.viewUrl forKey:@"viewUrl"];
|
[att safeSetObject:self.userInfo.viewUrl forKey:@"viewUrl"];
|
||||||
[att setValue:@(self.userInfo.otherViewType) forKey:@"otherViewType"];
|
[att safeSetObject:@(self.userInfo.otherViewType) forKey:@"otherViewType"];
|
||||||
} else if (self.userInfo.carEffect.length > 0) {
|
} else if (self.userInfo.carEffect.length > 0) {
|
||||||
[att setValue:self.userInfo.carEffect forKey:@"effect"];
|
[att safeSetObject:self.userInfo.carEffect forKey:@"effect"];
|
||||||
[att setValue:self.userInfo.nick forKey:@"nick"];
|
[att safeSetObject:self.userInfo.nick forKey:@"nick"];
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -8,6 +8,7 @@
|
|||||||
#import "Api+Main.h"
|
#import "Api+Main.h"
|
||||||
#import "YYUtility.h"
|
#import "YYUtility.h"
|
||||||
#import "NSString+Utils.h"
|
#import "NSString+Utils.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
|
|
||||||
@implementation Api (Main)
|
@implementation Api (Main)
|
||||||
|
|
||||||
@@ -27,20 +28,20 @@
|
|||||||
/// @param muid iOS:取idfa原值
|
/// @param muid iOS:取idfa原值
|
||||||
/// @param fid idfa
|
/// @param fid idfa
|
||||||
/// @param platOs 1
|
/// @param platOs 1
|
||||||
[params setValue:@"0" forKey:@"evenType"];
|
[params safeSetObject:@"0" forKey:@"evenType"];
|
||||||
if ([YYUtility idfa].length > 0) {
|
if ([YYUtility idfa].length > 0) {
|
||||||
[params setValue:[YYUtility idfa] forKey:@"idfa"];
|
[params safeSetObject:[YYUtility idfa] forKey:@"idfa"];
|
||||||
[params setValue:[[YYUtility idfa] MD5String] forKey:@"idfaMd5"];
|
[params safeSetObject:[[YYUtility idfa] MD5String] forKey:@"idfaMd5"];
|
||||||
[params setValue:[YYUtility idfa] forKey:@"muid"];//iOS:取idfa原值
|
[params safeSetObject:[YYUtility idfa] forKey:@"muid"];//iOS:取idfa原值
|
||||||
[params setValue:[YYUtility idfa] forKey:@"id"];
|
[params safeSetObject:[YYUtility idfa] forKey:@"id"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([YYUtility ipAddress].length > 0) {
|
if ([YYUtility ipAddress].length > 0) {
|
||||||
[params setValue:[YYUtility ipAddress] forKey:@"ip"];
|
[params safeSetObject:[YYUtility ipAddress] forKey:@"ip"];
|
||||||
}
|
}
|
||||||
[params setValue:@(1) forKey:@"platOs"];
|
[params safeSetObject:@(1) forKey:@"platOs"];
|
||||||
[params setValue:@"" forKey:@"imei"];
|
[params safeSetObject:@"" forKey:@"imei"];
|
||||||
[params setValue:@"" forKey:@"ua"];
|
[params safeSetObject:@"" forKey:@"ua"];
|
||||||
[HttpRequestHelper request:@"juliang/ad/activeTrack" method:HttpRequestHelperMethodPOST params:params completion:complection];
|
[HttpRequestHelper request:@"juliang/ad/activeTrack" method:HttpRequestHelperMethodPOST params:params completion:complection];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
#import "XCCurrentVCStackManager.h"
|
#import "XCCurrentVCStackManager.h"
|
||||||
#import "XPMineUserInfoViewController.h"
|
#import "XPMineUserInfoViewController.h"
|
||||||
#import "XPMineRechargeViewController.h"
|
#import "XPMineRechargeViewController.h"
|
||||||
|
#import "NSMutableDictionary+Saft.h"
|
||||||
///vc
|
///vc
|
||||||
#import "XPMineDressUpViewController.h"
|
#import "XPMineDressUpViewController.h"
|
||||||
#import "XPDressUpShopViewController.h"
|
#import "XPDressUpShopViewController.h"
|
||||||
@@ -478,15 +479,15 @@ NSString * const kProhibitRightSlip = @"prohibitRightSlip";
|
|||||||
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
NSMutableDictionary *params = [NSMutableDictionary dictionary];
|
||||||
NSString *uid = [AccountInfoStorage instance].getUid;
|
NSString *uid = [AccountInfoStorage instance].getUid;
|
||||||
NSString *ticket = [AccountInfoStorage instance].getTicket;
|
NSString *ticket = [AccountInfoStorage instance].getTicket;
|
||||||
[params setObject:uid forKey:@"uid"];
|
[params safeSetObject:uid forKey:@"uid"];
|
||||||
[params setObject:@(shareInfo.shareType) forKey:@"shareType"];
|
[params safeSetObject:@(shareInfo.shareType) forKey:@"shareType"];
|
||||||
[params setObject:ticket forKey:@"ticket"];
|
[params safeSetObject:ticket forKey:@"ticket"];
|
||||||
[params setObject:@(shareInfo.type) forKey:@"sharePageId"];
|
[params safeSetObject:@(shareInfo.type) forKey:@"sharePageId"];
|
||||||
if (shareInfo.shareUrl.length > 0) {
|
if (shareInfo.shareUrl.length > 0) {
|
||||||
[params setObject:shareInfo.shareUrl forKey:@"shareUrl"];
|
[params safeSetObject:shareInfo.shareUrl forKey:@"shareUrl"];
|
||||||
}
|
}
|
||||||
if (shareInfo.roomUid > 0) {
|
if (shareInfo.roomUid > 0) {
|
||||||
[params setObject:@(shareInfo.roomUid) forKey:@"targetUid"];
|
[params safeSetObject:@(shareInfo.roomUid) forKey:@"targetUid"];
|
||||||
}
|
}
|
||||||
[HttpRequestHelper POST:@"usershare/save" params:params success:^(BaseModel * _Nonnull data) {
|
[HttpRequestHelper POST:@"usershare/save" params:params success:^(BaseModel * _Nonnull data) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user