Commit dfcf1a93 by ludi

修复一系列bug

parent b427d222
Showing with 123 additions and 31 deletions
......@@ -369,6 +369,7 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
// 检测包的完整性
if (![mSocketQueue fus_checkDataAvailable]) {
FUSLogInfo(@"--->socket完整性欠缺:socketAcceptMessageWithData\n");
[self fus_socketReconnectWithBlock:^(BOOL isSuccess) {
}];
......@@ -391,13 +392,13 @@ typedef void(^ConnectBlock)(BOOL isSuccess); // 连接回调
/// 并且showAppBinary大于等于2位(因为fusi是第二位的布尔值表示,且这个数值是从右往左读的,所以要取倒数第二位的数值)
/// 并且showAppBinary的第二位是1
/// 则这个socket在fusi中不处理
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug && messageModel.cid) FUSLogInfo(@"--->收到过滤消息:\n showAppBinary = %@", showAppBinary);
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug /*&& messageModel.cid*/) FUSLogInfo(@"--->收到过滤消息:\n showAppBinary = %@", showAppBinary);
return;
}
}
}
// 打印收到的消息
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug && messageModel.cid) FUSLogInfo(@"--->收到消息:\n%@", [messageModel fus_getDictionary]);
if ([FUSConfig sharedInstanced].devConfigs.enableSocketDebug /*&& messageModel.cid*/) FUSLogInfo(@"--->收到消息:\n%@", [messageModel fus_getDictionary]);
// 判断消息是否为空
if ([NSObject isNullWithObject:messageModel]) {
......
......@@ -14,6 +14,7 @@
#import "FUSPublicLiveGiftSendView.h"
#import "FUSPublicVideoChatUserInfoView.h"
#import "FUSPublicLiveBeautyParameterView.h"
#import "FUSSocialShareManager.h"
#define FUSLiveModule BFModule(FUSLiveRouterProtocol)
......@@ -115,6 +116,13 @@ NS_ASSUME_NONNULL_BEGIN
/// 发送弹幕
-(void)fus_showInputWithSendBarrage:(NSInteger)barrageId;
/// 显示分享页面
/// - Parameters:
/// - showOnView: 显示在哪
/// - shareHandler: 回调
-(void)fus_showShareViewWithShowOn:(UIView *)showOnView
shareHandler:(void(^)(SocialSharePlatform type))shareHandler;
@end
/// 直播间礼物面板的分页类型,区分打开背包后默认跳转到哪一个分页
......
......@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>72</integer>
<integer>74</integer>
</dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>73</integer>
<integer>77</integer>
</dict>
</dict>
</dict>
......
......@@ -68,8 +68,18 @@ import SJAttributesStringMaker
/// 是否够下次通话付款 1:是 0:否
let diamondAgainPay = BehaviorRelay<Int>(value: 1)
/// OC 是否够下次通话付款 1:是 0:否
@objc public var oc_diamondAgainPay: Int{
get{ diamondAgainPay.value }
set{ diamondAgainPay.accept(newValue) }
}
/// 提示充钱之前有没有送过礼
let sendGiftDuringAgainPay = BehaviorRelay<Bool>(value: false)
/// OC 提示充钱之前有没有送过礼
@objc public var oc_sendGiftDuringAgainPay: Bool{
get{ sendGiftDuringAgainPay.value }
set{ sendGiftDuringAgainPay.accept(newValue) }
}
// 收到礼物本地计数
var receiveGiftCount = 0
......@@ -563,8 +573,9 @@ import SJAttributesStringMaker
func fus_callConnectSuccesReport(callId: String){
FUSIMChatHttpHelper.fus_requestOneToOneCallConnectSuccess(with: callId) {
} failure: { msg, code in
} failure: {[weak self] msg, code in
FUSDialogView.fus_showDialog(msg)
self?.endCall(reason: .requestConnectSuccessFail)
}
}
......
......@@ -3444,6 +3444,10 @@
// 更新用户的宝石
[[FUSCacheDataShare shareStore].userDetailInfo fus_setValueWithDict:dataDict[@"cv"][@"changed"]];
// 控制送礼是否显示通话剩余不足一分钟提示
[FUSChatCallHelper shared].oc_sendGiftDuringAgainPay = YES;
[FUSChatCallHelper shared].oc_diamondAgainPay = [dataDict[@"checkPay"] integerValue];
// 透传消息需要的参数
_callGiftGid = giftID;
_callGiftRichLevel = [FUSCacheDataShare shareStore].userDetailInfo.level;
......
......@@ -274,6 +274,7 @@ class FUSCallEndCallDetailAlertView: FUSBaseView {
make.image = .fus_diamonIcon()
make.alignment = .center
}
make.append(" ")
make.append("\(incomeModel.timeGemNum)").textColor(.fus_diamondBlue())
}else {
make.append(.fus_versionLocalString("免费")).textColor(.white)
......@@ -286,6 +287,7 @@ class FUSCallEndCallDetailAlertView: FUSBaseView {
make.image = incomeModel.timeIncome.fus_getCurrencyIcon()
make.alignment = .center
}
make.append(" ")
make.append("\(incomeModel.timeIncome.total)").textColor(incomeModel.timeIncome.fus_getCurrencyTextColor())
}else {
make.append(.fus_versionLocalString("免费")).textColor(.white)
......@@ -303,12 +305,14 @@ class FUSCallEndCallDetailAlertView: FUSBaseView {
make.image = .fus_diamonIcon()
make.alignment = .center
}
make.append(" ")
make.append("\(incomeModel.giftGemNum)").textColor(.fus_diamondBlue())
}else {
make.append { make in
make.image = .fus_fireIcon()
make.alignment = .center
}
make.append(" ")
make.append("\(incomeModel.giftIncome)").textColor(.fus_fireGreen())
}
make.font(.fus_themeMediumFont(17))
......
......@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>74</integer>
<integer>75</integer>
</dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>76</integer>
<integer>72</integer>
</dict>
</dict>
</dict>
......
......@@ -171,7 +171,7 @@
self.segmentView = [[FUSSegmentControlView alloc] initWithFrame:CGRectMake(5, 0, self.topView.width - 5, self.topView.height)];
self.segmentView.alignment = FUSSegmentControlAlignmentLeft;
self.segmentView.segmentDelegate = self;
self.segmentView.isShowSelectedBgImgView = YES;
// self.segmentView.isShowSelectedBgImgView = YES;
self.segmentView.isShowUnderLine = YES;
[self.segmentView fus_setUnderLineSelectedImage:UIImage.fus_segmentSelectedDot];
self.segmentView.itemFont = [UIFont fus_themeFont:13];
......@@ -1011,8 +1011,8 @@
NSRange hotnumRange = [thirdStr rangeOfString:parcelModel.hotnum];
NSMutableAttributedString *attributedStr = [[NSMutableAttributedString alloc] initWithString:thirdStr];
[attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:@"#808080"] range:NSMakeRange(0, thirdStr.length)];
[attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"58DBD7"]} range:bondsRange];
[attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"58DBD7"]} range:hotnumRange];
[attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor fus_fireGreen]} range:bondsRange];
[attributedStr setAttributes:@{NSForegroundColorAttributeName:[UIColor fus_fireGreen]} range:hotnumRange];
return attributedStr;
} else {
return [[NSMutableAttributedString alloc] init];
......
......@@ -26,6 +26,7 @@
#import "FUSHomePageViewController.h"
#import <FUSCommon/FUSCommon-Swift.h>
#import <FUSShowRoomModule/FUSShowRoomModule-Swift.h>
@implementation FUSShowRoomRouter
......@@ -408,6 +409,9 @@
}];
}
- (void)fus_showShareViewWithShowOn:(UIView *)showOnView shareHandler:(void (^)(SocialSharePlatform))shareHandler{
[FUSShareToolSheetView fus_showShareViewWithShowOn:showOnView shareHandler:shareHandler];
}
#pragma mark - HTTP
/**
......
......@@ -7,12 +7,12 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>77</integer>
<integer>76</integer>
</dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>75</integer>
<integer>73</integer>
</dict>
</dict>
</dict>
......
......@@ -183,6 +183,11 @@
_passwordTextFieldOne.shouldPaste = NO;
_passwordTextFieldTwo.shouldPaste = NO;
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_verifyTextField.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextFieldOne.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextFieldTwo.clearButtonColor = [UIColor fus_textColorMedium];
// 显示传过来的电话号码
if (![NSString isNull:_phone]) {
_phoneTextField.text = self.phone;
......
......@@ -116,6 +116,7 @@
// 设置文本框长度
_phoneTextField.textMaxLength = 13;
_phoneTextField.inputType = FUSInputTypeNumber;
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_phoneTextField.fus_delegate = self;
_phoneTextField.delegate = self;
......
......@@ -138,6 +138,8 @@
[_phoneTextField addTarget:self action:@selector(textFieldDidBeginEditing:) forControlEvents:UIControlEventEditingDidBegin];
[_passwordTextField addTarget:self action:@selector(textFieldDidBeginEditing:) forControlEvents:UIControlEventValueChanged];
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextField.clearButtonColor = [UIColor fus_textColorMedium];
_areaCodeTextField.textMaxLength = 4;
_areaCodeTextField.displayOnly = YES;
......
......@@ -264,6 +264,11 @@
_areaCodeTextField.textMaxLength = 4;
_areaCodeTextField.displayOnly = YES;
_phoneTextField.clearButtonColor = [UIColor fus_textColorMedium];
_codeTextField.clearButtonColor = [UIColor fus_textColorMedium];
_passwordTextField.clearButtonColor = [UIColor fus_textColorMedium];
_registCodeTextField.clearButtonColor = [UIColor fus_textColorMedium];
// 设置文本框输入长度
_phoneTextField.textMaxLength = 13;
_phoneTextField.delegate = self;
......
......@@ -779,25 +779,62 @@
- (void)fus_showToolViewWithDelete:(BOOL)need isSelf:(BOOL)isSelf commentId:(NSInteger)commentId success:(void (^)(void))success {
FUSNewsFeedDetailToolView *toolView = [[FUSNewsFeedDetailToolView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)];
[[UIApplication sharedApplication].keyWindow addSubview:toolView];
[toolView fus_showViewNeedToolBtn:need isSelf:isSelf showSetDateVideo:NO];
__weak typeof(self) weakSelf = self;
toolView.onClickDeleteBlock = ^{
MJWeakSelf
if (need) {
[FUSActionSheetView showAcionSheetWithCancelTitle:[NSString fus_versionLocalString:@"取消"] otherTitles:@[[NSString fus_versionLocalString:@"追踪"],[NSString fus_versionLocalString:@"分享"],isSelf ? [NSString fus_versionLocalString:@"删除"] : [NSString fus_versionLocalString:@"举报"]] clickBlock:^(NSInteger buttonIndex, NSString *buttonTitle) {
switch (buttonIndex) {
case 0:
{
// 追踪
if (isSelf) {
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"自己不能關注自己哦"]];
}else {
[[FUSRouter liveRouter] fus_likeRoomWithRoomId:weakSelf.model.uid success:^{
[FUSDialogView fus_showDialog:[NSString fus_localString:@"追踪成功"]];
} failure:^(NSString * _Nonnull msg, int code) {
[FUSDialogView fus_showDialog:msg];
}];
}
}
break;
case 1:
{
// 分享
[[FUSRouter liveRouter] fus_showShareViewWithShowOn:[UIWindow fus_keyWindow] shareHandler:^(SocialSharePlatform type) {
[weakSelf fus_shareNewsFeedWithPlatform:type];
}];
}
break;
case 2:
{
// 删除或者举报
if (isSelf) {
// 删除
if (commentId) {
[weakSelf fus_deleteNewsFeedCommentWithTopicId:weakSelf.model.topicId.integerValue commentId:commentId success:success];
} else {
[weakSelf fus_deleteNewsFeedWithTopicId:weakSelf.model.topicId];
}
};
toolView.onClickShareBlock = ^(SocialSharePlatform platform) {
[weakSelf fus_shareNewsFeedWithPlatform:platform];
};
toolView.onClickReportBlock = ^{
}else{
// 举报
[weakSelf fus_showReportViewWithTopicId:weakSelf.model.topicId commentId:commentId];
};
}
}
break;
case 3:
// 取消
break;
default:
break;
}
}];
}else {
// 分享
[[FUSRouter liveRouter] fus_showShareViewWithShowOn:[UIWindow fus_keyWindow] shareHandler:^(SocialSharePlatform type) {
[weakSelf fus_shareNewsFeedWithPlatform:type];
}];
}
}
- (void)fus_clickAuthItem {
......
......@@ -66,7 +66,12 @@
[self.backBtn addTarget:self action:@selector(popViewController) forControlEvents:UIControlEventTouchUpInside];
[self fus_updateBottomTableView];
// [self fus_updateVideoSetting];
// [self fus_updateVideoSetting];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(fus_applicationDidBecomeActiveNotification:)
name:UIApplicationDidBecomeActiveNotification
object:nil];
}
- (void)viewWillAppear:(BOOL)animated {
......@@ -104,13 +109,18 @@
MJWeakSelf
[FUSSettingHttpRequest fus_userManagerVoiceSignGetSuccess:^(FUSUserManagerVoiceSignModel *model) {
weakSelf.voiceSignModel = model;
// weakSelf.headerView.voiceSignModel = model;
// weakSelf.headerView.voiceSignModel = model;
[weakSelf.bottomTableView reloadData];
} failure:^(NSString *msg, int code) {
}];
}
#pragma mark - notification
-(void)fus_applicationDidBecomeActiveNotification:(NSNotification *)noti{
[self.bottomTableView reloadData];
}
#pragma mark - UITableViewDelegate && UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
......
......@@ -384,7 +384,7 @@
[headerView addSubview:bellView];
UILabel *titleLabel = [[UILabel alloc] init];
titleLabel.text = [NSString fus_localString:@"通知权限已关闭,无法接收通知"];
titleLabel.text = [NSString fus_versionLocalString:@"通知權限未開啓,您將無法收到訊息通知"];
titleLabel.font = [UIFont fus_themeFont:15];
titleLabel.textColor = [UIColor fus_textColorMedium];
titleLabel.numberOfLines = 0;
......@@ -392,7 +392,7 @@
[headerView addSubview:titleLabel];
UIButton *settingBtn = [UIButton buttonWithType:UIButtonTypeCustom];
[settingBtn setTitle:[NSString stringWithFormat:@" %@ ",[NSString fus_localString:@"去开启"]] forState:UIControlStateNormal];
[settingBtn setTitle:[NSString stringWithFormat:@" %@ ",[NSString fus_versionLocalString:@"开启"]] forState:UIControlStateNormal];
settingBtn.titleLabel.font = [UIFont fus_themeFont:13];
[settingBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal];
settingBtn.backgroundColor = [UIColor fus_themeColor];
......
......@@ -114,12 +114,12 @@ import UIKit
titleLabel.font = isNormal ? .fus_themeFont(14) : .fus_themeFont(16)
titleLabel.textColor = .fus_textColorRich()
titleLabel.text = isNormal ? .fus_versionLocalString("开启通知权限,您可以第一时间收到") : .fus_versionLocalString("开启通知权限")
titleLabel.text = isNormal ? .fus_versionLocalString("開啓通知,您將第一時間收到重要訊息") : .fus_versionLocalString("开启通知权限")
titleLabel.textAlignment = isNormal ? .left : .center
contentView.addSubview(titleLabel)
subtitleLabel.font = isNormal ? .fus_themeFont(10) : .fus_themeFont(13)
subtitleLabel.text = isNormal ? .fus_versionLocalString("通知是我们主动为您提供讯息服务的重要功能,您可以随时决定收到哪一类的通知") : .fus_versionLocalString("开启通知权限,您可以第一时间收到")
subtitleLabel.text = isNormal ? .fus_versionLocalString("通知是我们主动为您提供讯息服务的重要功能,您可以随时决定收到哪一类的通知") : .fus_versionLocalString("開啓通知,您將第一時間收到重要訊息")
subtitleLabel.textColor = isNormal ? .fus_textColorLight2() : .fus_textColorRich()
subtitleLabel.numberOfLines = 0
contentView.addSubview(subtitleLabel)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment