协议的webview修改,h5链接加密,上传默认头像链接更改
This commit is contained in:
@@ -156,4 +156,4 @@ SPEC CHECKSUMS:
|
||||
|
||||
PODFILE CHECKSUM: cc88fa05da662ee682fc0eeb502faab221faa032
|
||||
|
||||
COCOAPODS: 1.12.1
|
||||
COCOAPODS: 1.14.2
|
||||
|
@@ -9,13 +9,14 @@
|
||||
#define ApiHost_h
|
||||
|
||||
#ifdef DEBUG
|
||||
#define API_HOST_H5_URL @"http://beta.h5.nnbc123.cn"
|
||||
|
||||
/// http://beta.h5.ymlive.fun
|
||||
#define API_HOST_H5_URL @"GoK87pcrCtMGRUiI37dI/jjoKPw7cA0hRRBRFdEmwbY="
|
||||
/// http://beta.api.ymlive.fun
|
||||
#define API_HOST_URL @"699gQF4rRYIwztF2zlUunGDlDP2GdDcO5MWptrXUmgU="
|
||||
|
||||
#else
|
||||
#define API_HOST_H5_URL @"https://h5.nnbc123.cn"
|
||||
/// http://h5.ymlive.fun
|
||||
#define API_HOST_H5_URL @"FRuPSi1EatQns610kVGhvBTZFQy13wFqbpfw5SyhvAM="
|
||||
|
||||
/// https://api.ymlive.fun
|
||||
#define API_HOST_URL @"Lk4rBT4xOjIVF9nPfBvRvyW9xx/sjOb0YbkCThRndxU="
|
||||
|
@@ -6,15 +6,16 @@
|
||||
//
|
||||
|
||||
#import "MewHtmlUrl.h"
|
||||
#import "NewEncryptTool.h"
|
||||
|
||||
@implementation MewHtmlUrl
|
||||
|
||||
NSString * const URLWithType(URLType type) {
|
||||
NSString * prefix = @"mew";
|
||||
NSDictionary * dic = @{
|
||||
@(kPrivacyURL) : @"modules/rule/privacy-wap.html",//隐私政策
|
||||
@(kCancelAccout) : @"modules/rule/logout-agreement.html",//注销账号
|
||||
@(kUserProtocalURL) : @"modules/rule/protocol.html",///用户协议
|
||||
@(kPrivacyURL) : [NewEncryptTool MEW_aesDecrypt:@"RW2RUxUBFSQXiYS0xFpDv+HMdWG2/xfjkYMyeSFR/BY="],//隐私政策modules/rule/privacy-wap.html
|
||||
@(kCancelAccout) : [NewEncryptTool MEW_aesDecrypt:@"OdODqmY17B0vG9Gs7FGtEuzMJQXILqziECH6PQoOSLo="],//注销账号modules/logout/index.html
|
||||
@(kUserProtocalURL) : [NewEncryptTool MEW_aesDecrypt:@"oSYlxZYQP2Vu+3KRnQorypsYWQGEz2tKII7AwcFks7s="],///用户协议modules/rule/protocol.html
|
||||
};
|
||||
NSString * url = [dic objectForKey:@(type)];
|
||||
return [NSString stringWithFormat:@"%@/%@",prefix, url];
|
||||
|
@@ -76,7 +76,7 @@
|
||||
- (NetImageView *)avaterImageView {
|
||||
if (!_avaterImageView) {
|
||||
_avaterImageView = [[NetImageView alloc] init];
|
||||
_avaterImageView.backgroundColor = UIColor.yellowColor;
|
||||
// _avaterImageView.backgroundColor = UIColor.yellowColor;
|
||||
_avaterImageView.layer.cornerRadius = 24;
|
||||
_avaterImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@
|
||||
_avaterImageView = [[NetImageView alloc] init];
|
||||
_avaterImageView.layer.cornerRadius = 58/2.0;
|
||||
_avaterImageView.layer.masksToBounds = YES;
|
||||
_avaterImageView.backgroundColor = UIColor.redColor;
|
||||
// _avaterImageView.backgroundColor = UIColor.redColor;
|
||||
|
||||
}
|
||||
return _avaterImageView;
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#import "UIView+NIM.h"
|
||||
#import "UIView+FilletCorner.h"
|
||||
#import "YMMacro.h"
|
||||
#import "NewEncryptTool.h"
|
||||
@interface MewSessionListTableViewCell()
|
||||
|
||||
/// 内容
|
||||
@@ -44,7 +45,7 @@
|
||||
- (void)renderWithSession:(NIMRecentSession *)recent {
|
||||
_session = recent;
|
||||
NIMUser *user = [[NIMSDK sharedSDK].userManager userInfo:recent.session.sessionId];
|
||||
self.avatarImageView.imageUrl = user.userInfo.avatarUrl;
|
||||
self.avatarImageView.imageUrl = (user.userInfo.avatarUrl == nil || user.userInfo.avatarUrl.length == 0) ? [NewEncryptTool MEW_aesDecrypt:@"xdPnNelVD/RTlTKFqgSrESDPcNF6Diqb8sLg+HEvxpvjDdTLom1euQUOAOppjx15"] : user.userInfo.avatarUrl;
|
||||
self.nameLabel.text = user.userInfo.nickName;
|
||||
[self.nameLabel sizeToFit];
|
||||
|
||||
|
@@ -14,6 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
- (void)didSelectMewRechargeChargeProdId:(NSString *)chargeProdId;
|
||||
|
||||
- (void)didSelectMewRechargeProtocol;
|
||||
|
||||
@end
|
||||
|
||||
@interface MewRechargeSubView : UIView
|
||||
|
@@ -264,10 +264,10 @@
|
||||
@kWeakify(self);
|
||||
[rechargeAttString yy_setTextHighlightRange:NSMakeRange(0, rechargeAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
// [self dismissViewControllerAnimated:NO completion:nil];
|
||||
// XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
// webVC.url = @"yinmeng/modules/rule/rechargeAgreement.html";
|
||||
// [self.currentNav pushViewController:webVC animated:YES];
|
||||
if (self.delegate) {
|
||||
[self.delegate didSelectMewRechargeProtocol];
|
||||
}
|
||||
|
||||
|
||||
} longPressAction:nil];
|
||||
|
||||
|
@@ -8,6 +8,7 @@
|
||||
#import "MewRechargeViewController.h"
|
||||
/// View
|
||||
#import "MewRechargeSubView.h"
|
||||
#import "YMWebViewController.h"
|
||||
/// Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import "YMMacro.h"
|
||||
@@ -19,6 +20,8 @@
|
||||
#import "YMHUDTool.h"
|
||||
#import "yinmeng_ios-Swift.h"
|
||||
#import "RechargeStorage.h"
|
||||
#import "NewEncryptTool.h"
|
||||
|
||||
@interface MewRechargeViewController ()<MineRechargeProtocol, MewRechargeSubViewDelegate, YMIAPHelperDelegate>
|
||||
@property (nonatomic, strong) UIImageView *rechargeBgImageView;
|
||||
@property (nonatomic, strong) UIButton *backButton;
|
||||
@@ -205,6 +208,16 @@
|
||||
[YMHUDTool showLoadingInView:kWindow];
|
||||
[self.presenter requestIAPRechargeOrderWithChargeProdId:chargeProdId];
|
||||
}
|
||||
/// 选中用户协议
|
||||
- (void)didSelectMewRechargeProtocol {
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
YMWebViewController * webVC = [[YMWebViewController alloc] init];
|
||||
/// mew/modules/rule/rechargeAgreement.html
|
||||
|
||||
NSString *rechageProtocol = [NewEncryptTool MEW_aesDecrypt:@"3fYQzValG55yGNx2mWnN7NvVzsWc9cmKVWuOUkwu8a9ALvqUxXRhaWrnne5rd9oR"];
|
||||
webVC.url = rechageProtocol;
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - YMIAPHelperDelegate
|
||||
|
||||
|
@@ -11,15 +11,17 @@
|
||||
#import "YYUtility.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "ThemeColor.h"
|
||||
#import "YMMacro.h"
|
||||
#import "NewEncryptTool.h"
|
||||
/// Third
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
static const NSString *CompanyFirstDomainByWeChatRegister = @"api.uat.lecheng163.com";
|
||||
#else
|
||||
static const NSString *CompanyFirstDomainByWeChatRegister = @"api.lecheng163.com";
|
||||
#endif
|
||||
//#ifdef DEBUG
|
||||
//static const NSString *CompanyFirstDomainByWeChatRegister = @"api.uat.lecheng163.com";
|
||||
//#else
|
||||
//static const NSString *CompanyFirstDomainByWeChatRegister = @"api.lecheng163.com";
|
||||
//#endif
|
||||
|
||||
|
||||
@interface WeakWebViewScriptMessageDelegate : NSObject<WKScriptMessageHandler>
|
||||
@@ -55,8 +57,6 @@ static const NSString *CompanyFirstDomainByWeChatRegister = @"api.lecheng163.com
|
||||
NSString * const kJSGetUid = @"getUid";
|
||||
@interface YMWebViewController ()<WKNavigationDelegate, WKScriptMessageHandler>
|
||||
@property (strong, nonatomic) WKWebView *webview;
|
||||
@property (strong, nonatomic) UIProgressView *progressView;
|
||||
@property (nonatomic, strong) WKUserContentController *mew_userContentController;
|
||||
|
||||
@end
|
||||
|
||||
@@ -66,6 +66,8 @@ NSString * const kJSGetUid = @"getUid";
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view.
|
||||
[self initView];
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@/%@", [NewEncryptTool MEW_aesDecrypt: API_HOST_H5_URL], self.url];
|
||||
[self.webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
|
||||
}
|
||||
|
||||
|
||||
@@ -84,73 +86,6 @@ NSString * const kJSGetUid = @"getUid";
|
||||
}
|
||||
}
|
||||
|
||||
- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message {
|
||||
[self.webview evaluateJavaScript:@"document.location.href" completionHandler:^(id _Nullable response, NSError * _Nullable error) {
|
||||
NSString *currentUrl = [NSString stringWithFormat:@"%@", response];
|
||||
if (currentUrl != nil) {
|
||||
if ([message.name isEqualToString:kJSGetUid]) {
|
||||
NSString *uid = [[AccountInfoStorage instance] getUid];
|
||||
NSString *js = [NSString stringWithFormat:@"getMessage(\"uid\",%@)", uid];
|
||||
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable other, NSError * _Nullable error) {
|
||||
NSLog(@"%@",error);
|
||||
}];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential * _Nullable))completionHandler{
|
||||
if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust]) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSURLCredential *card = [[NSURLCredential alloc]initWithTrust:challenge.protectionSpace.serverTrust];
|
||||
completionHandler(NSURLSessionAuthChallengeUseCredential,card);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
//加载完成
|
||||
- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
|
||||
//加载完成后隐藏progressView
|
||||
self.progressView.hidden = YES;
|
||||
|
||||
}
|
||||
|
||||
//加载失败
|
||||
- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(WKNavigation *)navigation withError:(NSError *)error {
|
||||
//加载失败同样需要隐藏progressView
|
||||
self.progressView.hidden = YES;
|
||||
|
||||
}
|
||||
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary<NSString *,id> *)change context:(void *)context {
|
||||
if ([keyPath isEqualToString:@"estimatedProgress"]) {
|
||||
self.progressView.progress = self.webview.estimatedProgress;
|
||||
if (self.progressView.progress == 1) {
|
||||
__weak typeof (self)weakSelf = self;
|
||||
[UIView animateWithDuration:0.25f delay:0.3f options:UIViewAnimationOptionCurveEaseOut animations:^{
|
||||
weakSelf.progressView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
|
||||
} completion:^(BOOL finished) {
|
||||
weakSelf.progressView.hidden = YES;
|
||||
}];
|
||||
}
|
||||
} else if ([keyPath isEqualToString:@"title"]) {
|
||||
if (object == self.webview) {
|
||||
self.navigationItem.title = self.webview.title;
|
||||
// if (self.urlLoadCompleted) {//半屏webview如果在加载完成回调后标题还会改变,在此处重新设置一遍
|
||||
// self.urlLoadCompleted(YES, nil);
|
||||
// }
|
||||
}else{
|
||||
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
||||
}
|
||||
} else {
|
||||
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[self.webview removeObserver:self forKeyPath:@"estimatedProgress"];
|
||||
[self.webview removeObserver:self forKeyPath:@"title"];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - InitView
|
||||
- (void)initView {
|
||||
@@ -164,7 +99,6 @@ NSString * const kJSGetUid = @"getUid";
|
||||
make.left.right.top.bottom.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.view addSubview:self.progressView];
|
||||
|
||||
}
|
||||
|
||||
@@ -174,36 +108,10 @@ NSString * const kJSGetUid = @"getUid";
|
||||
if (_url == nil) {
|
||||
return;
|
||||
}
|
||||
if (![_url hasPrefix:@"http"] && ![_url hasPrefix:@"https"]){
|
||||
_url = [NSString stringWithFormat:@"%@/%@", API_HOST_H5_URL, _url];
|
||||
}
|
||||
|
||||
if (![_url containsString:@"?"]) {
|
||||
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
|
||||
} else {
|
||||
_url = [NSString stringWithFormat:@"%@&platform=%@", _url, [YYUtility appName]];
|
||||
}
|
||||
|
||||
|
||||
// 去掉 urlString 中的空格。
|
||||
NSString *noSpaceTextUrl = [_url stringByReplacingOccurrencesOfString:@" " withString:@""];
|
||||
|
||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:noSpaceTextUrl]];
|
||||
|
||||
[self.webview loadRequest:request];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Get
|
||||
- (UIProgressView *)progressView{
|
||||
if (!_progressView) {
|
||||
_progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(0, 0, [[UIScreen mainScreen] bounds].size.width, 1)];
|
||||
_progressView.progressTintColor = UIColor.blackColor;
|
||||
_progressView.trackTintColor = [UIColor clearColor];
|
||||
_progressView.transform = CGAffineTransformMakeScale(1.0f, 1.0f);
|
||||
}
|
||||
return _progressView;
|
||||
}
|
||||
|
||||
- (WKWebView *)webview {
|
||||
if (_webview == nil) {
|
||||
@@ -214,107 +122,18 @@ NSString * const kJSGetUid = @"getUid";
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
configuration.allowsInlineMediaPlayback = YES;
|
||||
|
||||
NSString *uid = [[AccountInfoStorage instance] getUid];
|
||||
NSString *realCookie = [NSString stringWithFormat:@"%@=%@",@"uid",uid];
|
||||
|
||||
WKUserScript *cookieScript = [[WKUserScript alloc] initWithSource: [NSString stringWithFormat:@"document.cookie = '%@';", realCookie] injectionTime:WKUserScriptInjectionTimeAtDocumentStart forMainFrameOnly:NO];
|
||||
[self.mew_userContentController addUserScript:cookieScript];
|
||||
///禁止缩放
|
||||
NSString *scaleJs = @"$('meta[name=description]').remove(); $('head').append( '<meta name=\"viewport\" content=\"width=device-width, initial-scale=1,user-scalable=no\">' );";
|
||||
WKUserScript *scaleScript = [[WKUserScript alloc] initWithSource:scaleJs injectionTime:WKUserScriptInjectionTimeAtDocumentEnd forMainFrameOnly:NO];
|
||||
[self.mew_userContentController addUserScript:scaleScript];
|
||||
|
||||
//根据生成的WKUserScript对象,初始化WKWebViewConfiguration
|
||||
configuration.preferences.javaScriptEnabled = YES;
|
||||
configuration.preferences.javaScriptCanOpenWindowsAutomatically = YES;
|
||||
configuration.preferences.minimumFontSize = 10;
|
||||
configuration.selectionGranularity = WKSelectionGranularityCharacter;
|
||||
configuration.userContentController = self.mew_userContentController;
|
||||
|
||||
CGSize size = [UIScreen mainScreen].bounds.size;
|
||||
_webview = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, size.width,size.height) configuration:configuration];
|
||||
|
||||
_webview.navigationDelegate = self;
|
||||
//添加KVO,WKWebView有一个属性estimatedProgress,就是当前网页加载的进度,所以监听这个属性
|
||||
[_webview addObserver:self forKeyPath:@"estimatedProgress" options:NSKeyValueObservingOptionNew context:nil];
|
||||
//添加KVO,监听title属性
|
||||
[_webview addObserver:self forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:NULL];
|
||||
|
||||
_webview = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||
|
||||
UISwipeGestureRecognizer *swipeGesture = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selector(backButtonClick)];
|
||||
[_webview addGestureRecognizer:swipeGesture];
|
||||
|
||||
[_webview.scrollView setShowsVerticalScrollIndicator:NO];
|
||||
[_webview.scrollView setShowsHorizontalScrollIndicator:NO];
|
||||
|
||||
//set useragent
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[_webview evaluateJavaScript:@"navigator.userAgent" completionHandler:^(id result, NSError *error) {
|
||||
NSString *userAgent = result;
|
||||
|
||||
if (![userAgent containsString:@"tutuAppIos erbanAppIos"]){
|
||||
NSString *newUserAgent = [userAgent stringByAppendingString:@" tutuAppIos erbanAppIos"];
|
||||
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:newUserAgent, @"UserAgent", nil];
|
||||
[[NSUserDefaults standardUserDefaults] registerDefaults:dictionary];
|
||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||
[weakSelf.webview setCustomUserAgent:newUserAgent];
|
||||
}
|
||||
|
||||
}];
|
||||
_webview.scrollView.bounces = NO;
|
||||
}
|
||||
return _webview;
|
||||
}
|
||||
|
||||
- (WKUserContentController *)mew_userContentController{
|
||||
if (!_mew_userContentController) {
|
||||
//自定义的WKScriptMessageHandler 是为了解决内存不释放的问题
|
||||
WeakWebViewScriptMessageDelegate *weakScriptMessageDelegate = [[WeakWebViewScriptMessageDelegate alloc] initWithDelegate:self];
|
||||
_mew_userContentController = [[WKUserContentController alloc] init];
|
||||
// 获取uid
|
||||
[_mew_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetUid];
|
||||
// 分享面板
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenSharePage];
|
||||
// // 钱包页面
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenPurse];
|
||||
// // 充值页面
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenChargePage];
|
||||
// // 获取uid
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetUid];
|
||||
// // 获取设备id
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetDeviceId];
|
||||
// // 获取Ticket
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetTicket];
|
||||
// // 获取设备info
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetDeviceInfo];
|
||||
// // 实人认证: 打开原生人脸认证
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenFaceLiveness];
|
||||
// // 分享按钮
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSInitNav];
|
||||
// // 获取房间uid
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSGetRoomUid];
|
||||
// // 进入个人主页
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kOpenPersonPage];
|
||||
// // 隐藏导航栏
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kInitShowNav];
|
||||
// // 隐藏导航栏
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kCloseWebView];
|
||||
// //装扮及其他活动页面
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJumpAppointPage];
|
||||
// //进入房间
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenRoom];
|
||||
// //进房并弹出礼物面板
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kJSOpenRoomForGiftId];
|
||||
// ///禁用侧滑手势
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kProhibitRightSlip];
|
||||
/////保存图片到本地
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kSaveBase64Image];
|
||||
// // 卡罗牌
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kOpenDialogWebview];
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kCheckResultFinish];
|
||||
// [_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kOpenNativeTarotPay];
|
||||
}
|
||||
return _mew_userContentController;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "YMHUDTool.h"
|
||||
#import "NewEncryptTool.h"
|
||||
///Model
|
||||
#import "ThirdUserInfo.h"
|
||||
/// presenter
|
||||
@@ -119,7 +120,7 @@
|
||||
if ([self.presenter getThirdUserInfo] && [self.presenter getThirdUserInfo].avatarUrl.length > 0) {
|
||||
avatar = [self.presenter getThirdUserInfo].avatarUrl;
|
||||
} else {
|
||||
avatar = @"https://image.nnbc123.cn/default_avatar.png";
|
||||
avatar = [NewEncryptTool MEW_aesDecrypt:@"xdPnNelVD/RTlTKFqgSrESDPcNF6Diqb8sLg+HEvxpvjDdTLom1euQUOAOppjx15"];
|
||||
}
|
||||
return avatar;
|
||||
}
|
||||
|
@@ -239,9 +239,9 @@
|
||||
// } 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 = NO;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
microQueueChanged = YES;
|
||||
@@ -402,6 +402,13 @@
|
||||
[view configRoomInfo:roomInfo];
|
||||
[view configMicQueue:self.micQueue];
|
||||
[view configMicroView:model];
|
||||
if (self.hostDelegate.getUserInfo.uid && model.userInfo.uid == self.hostDelegate.getUserInfo.uid) {
|
||||
selfNeedBroadcast = model.microState.micState == MicroMicStateType_Open;
|
||||
}
|
||||
if (model.microState.micState == MicroMicStateType_Close) {
|
||||
[RtcManager instance].localMuted = YES;
|
||||
}
|
||||
|
||||
// [view showLeaveMode:(i == 0 && leaveMode)];
|
||||
|
||||
}
|
||||
@@ -409,7 +416,7 @@
|
||||
if (!isHandleRTC) {
|
||||
return;
|
||||
}
|
||||
[[RtcManager instance] broadcast:YES];
|
||||
[[RtcManager instance] broadcast:selfNeedBroadcast];
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user