域名更改和加密,修改声音秀的声音逻辑
This commit is contained in:
@@ -10,10 +10,15 @@
|
||||
|
||||
#ifdef DEBUG
|
||||
#define API_HOST_H5_URL @"http://beta.h5.nnbc123.cn"
|
||||
#define API_HOST_URL @"http://beta.api.nnbc123.cn"
|
||||
|
||||
/// http://beta.api.ymlive.fun
|
||||
#define API_HOST_URL @"699gQF4rRYIwztF2zlUunGDlDP2GdDcO5MWptrXUmgU="
|
||||
|
||||
#else
|
||||
#define API_HOST_H5_URL @"https://h5.nnbc123.cn"
|
||||
#define API_HOST_URL @"https://api.nnbc123.cn"
|
||||
|
||||
/// https://api.ymlive.fun
|
||||
#define API_HOST_URL @"Lk4rBT4xOjIVF9nPfBvRvyW9xx/sjOb0YbkCThRndxU="
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#import "YYUtility.h"
|
||||
#import "YYReachability.h"
|
||||
#import "NewEncryptTool.h"
|
||||
|
||||
@implementation HttpRequestHelper
|
||||
|
||||
@@ -24,7 +25,7 @@ static BOOL isShowing = NO;
|
||||
static AFHTTPSessionManager *manager = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
manager = [[AFHTTPSessionManager manager]initWithBaseURL:[NSURL URLWithString:API_HOST_URL]];
|
||||
manager = [[AFHTTPSessionManager manager]initWithBaseURL:[NSURL URLWithString:[NewEncryptTool MEW_aesDecrypt: API_HOST_URL]]];
|
||||
manager.responseSerializer = [AFJSONResponseSerializer serializer];
|
||||
manager.requestSerializer.HTTPShouldHandleCookies = YES;
|
||||
// 客户端是否信任非法证书
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
/// 音萌商店包的上传声音秀
|
||||
+ (void)mewPublishVoiceShow:(HttpRequestHelperCompletion)completion dura:(NSString *)dura desc:(NSString *)desc gender:(NSString *)gender url:(NSString *)url {
|
||||
[self makeRequest:@"voiceShow/publish" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, dura, desc, gender, url, nil];
|
||||
[self makeRequest:@"voiceShow/publish" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, dura, desc, gender, url, nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -124,7 +124,7 @@
|
||||
NSString * pageStr = [NSString stringWithFormat:@"%d", page];
|
||||
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
|
||||
[Api getattentionListCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [FansInfoModel modelsWithArray:data.data];
|
||||
NSArray * array = [UserInfoModel modelsWithArray:data.data];
|
||||
[[self getView] getUserAttentionListSuccess:array state:state];
|
||||
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
// [[self getView] getUserAttentionListFail:state];
|
||||
|
@@ -29,11 +29,12 @@
|
||||
#import "MewHomeProtocol.h"
|
||||
/// Model
|
||||
#import "FansInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
|
||||
#import <IQKeyboardManager/IQKeyboardManager.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
|
||||
@interface MewHomeViewController ()<MewHeaderViewDelegate, MewShowVoiceViewDelegate,MewUserIntroductionViewDelegate,MewPushExclusiveVoiceViewDelegate, MewHomeProtocol>
|
||||
@interface MewHomeViewController ()<MewHeaderViewDelegate, MewShowVoiceViewDelegate,MewUserIntroductionViewDelegate,MewPushExclusiveVoiceViewDelegate, MewHomeProtocol,MewRightFollowVoiceViewDelegate>
|
||||
|
||||
/// 引导页
|
||||
@property (nonatomic, strong) MewVoiceGuideView *guideView;
|
||||
@@ -75,7 +76,7 @@
|
||||
@property (nonatomic,assign) int page;
|
||||
///更多数据
|
||||
@property (nonatomic,assign) BOOL hasNoMoreData;
|
||||
@property (nonatomic, strong) NSMutableArray<FansInfoModel *> *fansListModels;
|
||||
@property (nonatomic, strong) NSMutableArray<UserInfoModel *> *fansListModels;
|
||||
|
||||
@end
|
||||
|
||||
@@ -232,17 +233,7 @@
|
||||
#pragma mark - MewShowVoiceViewDelegate (中部用户信息回调)
|
||||
/// 点击
|
||||
- (void)didSelectMewShowVoiceViewWithTargetIndex:(NSInteger)index {
|
||||
MewUserIntroductionView *view = [MewUserIntroductionView showUserIntroductionViewWithType:UserIntroductionView_OtherUser delegate:self];
|
||||
self.userIntroductionView = view;
|
||||
[view setCurrentUserModel:self.userInfoModels[index]];
|
||||
[self.view addSubview:view];
|
||||
if (self.userInfoModels.count > index) {
|
||||
self.targetUid = [NSString stringWithFormat:@"%ld",self.userInfoModels[index].uid];
|
||||
// 获取当前用户的详细信息
|
||||
[self.presenter getUserDetailInfoWithUid:self.targetUid];
|
||||
// 获取与当前用户的关注状态
|
||||
[self.presenter getUserAttentionState:self.targetUid];
|
||||
}
|
||||
[self pushUserInfoView:UserIntroductionView_OtherUser userInfo:self.userInfoModels[index]];
|
||||
|
||||
}
|
||||
/// 发布声音秀
|
||||
@@ -294,6 +285,10 @@
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - MewRightFollowVoiceViewDelegate
|
||||
- (void)didSelectRightFollowVoiceUser:(UserInfoModel *)userInfo {
|
||||
[self pushUserInfoView:UserIntroductionView_OtherUser userInfo:userInfo];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Action Event
|
||||
@@ -323,6 +318,21 @@
|
||||
self.pushExcelusiveVoiceView.delegate = self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)pushUserInfoView:(UserIntroductionType)type userInfo:(UserInfoModel *)userInfo {
|
||||
MewUserIntroductionView *view = [MewUserIntroductionView showUserIntroductionViewWithType:type delegate:self];
|
||||
self.userIntroductionView = view;
|
||||
[view setCurrentUserModel:userInfo];
|
||||
[self.view addSubview:view];
|
||||
// if (self.userInfoModels.count > index) {
|
||||
self.targetUid = [NSString stringWithFormat:@"%ld",userInfo.uid];
|
||||
// 获取当前用户的详细信息
|
||||
[self.presenter getUserDetailInfoWithUid:self.targetUid];
|
||||
// 获取与当前用户的关注状态
|
||||
[self.presenter getUserAttentionState:self.targetUid];
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Init
|
||||
// 引导页
|
||||
@@ -434,14 +444,16 @@
|
||||
_rightFollowVoiceView = [[MewRightFollowVoiceView alloc] init];
|
||||
_rightFollowVoiceView.backgroundColor = [ThemeColor colorWithHexString:@"#050505"];
|
||||
_rightFollowVoiceView.hidden = YES;
|
||||
_rightFollowVoiceView.delegate = self;
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_rightFollowVoiceView.loadFollownRefresh = ^{
|
||||
//刷新
|
||||
[self loadFollownModelRefresh];
|
||||
[weakSelf loadFollownModelRefresh];
|
||||
};
|
||||
|
||||
_rightFollowVoiceView.moreFollownRefresh = ^{
|
||||
//加载更多
|
||||
[self moreFollownModelRefresh];
|
||||
[weakSelf moreFollownModelRefresh];
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -26,6 +26,7 @@ typedef void(^follownRefresh)(void);
|
||||
|
||||
@property (nonatomic, strong, readonly) UICollectionView *followCollectionView;
|
||||
|
||||
@property (nonatomic, weak) id<MewRightFollowVoiceViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -62,9 +62,9 @@
|
||||
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
// if () {
|
||||
//
|
||||
// }
|
||||
if (self.delegate) {
|
||||
[self.delegate didSelectRightFollowVoiceUser:self.fansListModel[indexPath.row]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -13,8 +13,8 @@
|
||||
#import "ThemeColor.h"
|
||||
|
||||
#define ownerTopMargin 0.0
|
||||
#define ownerWidth 130 * kScreenScale
|
||||
#define ownerHeight 148
|
||||
#define ownerWidth 140 * kScreenScale
|
||||
#define ownerHeight 140 * kScreenScale
|
||||
|
||||
// 下面 6 个坑位宽55 + 光圈 5
|
||||
#define mcWidth (65 + 5) * kScreenScale
|
||||
@@ -57,8 +57,14 @@
|
||||
}
|
||||
|
||||
MewSocialMicroView *newMicroView = [[MewSocialMicroView alloc] init];
|
||||
newMicroView.layer.cornerRadius = mcWidth/2.0;
|
||||
newMicroView.layer.masksToBounds = YES;
|
||||
if (index == 0) {
|
||||
newMicroView.layer.cornerRadius = 20;
|
||||
newMicroView.layer.masksToBounds = YES;
|
||||
} else {
|
||||
newMicroView.layer.cornerRadius = mcWidth/2.0;
|
||||
newMicroView.layer.masksToBounds = YES;
|
||||
}
|
||||
|
||||
return newMicroView;
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@
|
||||
UserInfoModel *userInfo = model.userInfo;
|
||||
|
||||
UIImage *image = [UIImage imageNamed:@"mew_room_position_empty"];
|
||||
if (micState == 0) {
|
||||
if (micState.position == -1) {
|
||||
image = [UIImage imageNamed:@"mew_room_position_first_empty"];
|
||||
}
|
||||
|
||||
|
@@ -81,7 +81,7 @@
|
||||
//
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self);
|
||||
make.height.mas_equalTo(self.mas_width);
|
||||
make.height.mas_equalTo(self.mas_height);
|
||||
}];
|
||||
|
||||
[self.micStateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -199,8 +199,8 @@
|
||||
if (!_avatarImageView) {
|
||||
_avatarImageView = [[NetImageView alloc] init];
|
||||
_avatarImageView.userInteractionEnabled = YES;
|
||||
_avatarImageView.layer.cornerRadius = 70/2.0;
|
||||
_avatarImageView.layer.masksToBounds = YES;
|
||||
// _avatarImageView.layer.cornerRadius = 70/2.0;
|
||||
// _avatarImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _avatarImageView;
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
|
||||
|
||||
@interface StageView()
|
||||
@interface StageView()<RtcDelegate>
|
||||
/**云信麦序的 position 和本类 index 的关系
|
||||
* 网易云信返回的麦序(position)从 -1 开始
|
||||
* - 使用者:MicroStateModel、self.micQueue.
|
||||
@@ -239,9 +239,9 @@
|
||||
// } roomUid:roomUid micUid:uid position:position uid:uid];
|
||||
// }
|
||||
//如果是当前用户上麦,关闭自己的麦克风
|
||||
if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) {
|
||||
[RtcManager instance].localMuted = YES;
|
||||
}
|
||||
// if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) {
|
||||
[RtcManager instance].localMuted = NO;
|
||||
// }
|
||||
}
|
||||
|
||||
microQueueChanged = YES;
|
||||
@@ -406,6 +406,11 @@
|
||||
|
||||
}
|
||||
|
||||
if (!isHandleRTC) {
|
||||
return;
|
||||
}
|
||||
[[RtcManager instance] broadcast:YES];
|
||||
|
||||
}
|
||||
|
||||
- (NSString *)getMewMicroSelectUid {
|
||||
|
Reference in New Issue
Block a user