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

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
#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

View File

@@ -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;
//

View File

@@ -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

View File

@@ -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];

View File

@@ -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];
};
}

View File

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

View File

@@ -62,9 +62,9 @@
- (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"
#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];
if (index == 0) {
newMicroView.layer.cornerRadius = 20;
newMicroView.layer.masksToBounds = YES;
} else {
newMicroView.layer.cornerRadius = mcWidth/2.0;
newMicroView.layer.masksToBounds = YES;
}
return newMicroView;
}

View File

@@ -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"];
}

View File

@@ -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;
}

View File

@@ -25,7 +25,7 @@
#import <NIMSDK/NIMSDK.h>
@interface StageView()
@interface StageView()<RtcDelegate>
/** position index
* position -1
* - 使MicroStateModelself.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 {