Commit 41746f20 by ludi

修复一些bug

parent c37dd5eb
Showing with 88 additions and 44 deletions
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
//粉丝 //粉丝
NSInteger unreadCount = self.fansUnreadCount; NSInteger unreadCount = self.fansUnreadCount;
//如果粉丝新增是0,那么看看其他的需不需要显示红点 //如果粉丝新增是0,那么看看其他的需不需要显示红点
if (unreadCount == 0) { if (unreadCount <= 0) {
BOOL otherShouldShow = NO; BOOL otherShouldShow = NO;
...@@ -231,6 +231,8 @@ ...@@ -231,6 +231,8 @@
if (!otherShouldShow) { if (!otherShouldShow) {
unreadCount = -1; unreadCount = -1;
}else {
unreadCount = 0;
} }
} }
[self.myBtn fus_setBadgeValue:unreadCount]; [self.myBtn fus_setBadgeValue:unreadCount];
......
...@@ -309,6 +309,7 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -309,6 +309,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param needShowSkipBtn 是否显示跳过按钮 /// @param needShowSkipBtn 是否显示跳过按钮
/// @param success 1 /// @param success 1
-(void)fus_showBindAgentPageWithNeedShowSkipBtn:(BOOL)needShowSkipBtn -(void)fus_showBindAgentPageWithNeedShowSkipBtn:(BOOL)needShowSkipBtn
showEnterInviteCodeBtn:(BOOL)showEnterInviteCodeBtn
success:(void(^)(void))success; success:(void(^)(void))success;
/// 注册的时候,绑定使者页面 /// 注册的时候,绑定使者页面
......
...@@ -3172,3 +3172,6 @@ ...@@ -3172,3 +3172,6 @@
"请联系您的邀请人获得邀请QRCode" = "請聯繫您的邀請人獲得邀請QRCode"; "请联系您的邀请人获得邀请QRCode" = "請聯繫您的邀請人獲得邀請QRCode";
"已关闭窗帘,玩家输入密码打开" = "已關閉窗簾,玩家輸入密碼打開";
"#$1#天以上未登入#$2#的玩家,将会自动断开使者关系" = "#$1#天以上未登入#$2#的玩家,將會自動斷開使者關係";
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
titleLabel.textAlignment = NSTextAlignmentCenter; titleLabel.textAlignment = NSTextAlignmentCenter;
titleLabel.font = [UIFont fus_themeMediumFont:18]; titleLabel.font = [UIFont fus_themeMediumFont:18];
titleLabel.textColor = [UIColor fus_textColorRich]; titleLabel.textColor = [UIColor fus_textColorRich];
titleLabel.numberOfLines = 0;
titleLabel.text = [NSString fus_localString:@"未发现追踪的主播直播"]; titleLabel.text = [NSString fus_localString:@"未发现追踪的主播直播"];
[self.contentView addSubview:titleLabel]; [self.contentView addSubview:titleLabel];
......
...@@ -127,7 +127,7 @@ import RxSwift ...@@ -127,7 +127,7 @@ import RxSwift
let attributedTitle = NSAttributedString( let attributedTitle = NSAttributedString(
string: .fus_localString("私信问密码"), string: .fus_localString("私信问密码"),
attributes: [ attributes: [
.foregroundColor: UIColor.fus_theme() ?? .black, .foregroundColor: UIColor.fus_diamondBlue() ?? .black,
.underlineStyle: NSUnderlineStyle.single.rawValue, .underlineStyle: NSUnderlineStyle.single.rawValue,
.font: UIFont.fus_themeFont(13) ?? .systemFont(ofSize: 13) .font: UIFont.fus_themeFont(13) ?? .systemFont(ofSize: 13)
] ]
......
...@@ -102,8 +102,8 @@ import FUSCommon ...@@ -102,8 +102,8 @@ import FUSCommon
//这里特殊用户有不一样的逻辑 //这里特殊用户有不一样的逻辑
let iconImagesList = ["live_start_openScope_cell","live_start_passwordScope_cell"/*,"live_start_intimacyScope_cell"*/] let iconImagesList = ["live_start_openScope_cell","live_start_passwordScope_cell"/*,"live_start_intimacyScope_cell"*/]
let titlesList = [String.fus_versionLocalString("公开屋"), .fus_versionLocalString("私享屋")/*, .fus_localString("亲密圈")*/] let titlesList = [String.fus_localString("公开屋"), .fus_localString("私享屋")/*, .fus_localString("亲密圈")*/]
let subTitlesList = [String.fus_localString("所有人可进入房间"), .fus_versionLocalString("已关闭窗帘,玩家输入密码打开")/*, .fus_localString("仅亲密好友可进入房间")*/] let subTitlesList = [String.fus_localString("所有人可进入房间"), .fus_localString("已关闭窗帘,玩家输入密码打开")/*, .fus_localString("仅亲密好友可进入房间")*/]
let itemHeight = 56.0 let itemHeight = 56.0
privacyContentView.snp.makeConstraints { make in privacyContentView.snp.makeConstraints { make in
......
...@@ -20,6 +20,7 @@ class FUSBindAgentInputCodeViewController: FUSBaseViewController { ...@@ -20,6 +20,7 @@ class FUSBindAgentInputCodeViewController: FUSBaseViewController {
super.viewDidLoad() super.viewDidLoad()
self.showBackBtn = true self.showBackBtn = true
self.fus_enableNavigationBack(withPop: .popViewController, withAnimated: true)
self.fus_setupNav() self.fus_setupNav()
self.fus_setupBottomViews() self.fus_setupBottomViews()
......
...@@ -27,7 +27,7 @@ import FUSCommon ...@@ -27,7 +27,7 @@ import FUSCommon
@objc public var type: FUSBindAgentViewControllerType = .bindAgent @objc public var type: FUSBindAgentViewControllerType = .bindAgent
public var needShowSkipBtn: Bool = true public var needShowSkipBtn: Bool = true
/// 需要显示手动输入邀请码 /// 需要显示手动输入邀请码
var needShowEnterAgentCodeBtn = true public var needShowEnterAgentCodeBtn = true
/// 是否开始扫描 /// 是否开始扫描
private let beginScan: BehaviorRelay<Bool> = .init(value: false) private let beginScan: BehaviorRelay<Bool> = .init(value: false)
...@@ -188,6 +188,7 @@ import FUSCommon ...@@ -188,6 +188,7 @@ import FUSCommon
describeLabel.textColor = .fus_textColorDeep() describeLabel.textColor = .fus_textColorDeep()
describeLabel.text = .fus_localString("扫描使者码QRCode图片完成绑定") describeLabel.text = .fus_localString("扫描使者码QRCode图片完成绑定")
describeLabel.textAlignment = .center describeLabel.textAlignment = .center
describeLabel.numberOfLines = 0
scanView.addSubview(describeLabel) scanView.addSubview(describeLabel)
borderView.layer.cornerRadius = 12 borderView.layer.cornerRadius = 12
...@@ -267,7 +268,7 @@ import FUSCommon ...@@ -267,7 +268,7 @@ import FUSCommon
func fus_setupCountDownLabel() { func fus_setupCountDownLabel() {
self.inviteCodeCountDownDisposeBag = .init() self.inviteCodeCountDownDisposeBag = .init()
self.subdescribeLabel.text = "" self.subdescribeLabel.text = " "
let startLeftTime = Int(FUSSwiftCacheDataShare.share.fus_calculateAgentLeftTime()) let startLeftTime = Int(FUSSwiftCacheDataShare.share.fus_calculateAgentLeftTime())
...@@ -285,7 +286,7 @@ import FUSCommon ...@@ -285,7 +286,7 @@ import FUSCommon
if leftTime < 0 { if leftTime < 0 {
if beginScan == true { if beginScan == true {
self?.qrcodeTipDescribeLabel.isHidden = false self?.qrcodeTipDescribeLabel.isHidden = false
return .init(string: "") return .init(string: " ")
}else { }else {
return .init(string: .fus_localString("请联系您的邀请人获得邀请QRCode")) return .init(string: .fus_localString("请联系您的邀请人获得邀请QRCode"))
} }
...@@ -319,7 +320,7 @@ import FUSCommon ...@@ -319,7 +320,7 @@ import FUSCommon
titleLabel.font = .fus_themeFont(14) titleLabel.font = .fus_themeFont(14)
titleLabel.textColor = .fus_textColorDeep() titleLabel.textColor = .fus_textColorDeep()
titleLabel.textAlignment = .center titleLabel.textAlignment = .center
titleLabel.numberOfLines = 2 titleLabel.numberOfLines = 0
superView.addSubview(titleLabel) superView.addSubview(titleLabel)
let btn = UIButton(type: .custom) let btn = UIButton(type: .custom)
...@@ -335,7 +336,7 @@ import FUSCommon ...@@ -335,7 +336,7 @@ import FUSCommon
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(imageView.snp.bottom).offset(8) make.top.equalTo(imageView.snp.bottom).offset(8)
} }
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
self = [super initWithFrame:frame]; self = [super initWithFrame:frame];
if (self) { if (self) {
[self fus_createUI]; [self fus_createUI];
[self fus_setupNotification];
} }
return self; return self;
} }
...@@ -262,6 +263,10 @@ ...@@ -262,6 +263,10 @@
[vipTouchBtn addTarget:self action:@selector(fus_vipBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside]; [vipTouchBtn addTarget:self action:@selector(fus_vipBtnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
} }
-(void)fus_setupNotification{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(fus_refreshFansUnreadCount:) name:FUSUserNotificationKeys.fus_Tabbar_Unread_Count_Fans object:nil];
}
#pragma mark --- button did clicked #pragma mark --- button did clicked
-(void)fus_vipBtnDidClicked:(UIButton *)btn{ -(void)fus_vipBtnDidClicked:(UIButton *)btn{
if (self.buttonDidClickedHander) { if (self.buttonDidClickedHander) {
...@@ -301,19 +306,7 @@ ...@@ -301,19 +306,7 @@
NSString *fansNumberString = [NSString isNull:model.followme] ? @"0" : model.followme; NSString *fansNumberString = [NSString isNull:model.followme] ? @"0" : model.followme;
self.fansNumLabel.text = fansNumberString; self.fansNumLabel.text = fansNumberString;
// 粉丝未读数 // 粉丝未读数
NSString *loginUid = [FUSCacheDataShare shareStore].userDetailInfo.uid; [self fus_reloadFansNumAdded];
NSDictionary *dict = [[NSUserDefaults standardUserDefaults] objectForKey:FUSUserUDKeys.fus_ZONE_FANS_UNREADER_COUNT];
if ([[dict allKeys] containsObject:loginUid]) {
NSInteger unreaderCount = [dict[loginUid][@"unreaderCount"] integerValue];
if (unreaderCount > 0) {
self.fansNumAddedLabel.hidden = NO;
self.fansNumAddedLabel.text = [NSString stringWithFormat:@" +%ld ",unreaderCount];
}else if (unreaderCount <= 0) {
self.fansNumAddedLabel.hidden = YES;
}
} else {
self.fansNumAddedLabel.hidden = YES;
}
// 等级 // 等级
NSString *levelString = [NSString isNull:model.lev] ? @"0" : model.lev; NSString *levelString = [NSString isNull:model.lev] ? @"0" : model.lev;
self.levelLabel.text = [NSString stringWithFormat:@"%@",levelString]; self.levelLabel.text = [NSString stringWithFormat:@"%@",levelString];
...@@ -345,6 +338,27 @@ ...@@ -345,6 +338,27 @@
self.vipMarkImgView.image = [UIImage fus_imageWithLevel:level]; self.vipMarkImgView.image = [UIImage fus_imageWithLevel:level];
} }
/// 重新加载粉丝新增数量
-(void)fus_reloadFansNumAdded{
NSString *loginUid = [FUSCacheDataShare shareStore].userDetailInfo.uid;
NSDictionary *dict = [[NSUserDefaults standardUserDefaults] objectForKey:FUSUserUDKeys.fus_ZONE_FANS_UNREADER_COUNT];
if ([[dict allKeys] containsObject:loginUid]) {
NSInteger unreaderCount = [dict[loginUid][@"unreaderCount"] integerValue];
if (unreaderCount > 0) {
self.fansNumAddedLabel.hidden = NO;
self.fansNumAddedLabel.text = [NSString stringWithFormat:@" +%ld ",unreaderCount];
}else if (unreaderCount <= 0) {
self.fansNumAddedLabel.hidden = YES;
}
} else {
self.fansNumAddedLabel.hidden = YES;
}
}
#pragma mark --- notification
-(void)fus_refreshFansUnreadCount:(NSNotification *)notification{
[self fus_reloadFansNumAdded];
}
#pragma mark --- getter and setter #pragma mark --- getter and setter
+ (CGFloat)fus_viewHeight{ + (CGFloat)fus_viewHeight{
...@@ -384,4 +398,9 @@ ...@@ -384,4 +398,9 @@
return _jewNumLabel; return _jewNumLabel;
} }
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end @end
...@@ -518,7 +518,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -518,7 +518,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
dict[loginUid] = @{@"uid":saveDic[@"uid"],@"unreaderCount":@(-1)}; dict[loginUid] = @{@"uid":saveDic[@"uid"],@"unreaderCount":@(-1)};
} }
[[NSUserDefaults standardUserDefaults] setObject:dict forKey:FUSUserUDKeys.fus_ZONE_FANS_UNREADER_COUNT]; [[NSUserDefaults standardUserDefaults] setObject:dict forKey:FUSUserUDKeys.fus_ZONE_FANS_UNREADER_COUNT];
[[NSNotificationCenter defaultCenter] postNotificationName:FUSUserNotificationKeys.fus_Tabbar_Unread_Count_Fans object:nil]; [[NSNotificationCenter defaultCenter] postNotificationName:FUSUserNotificationKeys.fus_Tabbar_Unread_Count_Fans object:dict];
} }
break; break;
...@@ -560,7 +560,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -560,7 +560,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
// FUSBoundAgentInfoView *agentView = [[FUSBoundAgentInfoView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)]; // FUSBoundAgentInfoView *agentView = [[FUSBoundAgentInfoView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)];
// agentView.leftTime = self.leftTime; // agentView.leftTime = self.leftTime;
// [agentView showWithView:[UIApplication sharedApplication].keyWindow]; // [agentView showWithView:[UIApplication sharedApplication].keyWindow];
[FUSRouter.userRouter fus_showBindAgentPageWithNeedShowSkipBtn:NO success:^{ [FUSRouter.userRouter fus_showBindAgentPageWithNeedShowSkipBtn:NO showEnterInviteCodeBtn:YES success:^{
[FUSRouter.userRouter fus_showBindAgentSuccessPopViewWithSuccess:^{ [FUSRouter.userRouter fus_showBindAgentSuccessPopViewWithSuccess:^{
}]; }];
...@@ -671,7 +671,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){ ...@@ -671,7 +671,7 @@ typedef NS_ENUM(NSInteger, FUSMySettingItemType){
} }
-(void)scanBtnDidClicked:(UIButton *)btn{ -(void)scanBtnDidClicked:(UIButton *)btn{
[[FUSRouter userRouter] fus_showBindAgentPageWithNeedShowSkipBtn:NO success:^{ [[FUSRouter userRouter] fus_showBindAgentPageWithNeedShowSkipBtn:NO showEnterInviteCodeBtn:NO success:^{
[[FUSRouter userRouter] fus_showBindAgentSuccessPopViewWithSuccess:^{ [[FUSRouter userRouter] fus_showBindAgentSuccessPopViewWithSuccess:^{
}]; }];
......
...@@ -51,7 +51,7 @@ class FUSInviteEmissaryRewardDrawHeader: UITableViewHeaderFooterView { ...@@ -51,7 +51,7 @@ class FUSInviteEmissaryRewardDrawHeader: UITableViewHeaderFooterView {
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
bgView.addSubview(dotView) bgView.addSubview(dotView)
dotView.snp.makeConstraints { make in dotView.snp.makeConstraints { make in
make.left.equalTo(22) make.left.equalTo(18)
make.centerY.equalToSuperview().offset(6) make.centerY.equalToSuperview().offset(6)
make.size.equalTo(CGSizeMake(6, 6)) make.size.equalTo(CGSizeMake(6, 6))
} }
......
...@@ -49,7 +49,7 @@ class FUSInviteRewardInviteFunctionHeader: FUSBaseView { ...@@ -49,7 +49,7 @@ class FUSInviteRewardInviteFunctionHeader: FUSBaseView {
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
self.addSubview(dotView) self.addSubview(dotView)
dotView.snp.makeConstraints { make in dotView.snp.makeConstraints { make in
make.left.equalTo(22) make.left.equalTo(18)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(6, 6)) make.size.equalTo(CGSizeMake(6, 6))
} }
......
...@@ -22,7 +22,10 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView { ...@@ -22,7 +22,10 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView {
func fus_getDesc() -> String { func fus_getDesc() -> String {
switch self { switch self {
case .recallClansman: case .recallClansman:
return .init(format: .fus_localString("%@天以上未登入%@的玩家,将会自动断开使者关系"), "\(FUSSwiftCacheDataShare.share.settingConfigModel.value?.inviteDataRecallShowDay ?? 90)", "FusiYa") let content: String = .fus_localString("#$1#天以上未登入#$2#的玩家,将会自动断开使者关系")
.replacingOccurrences(of: "#$1#", with: "\(FUSSwiftCacheDataShare.share.settingConfigModel.value?.inviteDataRecallShowDay ?? 90)")
.replacingOccurrences(of: "#$2#", with: "FusiYa")
return content
} }
} }
} }
...@@ -41,14 +44,14 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView { ...@@ -41,14 +44,14 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView {
self.addSubview(descLabel) self.addSubview(descLabel)
descLabel.snp.makeConstraints { make in descLabel.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(18) make.left.right.equalToSuperview().inset(18)
make.bottom.equalToSuperview().offset(-4) make.bottom.equalToSuperview().offset(-8)
} }
let titleBgView = UIView() let titleBgView = UIView()
self.addSubview(titleBgView) self.addSubview(titleBgView)
titleBgView.snp.makeConstraints { make in titleBgView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.bottom.equalTo(descLabel.snp.top).offset(0) make.bottom.equalTo(descLabel.snp.top).offset(4)
make.height.equalTo(38) make.height.equalTo(38)
} }
...@@ -57,7 +60,7 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView { ...@@ -57,7 +60,7 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView {
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
titleBgView.addSubview(dotView) titleBgView.addSubview(dotView)
dotView.snp.makeConstraints { make in dotView.snp.makeConstraints { make in
make.left.equalTo(22) make.left.equalTo(18)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(6, 6)) make.size.equalTo(CGSizeMake(6, 6))
} }
...@@ -78,7 +81,7 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView { ...@@ -78,7 +81,7 @@ class FUSInviteRewardInviteRecallClansmanHeader: FUSBaseView {
static public func fus_getCellHeight(type: FUSInviteRewardInviteRecallClansmanHeaderType) -> CGFloat{ static public func fus_getCellHeight(type: FUSInviteRewardInviteRecallClansmanHeaderType) -> CGFloat{
var cellHeight: CGFloat = 0 var cellHeight: CGFloat = 0
cellHeight += 38 cellHeight += 30
cellHeight += ceil(type.fus_getDesc().size(for: .fus_themeFont(13), maxWidth: UIView.fus_screenW() - 18*2, maxHeight: Double(MAXFLOAT)).height) + 2 cellHeight += ceil(type.fus_getDesc().size(for: .fus_themeFont(13), maxWidth: UIView.fus_screenW() - 18*2, maxHeight: Double(MAXFLOAT)).height) + 2
cellHeight += 4 cellHeight += 4
return cellHeight return cellHeight
......
...@@ -188,7 +188,7 @@ class FUSInviteFunctionController: FUSBaseViewController { ...@@ -188,7 +188,7 @@ class FUSInviteFunctionController: FUSBaseViewController {
func fus_clickedMoreMenu(menuType: FUSInviteRewardController.FUSInviteRewardMoreMenuType){ func fus_clickedMoreMenu(menuType: FUSInviteRewardController.FUSInviteRewardMoreMenuType){
switch menuType { switch menuType {
case .bindEmissary: case .bindEmissary:
FUSRouter.userRouter().fus_showBindAgentPage(withNeedShowSkipBtn: false) { FUSRouter.userRouter().fus_showBindAgentPage(withNeedShowSkipBtn: false, showEnterInviteCodeBtn: false) {
FUSRouter.userRouter().fus_showBindAgentSuccessPopView { FUSRouter.userRouter().fus_showBindAgentSuccessPopView {
} }
......
...@@ -205,7 +205,7 @@ public class FUSInviteRewardController: FUSBaseViewController { ...@@ -205,7 +205,7 @@ public class FUSInviteRewardController: FUSBaseViewController {
let scanBtn = UIButton(type: .custom) let scanBtn = UIButton(type: .custom)
scanBtn.setImage(FUSUserCenterBunble.imageNamed("inviteReward_navi_scan_icon"), for: .normal) scanBtn.setImage(FUSUserCenterBunble.imageNamed("inviteReward_navi_scan_icon"), for: .normal)
scanBtn.rx.tap.subscribe(onNext: { scanBtn.rx.tap.subscribe(onNext: {
FUSRouter.userRouter().fus_showBindAgentPage(withNeedShowSkipBtn: false) { FUSRouter.userRouter().fus_showBindAgentPage(withNeedShowSkipBtn: false, showEnterInviteCodeBtn: false) {
FUSRouter.userRouter().fus_showBindAgentSuccessPopView { FUSRouter.userRouter().fus_showBindAgentSuccessPopView {
} }
...@@ -231,7 +231,7 @@ public class FUSInviteRewardController: FUSBaseViewController { ...@@ -231,7 +231,7 @@ public class FUSInviteRewardController: FUSBaseViewController {
func fus_clickedMoreMenu(menuType: FUSInviteRewardMoreMenuType){ func fus_clickedMoreMenu(menuType: FUSInviteRewardMoreMenuType){
switch menuType { switch menuType {
case .bindEmissary: case .bindEmissary:
FUSRouter.userRouter().fus_showBindAgentPage(withNeedShowSkipBtn: false) { FUSRouter.userRouter().fus_showBindAgentPage(withNeedShowSkipBtn: false, showEnterInviteCodeBtn: false) {
FUSRouter.userRouter().fus_showBindAgentSuccessPopView { FUSRouter.userRouter().fus_showBindAgentSuccessPopView {
} }
......
...@@ -163,7 +163,14 @@ ...@@ -163,7 +163,14 @@
/// 使者邀请-领取每日奖励萤火 /// 使者邀请-领取每日奖励萤火
+ (void)fus_requestInviteDataObtainBondsGetWithSidList:(NSArray<NSString *> *)sidList success:(void (^)(void))success failure:(void (^)(NSString * _Nonnull, int))failure{ + (void)fus_requestInviteDataObtainBondsGetWithSidList:(NSArray<NSString *> *)sidList success:(void (^)(void))success failure:(void (^)(NSString * _Nonnull, int))failure{
NSDictionary *parm = @{@"sidList": sidList}; // 2. 转换为 JSON Data
NSError *jsonError;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:sidList
options:NSJSONWritingPrettyPrinted
error:&jsonError];
NSString *sidListJsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
NSDictionary *parm = @{@"sidList": sidListJsonString};
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_inviteDataObtainBondsGet params:parm success:^(NSDictionary * _Nullable dataDict, int code) { [FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_inviteDataObtainBondsGet params:parm success:^(NSDictionary * _Nullable dataDict, int code) {
NSArray *dataList = dataDict[@"dataList"]; NSArray *dataList = dataDict[@"dataList"];
......
...@@ -68,6 +68,7 @@ import SwiftyJSON ...@@ -68,6 +68,7 @@ import SwiftyJSON
} }
let halfView = FUSInviteConfigHalfWebAlertView(frame: rootView.bounds) let halfView = FUSInviteConfigHalfWebAlertView(frame: rootView.bounds)
halfView.backgroundColor = .fus_alertViewBackground()
halfView.halfViewFrame = halfViewFrame halfView.halfViewFrame = halfViewFrame
halfView.fus_loadRequest(url: url) halfView.fus_loadRequest(url: url)
rootView.addSubview(halfView) rootView.addSubview(halfView)
......
...@@ -381,7 +381,10 @@ extension FUSInviteRewardMyView.FUSInviteRewardMySectionType { ...@@ -381,7 +381,10 @@ extension FUSInviteRewardMyView.FUSInviteRewardMySectionType {
case .dauClansman: case .dauClansman:
return .fus_localString("最近30天内活跃的族人") return .fus_localString("最近30天内活跃的族人")
case .recallClansman: case .recallClansman:
return .init(format: .fus_localString("%@天以上未登入%@的玩家,将会自动断开使者关系"), "\(FUSSwiftCacheDataShare.share.settingConfigModel.value?.inviteDataRecallShowDay ?? 90)", "FusiYa") let content: String = .fus_localString("#$1#天以上未登入#$2#的玩家,将会自动断开使者关系")
.replacingOccurrences(of: "#$1#", with: "\(FUSSwiftCacheDataShare.share.settingConfigModel.value?.inviteDataRecallShowDay ?? 90)")
.replacingOccurrences(of: "#$2#", with: "FusiYa")
return content
default: default:
return "" return ""
} }
......
...@@ -27,7 +27,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -27,7 +27,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
let titleLabel = UILabel() let titleLabel = UILabel()
titleLabel.font = .fus_themeMediumFont(22) titleLabel.font = .fus_themeMediumFont(22)
titleLabel.textColor = .fus_textColorRich() titleLabel.textColor = .init(hex: "#111111")
// titleLabel.text = .fus_localString("我的使者码") // titleLabel.text = .fus_localString("我的使者码")
titleLabel.text = .fus_localString("我的邀请码") titleLabel.text = .fus_localString("我的邀请码")
self.addSubview(titleLabel) self.addSubview(titleLabel)
...@@ -44,7 +44,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -44,7 +44,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
descLabel.text = .fus_localString("保存QRCode到您的相册,将此图片发送给您要邀请的好友扫描即可完成绑定您为使者和成功注册在部分国家和地区,只有完成使者绑定对方才能注册成功") descLabel.text = .fus_localString("保存QRCode到您的相册,将此图片发送给您要邀请的好友扫描即可完成绑定您为使者和成功注册在部分国家和地区,只有完成使者绑定对方才能注册成功")
self.addSubview(descLabel) self.addSubview(descLabel)
descLabel.snp.makeConstraints { make in descLabel.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(35) make.left.right.equalToSuperview().inset(26)
make.top.equalTo(titleLabel.snp.bottom).offset(14) make.top.equalTo(titleLabel.snp.bottom).offset(14)
} }
......
...@@ -95,7 +95,7 @@ class FUSMyInviteQRCodeDownloadView: FUSBaseView { ...@@ -95,7 +95,7 @@ class FUSMyInviteQRCodeDownloadView: FUSBaseView {
qrCodeLabel.font = .fus_themeFont(15) qrCodeLabel.font = .fus_themeFont(15)
qrCodeLabel.textColor = .fus_textColorLight2() qrCodeLabel.textColor = .fus_textColorLight2()
qrCodeLabel.text = .init(format: .fus_localString("官网:%@"), "fusiclub.com") qrCodeLabel.text = .init(format: .fus_localString("官网:%@"), "ifusiya.com")
self.addSubview(qrCodeLabel) self.addSubview(qrCodeLabel)
qrCodeLabel.snp.makeConstraints { make in qrCodeLabel.snp.makeConstraints { make in
make.top.equalTo(qrCodeView.snp.bottom).offset(10) make.top.equalTo(qrCodeView.snp.bottom).offset(10)
......
...@@ -638,7 +638,7 @@ ...@@ -638,7 +638,7 @@
//跳过 //跳过
setInfoVC.onClickSkipBtnBlock = ^{ setInfoVC.onClickSkipBtnBlock = ^{
if (showBind) { if (showBind) {
[FUSRouter.userRouter fus_showBindAgentPageWithNeedShowSkipBtn:YES success:^{ [FUSRouter.userRouter fus_showBindAgentPageWithNeedShowSkipBtn:YES showEnterInviteCodeBtn:NO success:^{
[weakSelf fus_doLoginReadyWithSender:sender]; [weakSelf fus_doLoginReadyWithSender:sender];
}]; }];
}else { }else {
...@@ -649,7 +649,7 @@ ...@@ -649,7 +649,7 @@
setInfoVC.finishUpdateUserInfoBlock = ^{ setInfoVC.finishUpdateUserInfoBlock = ^{
// [self fus_doLoginReadyWithSender:sender]; // [self fus_doLoginReadyWithSender:sender];
if (showBind) { if (showBind) {
[FUSRouter.userRouter fus_showBindAgentPageWithNeedShowSkipBtn:YES success:^{ [FUSRouter.userRouter fus_showBindAgentPageWithNeedShowSkipBtn:YES showEnterInviteCodeBtn:NO success:^{
[weakSelf fus_doLoginReadyWithSender:sender]; [weakSelf fus_doLoginReadyWithSender:sender];
}]; }];
}else { }else {
......
...@@ -844,7 +844,7 @@ ...@@ -844,7 +844,7 @@
BOOL inBindAgent = [dataDict[@"inBindAgent"] boolValue]; BOOL inBindAgent = [dataDict[@"inBindAgent"] boolValue];
BOOL showBind = FUSConfig.sharedInstanced.devConfigs.appStatus == NO && inBindAgent; BOOL showBind = FUSConfig.sharedInstanced.devConfigs.appStatus == NO && inBindAgent;
if (showBind) { if (showBind) {
[[FUSRouter userRouter] fus_showBindAgentPageWithNeedShowSkipBtn:YES success:^{ [[FUSRouter userRouter] fus_showBindAgentPageWithNeedShowSkipBtn:YES showEnterInviteCodeBtn:NO success:^{
[weakSelf fus_doLoginReady]; [weakSelf fus_doLoginReady];
}]; }];
} }
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
_searchTextField.delegate = self; _searchTextField.delegate = self;
_searchTextField.textAlignment = NSTextAlignmentLeft; _searchTextField.textAlignment = NSTextAlignmentLeft;
_searchTextField.textColor = [UIColor fus_textColorRich];
UIFont *strFont = [UIFont fus_themeFont:16]; UIFont *strFont = [UIFont fus_themeFont:16];
CGRect strRect = [[NSString fus_localString:@"取消"] boundingRectWithSize:CGSizeMake(0, 0) options:NSStringDrawingUsesFontLeading attributes:[NSDictionary dictionaryWithObjectsAndKeys:strFont, NSFontAttributeName, nil] context:nil]; CGRect strRect = [[NSString fus_localString:@"取消"] boundingRectWithSize:CGSizeMake(0, 0) options:NSStringDrawingUsesFontLeading attributes:[NSDictionary dictionaryWithObjectsAndKeys:strFont, NSFontAttributeName, nil] context:nil];
CGFloat btnWidth = strRect.size.width + 20; CGFloat btnWidth = strRect.size.width + 20;
......
...@@ -976,9 +976,10 @@ ...@@ -976,9 +976,10 @@
[self fus_showAwardAnimateWithCurrency:listModel.currency classify:listModel.classify tips:listModel.getTips icon:listModel.icon amount:listModel.award]; [self fus_showAwardAnimateWithCurrency:listModel.currency classify:listModel.classify tips:listModel.getTips icon:listModel.icon amount:listModel.award];
} }
- (void)fus_showBindAgentPageWithNeedShowSkipBtn:(BOOL)needShowSkipBtn success:(void (^)(void))success{ - (void)fus_showBindAgentPageWithNeedShowSkipBtn:(BOOL)needShowSkipBtn showEnterInviteCodeBtn:(BOOL)showEnterInviteCodeBtn success:(void (^)(void))success{
FUSBindAgentViewController *vc = [[FUSBindAgentViewController alloc] init]; FUSBindAgentViewController *vc = [[FUSBindAgentViewController alloc] init];
vc.needShowSkipBtn = needShowSkipBtn; vc.needShowSkipBtn = needShowSkipBtn;
vc.needShowEnterAgentCodeBtn = showEnterInviteCodeBtn;
vc.onClickBackHandle = success; vc.onClickBackHandle = success;
[UINavigationController.fus_topViewController.navigationController pushViewController:vc animated:YES]; [UINavigationController.fus_topViewController.navigationController pushViewController:vc animated:YES];
} }
......
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