域名更改和加密,修改声音秀的声音逻辑

This commit is contained in:
linyudan
2023-11-23 19:16:55 -08:00
parent 311d259213
commit 43bf0ec5c1
11 changed files with 65 additions and 35 deletions

View File

@@ -10,10 +10,15 @@
#ifdef DEBUG #ifdef DEBUG
#define API_HOST_H5_URL @"http://beta.h5.nnbc123.cn" #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 #else
#define API_HOST_H5_URL @"https://h5.nnbc123.cn" #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 #endif

View File

@@ -14,6 +14,7 @@
#import "YYUtility.h" #import "YYUtility.h"
#import "YYReachability.h" #import "YYReachability.h"
#import "NewEncryptTool.h"
@implementation HttpRequestHelper @implementation HttpRequestHelper
@@ -24,7 +25,7 @@ static BOOL isShowing = NO;
static AFHTTPSessionManager *manager = nil; static AFHTTPSessionManager *manager = nil;
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
dispatch_once(&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.responseSerializer = [AFJSONResponseSerializer serializer];
manager.requestSerializer.HTTPShouldHandleCookies = YES; manager.requestSerializer.HTTPShouldHandleCookies = YES;
// //

View File

@@ -33,7 +33,7 @@
/// ///
+ (void)mewPublishVoiceShow:(HttpRequestHelperCompletion)completion dura:(NSString *)dura desc:(NSString *)desc gender:(NSString *)gender url:(NSString *)url { + (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 @end

View File

@@ -124,7 +124,7 @@
NSString * pageStr = [NSString stringWithFormat:@"%d", page]; NSString * pageStr = [NSString stringWithFormat:@"%d", page];
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize]; NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
[Api getattentionListCompletion:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [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]; [[self getView] getUserAttentionListSuccess:array state:state];
}fail:^(NSInteger code, NSString * _Nullable msg) { }fail:^(NSInteger code, NSString * _Nullable msg) {
// [[self getView] getUserAttentionListFail:state]; // [[self getView] getUserAttentionListFail:state];

View File

@@ -29,11 +29,12 @@
#import "MewHomeProtocol.h" #import "MewHomeProtocol.h"
/// Model /// Model
#import "FansInfoModel.h" #import "FansInfoModel.h"
#import "UserInfoModel.h"
#import <IQKeyboardManager/IQKeyboardManager.h> #import <IQKeyboardManager/IQKeyboardManager.h>
#import <NIMSDK/NIMSDK.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; @property (nonatomic, strong) MewVoiceGuideView *guideView;
@@ -75,7 +76,7 @@
@property (nonatomic,assign) int page; @property (nonatomic,assign) int page;
/// ///
@property (nonatomic,assign) BOOL hasNoMoreData; @property (nonatomic,assign) BOOL hasNoMoreData;
@property (nonatomic, strong) NSMutableArray<FansInfoModel *> *fansListModels; @property (nonatomic, strong) NSMutableArray<UserInfoModel *> *fansListModels;
@end @end
@@ -232,17 +233,7 @@
#pragma mark - MewShowVoiceViewDelegate () #pragma mark - MewShowVoiceViewDelegate ()
/// ///
- (void)didSelectMewShowVoiceViewWithTargetIndex:(NSInteger)index { - (void)didSelectMewShowVoiceViewWithTargetIndex:(NSInteger)index {
MewUserIntroductionView *view = [MewUserIntroductionView showUserIntroductionViewWithType:UserIntroductionView_OtherUser delegate:self]; [self pushUserInfoView:UserIntroductionView_OtherUser userInfo:self.userInfoModels[index]];
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];
}
} }
/// ///
@@ -294,6 +285,10 @@
} }
#pragma mark - MewRightFollowVoiceViewDelegate
- (void)didSelectRightFollowVoiceUser:(UserInfoModel *)userInfo {
[self pushUserInfoView:UserIntroductionView_OtherUser userInfo:userInfo];
}
#pragma mark - Action Event #pragma mark - Action Event
@@ -323,6 +318,21 @@
self.pushExcelusiveVoiceView.delegate = self; 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 #pragma mark - Init
// //
@@ -434,14 +444,16 @@
_rightFollowVoiceView = [[MewRightFollowVoiceView alloc] init]; _rightFollowVoiceView = [[MewRightFollowVoiceView alloc] init];
_rightFollowVoiceView.backgroundColor = [ThemeColor colorWithHexString:@"#050505"]; _rightFollowVoiceView.backgroundColor = [ThemeColor colorWithHexString:@"#050505"];
_rightFollowVoiceView.hidden = YES; _rightFollowVoiceView.hidden = YES;
_rightFollowVoiceView.delegate = self;
__weak typeof(self) weakSelf = self;
_rightFollowVoiceView.loadFollownRefresh = ^{ _rightFollowVoiceView.loadFollownRefresh = ^{
// //
[self loadFollownModelRefresh]; [weakSelf loadFollownModelRefresh];
}; };
_rightFollowVoiceView.moreFollownRefresh = ^{ _rightFollowVoiceView.moreFollownRefresh = ^{
// //
[self moreFollownModelRefresh]; [weakSelf moreFollownModelRefresh];
}; };
} }

View File

@@ -26,6 +26,7 @@ typedef void(^follownRefresh)(void);
@property (nonatomic, strong, readonly) UICollectionView *followCollectionView; @property (nonatomic, strong, readonly) UICollectionView *followCollectionView;
@property (nonatomic, weak) id<MewRightFollowVoiceViewDelegate> delegate;
@end @end

View File

@@ -62,9 +62,9 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
// if () { if (self.delegate) {
// [self.delegate didSelectRightFollowVoiceUser:self.fansListModel[indexPath.row]];
// } }
} }

View File

@@ -13,8 +13,8 @@
#import "ThemeColor.h" #import "ThemeColor.h"
#define ownerTopMargin 0.0 #define ownerTopMargin 0.0
#define ownerWidth 130 * kScreenScale #define ownerWidth 140 * kScreenScale
#define ownerHeight 148 #define ownerHeight 140 * kScreenScale
// 6 55 + 5 // 6 55 + 5
#define mcWidth (65 + 5) * kScreenScale #define mcWidth (65 + 5) * kScreenScale
@@ -57,8 +57,14 @@
} }
MewSocialMicroView *newMicroView = [[MewSocialMicroView alloc] init]; MewSocialMicroView *newMicroView = [[MewSocialMicroView alloc] init];
newMicroView.layer.cornerRadius = mcWidth/2.0; if (index == 0) {
newMicroView.layer.masksToBounds = YES; newMicroView.layer.cornerRadius = 20;
newMicroView.layer.masksToBounds = YES;
} else {
newMicroView.layer.cornerRadius = mcWidth/2.0;
newMicroView.layer.masksToBounds = YES;
}
return newMicroView; return newMicroView;
} }

View File

@@ -26,7 +26,7 @@
UserInfoModel *userInfo = model.userInfo; UserInfoModel *userInfo = model.userInfo;
UIImage *image = [UIImage imageNamed:@"mew_room_position_empty"]; UIImage *image = [UIImage imageNamed:@"mew_room_position_empty"];
if (micState == 0) { if (micState.position == -1) {
image = [UIImage imageNamed:@"mew_room_position_first_empty"]; image = [UIImage imageNamed:@"mew_room_position_first_empty"];
} }

View File

@@ -81,7 +81,7 @@
// //
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.top.mas_equalTo(self); 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) { [self.micStateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -199,8 +199,8 @@
if (!_avatarImageView) { if (!_avatarImageView) {
_avatarImageView = [[NetImageView alloc] init]; _avatarImageView = [[NetImageView alloc] init];
_avatarImageView.userInteractionEnabled = YES; _avatarImageView.userInteractionEnabled = YES;
_avatarImageView.layer.cornerRadius = 70/2.0; // _avatarImageView.layer.cornerRadius = 70/2.0;
_avatarImageView.layer.masksToBounds = YES; // _avatarImageView.layer.masksToBounds = YES;
} }
return _avatarImageView; return _avatarImageView;
} }

View File

@@ -25,7 +25,7 @@
#import <NIMSDK/NIMSDK.h> #import <NIMSDK/NIMSDK.h>
@interface StageView() @interface StageView()<RtcDelegate>
/** position index /** position index
* position -1 * position -1
* - 使MicroStateModelself.micQueue. * - 使MicroStateModelself.micQueue.
@@ -239,9 +239,9 @@
// } roomUid:roomUid micUid:uid position:position uid:uid]; // } roomUid:roomUid micUid:uid position:position uid:uid];
// } // }
// //
if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) { // if (sequence && sequence.userInfo.uid == [AccountInfoStorage instance].getUid.integerValue ) {
[RtcManager instance].localMuted = YES; [RtcManager instance].localMuted = NO;
} // }
} }
microQueueChanged = YES; microQueueChanged = YES;
@@ -406,6 +406,11 @@
} }
if (!isHandleRTC) {
return;
}
[[RtcManager instance] broadcast:YES];
} }
- (NSString *)getMewMicroSelectUid { - (NSString *)getMewMicroSelectUid {