Commit c388a5c8 by ludi

修复一些列bug

parent d4d95634
Showing with 320 additions and 167 deletions
...@@ -30,6 +30,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -30,6 +30,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) CGFloat fus_completeness; @property (nonatomic, assign) CGFloat fus_completeness;
/// 显示的颜色 /// 显示的颜色
@property (nonatomic, strong) UIColor *fus_color; @property (nonatomic, strong) UIColor *fus_color;
/// 背景颜色
@property (nonatomic, strong) UIColor *fus_bgColor;
/// 赋值额外模型的属性 /// 赋值额外模型的属性
-(void)fus_reloadPieChartProperties; -(void)fus_reloadPieChartProperties;
......
...@@ -10,9 +10,12 @@ ...@@ -10,9 +10,12 @@
@implementation FUSLiveAssesDetailModel @implementation FUSLiveAssesDetailModel
- (void)fus_reloadPieChartProperties{ - (void)fus_reloadPieChartProperties{
NSArray *colors = @[[UIColor colorWithHex:@"#DFDEDE"], [UIColor colorWithHex:@"#FB2424"], [UIColor colorWithHex:@"#FC8226"], [UIColor colorWithHex:@"#00F088"], [UIColor colorWithHex:@"#0394FA"]]; // NSArray *colors = @[[UIColor colorWithHex:@"#DFDEDE"], [UIColor colorWithHex:@"#FB2424"], [UIColor colorWithHex:@"#FC8226"], [UIColor colorWithHex:@"#00F088"], [UIColor colorWithHex:@"#0394FA"]];
NSArray *colors = @[[UIColor colorWithHex:@"#DFDEDE"], [UIColor colorWithHex:@"#FA3636"], [UIColor colorWithHex:@"#FBA60B"], [UIColor colorWithHex:@"#02CE76"], [UIColor colorWithHex:@"#0787E1"]];
NSArray *bgcolors = @[[UIColor colorWithHex:@"#DFDEDE" alpha:0.4], [UIColor colorWithHex:@"#FDDBDB"], [UIColor colorWithHex:@"#FEEDD9"], [UIColor colorWithHex:@"#DEFEF0"], [UIColor colorWithHex:@"#DAEFFE"]];
if (self.level >= 0 && self.level <= 4) { if (self.level >= 0 && self.level <= 4) {
self.fus_color = colors[self.level]; self.fus_color = colors[self.level];
self.fus_bgColor = bgcolors[self.level];
self.fus_completeness = self.level / 4.0f; self.fus_completeness = self.level / 4.0f;
} }
} }
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
"取消禁言" = "取消禁言"; "取消禁言" = "取消禁言";
"请填写举报理由" = "请填写举报理由"; "请填写举报理由" = "请填写检举理由";
"取消申请上麦?" = "取消申请上麦?"; "取消申请上麦?" = "取消申请上麦?";
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
"礼物发送失败" = "礼物发送失败"; "礼物发送失败" = "礼物发送失败";
"举报" = "举报"; "举报" = "检举";
"进行中" = "进行中"; "进行中" = "进行中";
...@@ -1164,7 +1164,7 @@ ...@@ -1164,7 +1164,7 @@
"使用" = "使用"; "使用" = "使用";
"填写详细举报原因" = "填写详细举报原因"; "填写详细举报原因" = "填写详细检举原因";
"所有私信已忽略" = "所有私信已忽略"; "所有私信已忽略" = "所有私信已忽略";
...@@ -1216,7 +1216,7 @@ ...@@ -1216,7 +1216,7 @@
"请输入6~16位新密码" = "请输入6~16位新密码"; "请输入6~16位新密码" = "请输入6~16位新密码";
"举报成功" = "举报成功"; "举报成功" = "检举成功";
"认证中..." = "认证中..."; "认证中..." = "认证中...";
...@@ -1946,7 +1946,7 @@ ...@@ -1946,7 +1946,7 @@
"由於對方設置,無法發起通話" = "由于对方设置,无法发起通话"; "由於對方設置,無法發起通話" = "由于对方设置,无法发起通话";
"选择举报类型" = "请选择举报类型"; "选择举报类型" = "请选择检举类型";
"您搜索的用户不存在" = "您搜索的用户不存在"; "您搜索的用户不存在" = "您搜索的用户不存在";
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
"取消禁言" = "取消禁言"; "取消禁言" = "取消禁言";
"请填写举报理由" = "請填寫舉報理由"; "请填写举报理由" = "請填寫檢舉理由";
"取消申请上麦?" = "取消申請上麥?"; "取消申请上麦?" = "取消申請上麥?";
...@@ -246,7 +246,7 @@ ...@@ -246,7 +246,7 @@
"礼物发送失败" = "禮物發送失敗"; "礼物发送失败" = "禮物發送失敗";
"举报" = "舉報"; "举报" = "檢舉";
"进行中" = "進行中"; "进行中" = "進行中";
...@@ -1164,7 +1164,7 @@ ...@@ -1164,7 +1164,7 @@
"使用" = "使用"; "使用" = "使用";
"填写详细举报原因" = "填寫詳細舉報原因"; "填写详细举报原因" = "填寫詳細檢舉原因";
"所有私信已忽略" = "所有私信已忽略"; "所有私信已忽略" = "所有私信已忽略";
...@@ -1216,7 +1216,7 @@ ...@@ -1216,7 +1216,7 @@
"请输入6~16位新密码" = "請輸入6~16位新密碼"; "请输入6~16位新密码" = "請輸入6~16位新密碼";
"举报成功" = "舉報成功"; "举报成功" = "檢舉成功";
"认证中..." = "認證中..."; "认证中..." = "認證中...";
...@@ -1946,7 +1946,7 @@ ...@@ -1946,7 +1946,7 @@
"由於對方設置,無法發起通話" = "由於對方設置,無法發起通話"; "由於對方設置,無法發起通話" = "由於對方設置,無法發起通話";
"选择举报类型" = "請選擇舉報類型"; "选择举报类型" = "請選擇檢舉類型";
"您搜索的用户不存在" = "您搜索的用户不存在"; "您搜索的用户不存在" = "您搜索的用户不存在";
......
...@@ -2874,7 +2874,7 @@ ...@@ -2874,7 +2874,7 @@
"邀请玩家下载" = "Invite players to download"; "邀请玩家下载" = "Invite players to download";
"选择适合您的邀请方式" = "Choose the invitation method that suits you"; "选择适合您的邀请方式" = "Choose invite method";
"使者奖励" = "Emissary reward"; "使者奖励" = "Emissary reward";
......
...@@ -2852,7 +2852,7 @@ ...@@ -2852,7 +2852,7 @@
"邀请玩家下载" = "プレイヤーにダウンロードを招待"; "邀请玩家下载" = "プレイヤーにダウンロードを招待";
"选择适合您的邀请方式" = "ご自分に合った招待方法を選択してください"; "选择适合您的邀请方式" = "招待方法を選択";
"使者奖励" = "使者報酬"; "使者奖励" = "使者報酬";
......
...@@ -2846,7 +2846,7 @@ ...@@ -2846,7 +2846,7 @@
"邀请玩家下载" = "เชิญผู้เล่นให้ดาวน์โหลด"; "邀请玩家下载" = "เชิญผู้เล่นให้ดาวน์โหลด";
"选择适合您的邀请方式" = "เลือกวิธีการเชิญที่เหมาะกับคุณ"; "选择适合您的邀请方式" = "เลือกรูปแบบการเชิญ";
"使者奖励" = "รางวัลผู้ส่งเงิน"; "使者奖励" = "รางวัลผู้ส่งเงิน";
......
...@@ -2852,7 +2852,7 @@ ...@@ -2852,7 +2852,7 @@
"邀请玩家下载" = "Mời người chơi tải xuống"; "邀请玩家下载" = "Mời người chơi tải xuống";
"选择适合您的邀请方式" = "Chọn phương thức mời phù hợp với bạn"; "选择适合您的邀请方式" = "Chọn phương thức mời";
"使者奖励" = "Phần thưởng của sứ giả"; "使者奖励" = "Phần thưởng của sứ giả";
......
...@@ -131,6 +131,9 @@ import FBSDKLoginKit ...@@ -131,6 +131,9 @@ import FBSDKLoginKit
self.shareFailureHandle = failure self.shareFailureHandle = failure
let vc = controller ?? UIViewController.fus_top() let vc = controller ?? UIViewController.fus_top()
Settings.shared.appID = FUSConfig.sharedInstanced().sdkConfigs.facebookLoginKey
Settings.shared.clientToken = FUSConfig.sharedInstanced().sdkConfigs.facebookLoginSecret
if type == .imageWithText, if type == .imageWithText,
let imageUrl = imageUrl, let imageUrl = imageUrl,
imageUrl.count > 0{ imageUrl.count > 0{
...@@ -168,18 +171,28 @@ import FBSDKLoginKit ...@@ -168,18 +171,28 @@ import FBSDKLoginKit
extension FUSFacebookHelper: SharingDelegate{ extension FUSFacebookHelper: SharingDelegate{
public func sharer(_ sharer: any FBSDKShareKit.Sharing, didCompleteWithResults results: [String : Any]) { public func sharer(_ sharer: any FBSDKShareKit.Sharing, didCompleteWithResults results: [String : Any]) {
Settings.shared.appID = FUSConfig.sharedInstanced().sdkConfigs.facebookShareKey
Settings.shared.clientToken = FUSConfig.sharedInstanced().sdkConfigs.facebookShareSecret
shareSuccessHandle?() shareSuccessHandle?()
self.shareSuccessHandle = nil self.shareSuccessHandle = nil
self.shareFailureHandle = nil self.shareFailureHandle = nil
Settings.shared.appID = FUSConfig.sharedInstanced().sdkConfigs.facebookShareKey
Settings.shared.clientToken = FUSConfig.sharedInstanced().sdkConfigs.facebookShareSecret
} }
public func sharer(_ sharer: any FBSDKShareKit.Sharing, didFailWithError error: any Error) { public func sharer(_ sharer: any FBSDKShareKit.Sharing, didFailWithError error: any Error) {
Settings.shared.appID = FUSConfig.sharedInstanced().sdkConfigs.facebookShareKey
Settings.shared.clientToken = FUSConfig.sharedInstanced().sdkConfigs.facebookShareSecret
shareFailureHandle?(false) shareFailureHandle?(false)
self.shareSuccessHandle = nil self.shareSuccessHandle = nil
self.shareFailureHandle = nil self.shareFailureHandle = nil
Settings.shared.appID = FUSConfig.sharedInstanced().sdkConfigs.facebookShareKey
Settings.shared.clientToken = FUSConfig.sharedInstanced().sdkConfigs.facebookShareSecret
} }
public func sharerDidCancel(_ sharer: any FBSDKShareKit.Sharing) { public func sharerDidCancel(_ sharer: any FBSDKShareKit.Sharing) {
Settings.shared.appID = FUSConfig.sharedInstanced().sdkConfigs.facebookShareKey
Settings.shared.clientToken = FUSConfig.sharedInstanced().sdkConfigs.facebookShareSecret
shareFailureHandle?(true) shareFailureHandle?(true)
self.shareSuccessHandle = nil self.shareSuccessHandle = nil
self.shareFailureHandle = nil self.shareFailureHandle = nil
......
...@@ -485,7 +485,7 @@ ...@@ -485,7 +485,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20250402113542; CURRENT_PROJECT_VERSION = 20250402113544;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
...@@ -753,7 +753,7 @@ ...@@ -753,7 +753,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements; CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20250402113542; CURRENT_PROJECT_VERSION = 20250402113544;
DEFINES_MODULE = YES; DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC; DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO; ENABLE_ON_DEMAND_RESOURCES = NO;
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key> <key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>83</integer> <integer>82</integer>
</dict> </dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key> <key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>80</integer> <integer>81</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key> <key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>82</integer> <integer>79</integer>
</dict> </dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key> <key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>81</integer> <integer>83</integer>
</dict> </dict>
</dict> </dict>
</dict> </dict>
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "recommend_host_selected@2x.png", "filename" : "20250410-153457.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "recommend_host_selected@3x.png", "filename" : "20250410-153453.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
_followBtn.titleLabel.font = [UIFont fus_themeFont:16]; _followBtn.titleLabel.font = [UIFont fus_themeFont:16];
_followBtn.layer.cornerRadius = _followBtn.height/2.0; _followBtn.layer.cornerRadius = _followBtn.height/2.0;
_followBtn.layer.masksToBounds = YES; _followBtn.layer.masksToBounds = YES;
[_followBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_followBtn setTitleColor:[UIColor fus_textColorRich] forState:UIControlStateNormal];
// [_followBtn setBackgroundColor:[UIColor colorWithHex:@"444444"]]; // [_followBtn setBackgroundColor:[UIColor colorWithHex:@"444444"]];
[_followBtn addTarget:self action:@selector(onClickFollowBtn:) forControlEvents:UIControlEventTouchUpInside]; [_followBtn addTarget:self action:@selector(onClickFollowBtn:) forControlEvents:UIControlEventTouchUpInside];
[self addSubview:_followBtn]; [self addSubview:_followBtn];
......
...@@ -133,6 +133,7 @@ class FUSVideoEndLiveScoreSheetView: FUSBaseView { ...@@ -133,6 +133,7 @@ class FUSVideoEndLiveScoreSheetView: FUSBaseView {
make.size.equalTo(CGSizeMake(FUSVideoEndLiveScoreSheetView.pieChartWidth, FUSVideoEndLiveScoreSheetView.pieChartWidth)) make.size.equalTo(CGSizeMake(FUSVideoEndLiveScoreSheetView.pieChartWidth, FUSVideoEndLiveScoreSheetView.pieChartWidth))
} }
overRallView.gradientColor = .white
blankBgView.addSubview(overRallView) blankBgView.addSubview(overRallView)
overRallView.snp.makeConstraints { make in overRallView.snp.makeConstraints { make in
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
...@@ -260,7 +261,8 @@ class FFVideoEndLiveScoreBlankButton: UIButton { ...@@ -260,7 +261,8 @@ class FFVideoEndLiveScoreBlankButton: UIButton {
if self == .quality { if self == .quality {
make.append(" ") make.append(" ")
make.append { make in make.append { make in
make.image = FUSShowRoomCenterBunble.imageNamed("live_end_liveScore_quality_exclamation_icon")?.fus_tintImage(with: .init(hex: "#111111", alpha: 0.7)) // make.image = FUSShowRoomCenterBunble.imageNamed("live_end_liveScore_quality_exclamation_icon")?.fus_tintImage(with: .init(hex: "#111111", alpha: 0.7))
make.image = FUSShowRoomCenterBunble.imageNamed("live_end_liveScore_quality_exclamation_icon")?.fus_tintImage(with: .init(hex: "#111111"))
make.alignment = .center make.alignment = .center
} }
} }
...@@ -332,7 +334,7 @@ class FFVideoEndLiveScoreBlankButton: UIButton { ...@@ -332,7 +334,7 @@ class FFVideoEndLiveScoreBlankButton: UIButton {
} }
func fus_reloadUI() { func fus_reloadUI() {
self.bgImgView.image = self.type.fus_getBackgroundImage() // self.bgImgView.image = self.type.fus_getBackgroundImage()
self.scoreSubLabel.attributedText = self.type.fus_getSubTitleNameAttr() self.scoreSubLabel.attributedText = self.type.fus_getSubTitleNameAttr()
if let model = self.model { if let model = self.model {
......
...@@ -306,15 +306,26 @@ import FUSCommon ...@@ -306,15 +306,26 @@ import FUSCommon
} }
} }
} }
var reloadLiveBeforeReadyDisposed = DisposeBag()
func bindNotification(){ func bindNotification(){
//从别的地方回来的通知,跳过第一次,用于刷新当前的页面 //从别的地方回来的通知,跳过第一次,用于刷新当前的页面
NotificationCenter.default.rx.notification(.init(FUSLiveNotificationKeys.fus_liveRoomViewWillAppear()), object: nil).skip(1).subscribe(onNext: { _ in NotificationCenter.default.rx.notification(.init(FUSLiveNotificationKeys.fus_liveRoomViewWillAppear()), object: nil).skip(1).subscribe(onNext: {[weak self] _ in
FUSLiveHttpHelper.fus_requestLiveBeforeReady {[weak self] model in
self?.warningView.fus_setModelList(modelList: model.beforeLiveCond) guard let self = self else { return }
} failure: { msg, code in self.reloadLiveBeforeReadyDisposed = .init()
Observable<Int>.interval(.milliseconds(500), scheduler: MainScheduler.instance)
} .take(1)
.subscribe(onNext: { _ in
FUSLiveHttpHelper.fus_requestLiveBeforeReady {[weak self] model in
self?.warningView.fus_setModelList(modelList: model.beforeLiveCond)
} failure: { msg, code in
}
})
.disposed(by: self.reloadLiveBeforeReadyDisposed)
}).disposed(by: disposeBag) }).disposed(by: disposeBag)
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key> <key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict> <dict>
<key>orderHint</key> <key>orderHint</key>
<integer>79</integer> <integer>80</integer>
</dict> </dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key> <key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict> <dict>
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "bind_agent_success_light@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "bind_agent_success_light@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "inviteReward_right_arrow_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "inviteReward_right_arrow_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -130,7 +130,7 @@ import SwiftyJSON ...@@ -130,7 +130,7 @@ import SwiftyJSON
make.right.equalToSuperview().offset(-34) make.right.equalToSuperview().offset(-34)
} }
self.lightImageView.image = FUSUserCenterBunble.imageNamed("daily_check_inrotation_lightimg") self.lightImageView.image = FUSUserCenterBunble.imageNamed("bind_agent_success_light")
self.contentView.addSubview(self.lightImageView) self.contentView.addSubview(self.lightImageView)
self.contentView.addSubview(self.iconImageView) self.contentView.addSubview(self.iconImageView)
......
...@@ -47,7 +47,7 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView ...@@ -47,7 +47,7 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView
} }
let dotView = UIView() let dotView = UIView()
dotView.backgroundColor = .fus_theme() dotView.backgroundColor = .fus_diamondBlue()
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
dotView.layer.masksToBounds = true dotView.layer.masksToBounds = true
contentView.addSubview(dotView) contentView.addSubview(dotView)
...@@ -205,6 +205,7 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView ...@@ -205,6 +205,7 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView
copyBtn.style = .blue copyBtn.style = .blue
copyBtn.titleLabel?.font = .fus_themeMediumFont(14) copyBtn.titleLabel?.font = .fus_themeMediumFont(14)
copyBtn.setTitle(.fus_localString("保存QRCode"), for: .normal) copyBtn.setTitle(.fus_localString("保存QRCode"), for: .normal)
copyBtn.isEnabled = false
self.typeContentView.addSubview(copyBtn) self.typeContentView.addSubview(copyBtn)
copyBtn.snp.makeConstraints { make in copyBtn.snp.makeConstraints { make in
make.top.equalTo(qrCodeImageView.snp.bottom).offset(20) make.top.equalTo(qrCodeImageView.snp.bottom).offset(20)
...@@ -219,13 +220,14 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView ...@@ -219,13 +220,14 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView
if FUSLocalizationHelper.fus_isCNStatus() == true{ if FUSLocalizationHelper.fus_isCNStatus() == true{
imgUrl = model.qrurl imgUrl = model.qrurl
} }
qrCodeImageView.setWebImageWithSubURLString(imgUrl, controlState: .normal, placeholder: .init()) {[weak loadingView] suc, image in qrCodeImageView.setWebImageWithSubURLString(imgUrl, controlState: .normal, placeholder: .init()) {[weak loadingView, weak copyBtn] suc, image in
DispatchQueue.main.async(execute: { DispatchQueue.main.async(execute: {
if suc == true, if suc == true,
let image = image { let image = image {
qrImage = image qrImage = image
loadingView?.stopAnimating() loadingView?.stopAnimating()
loadingView?.isHidden = true loadingView?.isHidden = true
copyBtn?.isEnabled = true
} }
}) })
} }
...@@ -289,7 +291,7 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView ...@@ -289,7 +291,7 @@ class FUSInviteFunctionStepOneContentView: FUSInviteFunctionStepContentBaseView
let codeBtn = UIButton(type: .custom) let codeBtn = UIButton(type: .custom)
codeBtn.titleLabel?.font = .fus_themeHeavyFont(33) codeBtn.titleLabel?.font = .fus_themeHeavyFont(33)
codeBtn.setTitleColor(.fus_theme(), for: .normal) codeBtn.setTitleColor(.fus_diamondBlue(), for: .normal)
codeBtn.setTitle(FUSInviteRewardInviteViewModel.share.inviteDataModel.value?.agentRegData.agentRegCode ?? "", for: .normal) codeBtn.setTitle(FUSInviteRewardInviteViewModel.share.inviteDataModel.value?.agentRegData.agentRegCode ?? "", for: .normal)
inviteCodeBgView.addSubview(codeBtn) inviteCodeBgView.addSubview(codeBtn)
codeBtn.snp.makeConstraints { make in codeBtn.snp.makeConstraints { make in
......
...@@ -33,7 +33,7 @@ class FUSInviteFunctionStepThreeContentView: FUSInviteFunctionStepContentBaseVie ...@@ -33,7 +33,7 @@ class FUSInviteFunctionStepThreeContentView: FUSInviteFunctionStepContentBaseVie
//MARK: 标题部分 //MARK: 标题部分
let dotView = UIView() let dotView = UIView()
dotView.backgroundColor = .fus_theme() dotView.backgroundColor = .fus_diamondBlue()
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
dotView.layer.masksToBounds = true dotView.layer.masksToBounds = true
contentView.addSubview(dotView) contentView.addSubview(dotView)
......
...@@ -48,7 +48,7 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView ...@@ -48,7 +48,7 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView
//MARK: 标题部分 //MARK: 标题部分
let dotView = UIView() let dotView = UIView()
dotView.backgroundColor = .fus_theme() dotView.backgroundColor = .fus_diamondBlue()
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
dotView.layer.masksToBounds = true dotView.layer.masksToBounds = true
contentView.addSubview(dotView) contentView.addSubview(dotView)
...@@ -96,7 +96,7 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView ...@@ -96,7 +96,7 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView
rewardDescContentView.snp.makeConstraints { make in rewardDescContentView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(18) make.top.equalTo(18)
make.bottom.equalTo(-12) make.bottom.equalTo(-16)
// make.height.equalTo(40).priority(.required) // make.height.equalTo(40).priority(.required)
} }
...@@ -161,21 +161,23 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView ...@@ -161,21 +161,23 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView
} }
avatarCenterView.addSubview(vipLevelImageView) avatarCenterView.addSubview(vipLevelImageView)
vipLevelImageView.snp.makeConstraints { make in
make.left.equalTo(avatarImageView.snp.right).offset(6)
make.centerY.equalTo(avatarImageView.snp.centerY)
make.size.equalTo(CGSizeMake(32, 13))
}
self.userNameLabel.textColor = .fus_textColorMedium() self.userNameLabel.textColor = .fus_textColorMedium()
self.userNameLabel.font = .fus_themeFont(14) self.userNameLabel.font = .fus_themeFont(14)
avatarCenterView.addSubview(userNameLabel) avatarCenterView.addSubview(userNameLabel)
userNameLabel.snp.makeConstraints { make in userNameLabel.snp.makeConstraints { make in
make.left.equalTo(avatarImageView.snp.right).offset(40) // make.left.equalTo(avatarImageView.snp.right).offset(40)
make.left.equalTo(avatarImageView.snp.right).offset(2)
make.centerY.equalTo(avatarImageView.snp.centerY) make.centerY.equalTo(avatarImageView.snp.centerY)
make.right.equalToSuperview() make.right.equalToSuperview()
} }
vipLevelImageView.snp.makeConstraints { make in
make.left.equalTo(userNameLabel.snp.right).offset(2)
make.centerY.equalTo(avatarImageView.snp.centerY)
make.height.equalTo(14)
}
self.contentView.addSubview(qrCodeView) self.contentView.addSubview(qrCodeView)
qrCodeView.snp.makeConstraints { make in qrCodeView.snp.makeConstraints { make in
make.top.equalTo(avatarCenterView.snp.bottom).offset(4) make.top.equalTo(avatarCenterView.snp.bottom).offset(4)
...@@ -219,29 +221,31 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView ...@@ -219,29 +221,31 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView
self.userNameLabel.textColor = .fus_textColorMedium() self.userNameLabel.textColor = .fus_textColorMedium()
if richPower == true { if richPower == true {
let level = FUSSwiftCacheDataShare.share.userInfo.value?.level.intValue ?? 0 self.vipLevelImageView.image = .fus_image(withLevel: FUSSwiftCacheDataShare.share.userInfo.value?.level.intValue ?? 0)
self.vipLevelImageView.isHidden = false // let level = FUSSwiftCacheDataShare.share.userInfo.value?.level.intValue ?? 0
self.userNameLabel.snp.updateConstraints { make in // self.vipLevelImageView.isHidden = false
make.left.equalTo(avatarImageView.snp.right).offset(40) // self.userNameLabel.snp.updateConstraints { make in
} // make.left.equalTo(avatarImageView.snp.right).offset(40)
// }
let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: level) //
self.vipLevelImageView.setWebImageWithSubURLString(levelmodel?.icon) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: level)
self.userNameLabel.textColor = .init(hexString: levelmodel?.color ?? "#666666") // self.vipLevelImageView.setWebImageWithSubURLString(levelmodel?.icon)
// self.userNameLabel.textColor = .init(hexString: levelmodel?.color ?? "#666666")
} else { } else {
self.vipLevelImageView.image = .fus_image(withLevel: 0)
// 如果服务器配置了0级,则使用0级的颜色 // 如果服务器配置了0级,则使用0级的颜色
let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: 0) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: 0)
if let color = levelmodel?.color, // if let color = levelmodel?.color,
color.count > 0{ // color.count > 0{
self.userNameLabel.textColor = .init(hexString: color) // self.userNameLabel.textColor = .init(hexString: color)
} // }
//
self.vipLevelImageView.isHidden = true // self.vipLevelImageView.isHidden = true
self.userNameLabel.snp.updateConstraints { make in // self.userNameLabel.snp.updateConstraints { make in
make.left.equalTo(avatarImageView.snp.right).offset(4) // make.left.equalTo(avatarImageView.snp.right).offset(4)
} // }
} }
self.userNameLabel.text = FUSSwiftCacheDataShare.share.userInfo.value?.nickname self.userNameLabel.text = FUSSwiftCacheDataShare.share.userInfo.value?.nickname
...@@ -249,7 +253,7 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView ...@@ -249,7 +253,7 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView
// 使者码 // 使者码
qrCodeLabel.attributedText = .sj.makeText({ make in qrCodeLabel.attributedText = .sj.makeText({ make in
make.append(.fus_localString("使者码")).textColor(.fus_textColorRich()) make.append(.fus_localString("使者码")).textColor(.fus_textColorRich())
make.append(FUSSwiftCacheDataShare.share.userInfo.value?.uid ?? "").textColor(.fus_theme()) make.append(FUSSwiftCacheDataShare.share.userInfo.value?.uid ?? "").textColor(.fus_diamondBlue())
make.font(.fus_themeMediumFont(18)) make.font(.fus_themeMediumFont(18))
}) })
...@@ -272,8 +276,12 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView ...@@ -272,8 +276,12 @@ class FUSInviteFunctionStepTwoContentView: FUSInviteFunctionStepContentBaseView
guard let self = self else { return } guard let self = self else { return }
guard let model = model else { return } guard let model = model else { return }
let emissaryContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.masterContent, font: nil, isCenter: true) var attrTextFont: UIFont = .fus_themeFont(12)
let clansmanContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.memberContent, font: nil, isCenter: true) if self.singleDescWidth < 330 {
attrTextFont = .fus_themeFont(11)
}
let emissaryContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.masterContent, font: attrTextFont, isCenter: true)
let clansmanContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.memberContent, font: attrTextFont, isCenter: true)
// 如果有没有内容的情况,那么只显示一个,并且居中 // 如果有没有内容的情况,那么只显示一个,并且居中
if emissaryContentAttr.length <= 0 || clansmanContentAttr.length <= 0{ if emissaryContentAttr.length <= 0 || clansmanContentAttr.length <= 0{
......
...@@ -70,7 +70,7 @@ class FUSInviteRewardInviteCodeCell: UITableViewCell { ...@@ -70,7 +70,7 @@ class FUSInviteRewardInviteCodeCell: UITableViewCell {
} }
inviteCodeBtn.titleLabel?.font = .fus_themeHeavyFont(32) inviteCodeBtn.titleLabel?.font = .fus_themeHeavyFont(32)
inviteCodeBtn.setTitleColor(.fus_theme(), for: .normal) inviteCodeBtn.setTitleColor(.fus_diamondBlue(), for: .normal)
inviteCodeBtn.setTitle(" ", for: .normal) inviteCodeBtn.setTitle(" ", for: .normal)
bgView.addSubview(inviteCodeBtn) bgView.addSubview(inviteCodeBtn)
inviteCodeBtn.snp.makeConstraints { make in inviteCodeBtn.snp.makeConstraints { make in
......
...@@ -148,10 +148,10 @@ class FUSInviteRewardInviteFunctionCell: UITableViewCell { ...@@ -148,10 +148,10 @@ class FUSInviteRewardInviteFunctionCell: UITableViewCell {
make.right.equalTo(-28) make.right.equalTo(-28)
} }
let arrowImageView = UIImageView(image: .fus_rightArrowIcon()) let arrowImageView = UIImageView(image: FUSUserCenterBunble.imageNamed("inviteReward_right_arrow_icon"))
bgView.addSubview(arrowImageView) bgView.addSubview(arrowImageView)
arrowImageView.snp.makeConstraints { make in arrowImageView.snp.makeConstraints { make in
make.right.equalTo(-10) make.right.equalTo(-16)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
// make.size.equalTo(CGSizeMake(6, 12)) // make.size.equalTo(CGSizeMake(6, 12))
} }
......
...@@ -11,7 +11,7 @@ import SJAttributesStringMaker ...@@ -11,7 +11,7 @@ import SJAttributesStringMaker
class FUSInviteRewardInvitePlanCell: UITableViewCell { class FUSInviteRewardInvitePlanCell: UITableViewCell {
static public let cellID: String = "FUSInviteRewardInvitePlanCell" static public let cellID: String = "FUSInviteRewardInvitePlanCell"
static public let cellHeight: CGFloat = 170 + 20 static public let cellHeight: CGFloat = 186 + 20
// public var cellShouldReloadHandler: (() -> Void)? // public var cellShouldReloadHandler: (() -> Void)?
...@@ -64,7 +64,7 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell { ...@@ -64,7 +64,7 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell {
}) })
bgImageView.addSubview(titleLabel) bgImageView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.top.equalTo(12) make.top.equalTo(20)
make.centerX.equalToSuperview() make.centerX.equalToSuperview()
make.height.equalTo(22) make.height.equalTo(22)
} }
...@@ -72,8 +72,8 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell { ...@@ -72,8 +72,8 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell {
bgImageView.addSubview(rewardDescContentView) bgImageView.addSubview(rewardDescContentView)
rewardDescContentView.snp.makeConstraints { make in rewardDescContentView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(titleLabel.snp.bottom).offset(8) make.top.equalTo(titleLabel.snp.bottom).offset(10)
make.bottom.equalTo(-12) make.bottom.equalTo(-18)
// make.height.equalTo(40).priority(.high) // make.height.equalTo(40).priority(.high)
} }
...@@ -169,8 +169,14 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell { ...@@ -169,8 +169,14 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell {
} }
func fus_setupModel(model: FUSInviteDataIndexGetInfoModel) { func fus_setupModel(model: FUSInviteDataIndexGetInfoModel) {
let emissaryContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.masterContent, font: nil, isCenter: true)
let clansmanContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.memberContent, font: nil, isCenter: true) var attrTextFont: UIFont = .fus_themeFont(13)
if self.singleDescWidth < 330 + 18*2 {
attrTextFont = .fus_themeFont(12)
}
let emissaryContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.masterContent, font: attrTextFont, isCenter: true)
let clansmanContentAttr = FUSInviteDataIndexGetInfoModel.fus_getAttr(withContent: model.memberContent, font: attrTextFont, isCenter: true)
// 如果有没有内容的情况,那么只显示一个,并且居中 // 如果有没有内容的情况,那么只显示一个,并且居中
if emissaryContentAttr.length <= 0 || clansmanContentAttr.length <= 0{ if emissaryContentAttr.length <= 0 || clansmanContentAttr.length <= 0{
......
...@@ -29,7 +29,7 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell { ...@@ -29,7 +29,7 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell {
} }
let bgView = UIView(frame: CGRectMake(0, 0, UIView.fus_screenW() - 18*2, FUSInviteRewardMyClansmanCell.cellHeight)) let bgView = UIView(frame: CGRectMake(0, 0, UIView.fus_screenW() - 18*2, FUSInviteRewardMyClansmanCell.cellHeight))
let avatarView: FUSRichIconView = .init(frame: CGRectMake(0, 0, 48, 48)) let avatarView: UIImageView = .init(frame: CGRectMake(0, 0, 48, 48))
let avatarTapBtn = UIButton(type: .custom) let avatarTapBtn = UIButton(type: .custom)
let nickNameLabel = UILabel() let nickNameLabel = UILabel()
let vipLevelImageView : UIImageView = .init() let vipLevelImageView : UIImageView = .init()
...@@ -51,6 +51,8 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell { ...@@ -51,6 +51,8 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell {
make.top.bottom.equalToSuperview() make.top.bottom.equalToSuperview()
} }
avatarView.layer.cornerRadius = 24
avatarView.layer.masksToBounds = true
bgView.addSubview(avatarView) bgView.addSubview(avatarView)
avatarView.snp.makeConstraints { make in avatarView.snp.makeConstraints { make in
make.left.equalTo(14) make.left.equalTo(14)
...@@ -74,11 +76,11 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell { ...@@ -74,11 +76,11 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell {
nickNameLabel.font = .fus_themeMediumFont(15) nickNameLabel.font = .fus_themeMediumFont(15)
nickNameCenterView.addSubview(nickNameLabel) nickNameCenterView.addSubview(nickNameLabel)
vipLevelImageView.isHidden = true
vipLevelImageView.snp.makeConstraints { make in vipLevelImageView.snp.makeConstraints { make in
make.left.equalToSuperview() make.left.equalTo(nickNameLabel.snp.right).offset(2)
make.size.equalTo(CGSizeMake(32, 13)) // make.size.equalTo(CGSizeMake(32, 13))
make.centerY.equalTo(nickNameLabel.snp.centerY) make.centerY.equalTo(nickNameLabel.snp.centerY)
make.height.equalTo(14)
} }
nickNameLabel.snp.makeConstraints { make in nickNameLabel.snp.makeConstraints { make in
make.top.equalToSuperview() make.top.equalToSuperview()
...@@ -118,9 +120,11 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell { ...@@ -118,9 +120,11 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell {
self.nickNameLabel.text = model.uidNickName self.nickNameLabel.text = model.uidNickName
self.nickNameLabel.textColor = .fus_textColorMedium() self.nickNameLabel.textColor = .fus_textColorMedium()
self.avatarView.setWebImageWithSubURLString(model.uidFace)
if model.isVip == 1 { if model.isVip == 1 {
self.avatarView.fus_setupIcon(withFacePath: model.uidFace, level: model.vipLevel) self.vipLevelImageView.image = .fus_image(withLevel: model.vipLevel)
// self.avatarView.fus_setupIcon(withFacePath: model.uidFace, level: model.vipLevel)
// let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: model.vipLevel) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: model.vipLevel)
// self.vipLevelImageView.isHidden = false // self.vipLevelImageView.isHidden = false
// self.vipLevelImageView.setWebImageWithSubURLString(levelmodel?.icon) // self.vipLevelImageView.setWebImageWithSubURLString(levelmodel?.icon)
...@@ -130,14 +134,15 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell { ...@@ -130,14 +134,15 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell {
// } // }
}else { }else {
self.vipLevelImageView.image = .fus_image(withLevel: 0)
// 如果服务器配置了0级,则使用0级的颜色 // 如果服务器配置了0级,则使用0级的颜色
let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: 0) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: 0)
if let color = levelmodel?.color, // if let color = levelmodel?.color,
color.count > 0{ // color.count > 0{
self.nickNameLabel.textColor = .init(hexString: color) // self.nickNameLabel.textColor = .init(hexString: color)
} // }
//
self.avatarView.fus_setupIcon(withFacePath: model.uidFace, level:0) // self.avatarView.fus_setupIcon(withFacePath: model.uidFace, level:0)
// self.vipLevelImageView.isHidden = true // self.vipLevelImageView.isHidden = true
// self.nickNameLabel.snp.updateConstraints { make in // self.nickNameLabel.snp.updateConstraints { make in
// make.left.equalToSuperview().offset(2) // make.left.equalToSuperview().offset(2)
...@@ -148,10 +153,11 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell { ...@@ -148,10 +153,11 @@ class FUSInviteRewardMyClansmanCell: UITableViewCell {
make.append { make in make.append { make in
make.image = .fus_fireIcon() make.image = .fus_fireIcon()
make.alignment = .center make.alignment = .center
make.bounds = CGRectMake(0, 0, 20, 20) make.bounds = CGRectMake(0, 0, 30/2*0.9, 38/2*0.9)
}.baseLineOffset(2) }.baseLineOffset(2)
make.append("\(model.devoteBonds)").textColor(.fus_fireGreen()) make.append("\(model.devoteBonds)").textColor(.fus_fireGreen())
make.font(.fus_themeFont(13)) make.font(.fus_themeFont(13))
make.baseLineOffset(0)
}) })
self.lastLoginDateLabel.attributedText = model.fus_getLastLoginDate() self.lastLoginDateLabel.attributedText = model.fus_getLastLoginDate()
...@@ -196,7 +202,7 @@ extension FUSInviteDataMyselfDauGetListDataModel{ ...@@ -196,7 +202,7 @@ extension FUSInviteDataMyselfDauGetListDataModel{
func fus_getLastLoginDate() -> NSAttributedString? { func fus_getLastLoginDate() -> NSAttributedString? {
// 当前年月日 // 当前年月日
let component = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: .init()) // let component = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: .init())
// let currentYear = component.year ?? 0 // let currentYear = component.year ?? 0
//2025-02-17 12:36:40 //2025-02-17 12:36:40
...@@ -205,7 +211,7 @@ extension FUSInviteDataMyselfDauGetListDataModel{ ...@@ -205,7 +211,7 @@ extension FUSInviteDataMyselfDauGetListDataModel{
df.dateFormat = "yyyy-MM-dd HH:mm:ss" df.dateFormat = "yyyy-MM-dd HH:mm:ss"
let lastLoginDate = df.date(from: self.lastLogTimeStr) let lastLoginDate = df.date(from: self.lastLogTimeStr)
guard let lastLoginDate = lastLoginDate else { return nil } guard let lastLoginDate = lastLoginDate else { return nil }
let msgComponent = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: lastLoginDate) // let msgComponent = Calendar.current.dateComponents([.year, .month, .day, .hour, .minute], from: lastLoginDate)
// let msgYear = msgComponent.year ?? 0 // let msgYear = msgComponent.year ?? 0
// let msgMonth = msgComponent.month ?? 0 // let msgMonth = msgComponent.month ?? 0
// let msgDay = msgComponent.day ?? 0 // let msgDay = msgComponent.day ?? 0
......
...@@ -43,19 +43,19 @@ class FUSInviteRewardMyClansmanHeaderCell: UITableViewCell { ...@@ -43,19 +43,19 @@ class FUSInviteRewardMyClansmanHeaderCell: UITableViewCell {
} }
let dotView = UIView() let dotView = UIView()
dotView.backgroundColor = .fus_theme() dotView.backgroundColor = .fus_diamondBlue()
dotView.layer.cornerRadius = 3 dotView.layer.cornerRadius = 3
dotView.layer.masksToBounds = true dotView.layer.masksToBounds = true
bgView.addSubview(dotView) bgView.addSubview(dotView)
dotView.snp.makeConstraints { make in dotView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(14)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.size.equalTo(CGSizeMake(6, 6)) make.size.equalTo(CGSizeMake(6, 6))
} }
bgView.addSubview(titleLabel) bgView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.left.equalTo(dotView.snp.right).offset(8) make.left.equalTo(dotView.snp.right).offset(6)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
} }
......
...@@ -50,7 +50,7 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -50,7 +50,7 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
let bgView = UIView() let bgView = UIView()
let charBgBtn = UIButton(type: .custom) let charBgBtn = UIButton(type: .custom)
let avatarView: FUSRichIconView = .init(frame: CGRectMake(0, 0, 48, 48)) let avatarView: UIImageView = .init(frame: CGRectMake(0, 0, 48, 48))
let nickNameLabel = UILabel() let nickNameLabel = UILabel()
let vipLevelImageView : UIImageView = .init() let vipLevelImageView : UIImageView = .init()
let descLabel = UILabel() let descLabel = UILabel()
...@@ -83,6 +83,8 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -83,6 +83,8 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
make.height.equalTo(66) make.height.equalTo(66)
} }
avatarView.layer.cornerRadius = 21
avatarView.layer.masksToBounds = true
charBgBtn.addSubview(avatarView) charBgBtn.addSubview(avatarView)
avatarView.snp.makeConstraints { make in avatarView.snp.makeConstraints { make in
make.left.equalTo(14) make.left.equalTo(14)
...@@ -102,11 +104,11 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -102,11 +104,11 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
nickNameLabel.textColor = .fus_textColorMedium() nickNameLabel.textColor = .fus_textColorMedium()
nickNameCenterView.addSubview(nickNameLabel) nickNameCenterView.addSubview(nickNameLabel)
vipLevelImageView.isHidden = true
vipLevelImageView.snp.makeConstraints { make in vipLevelImageView.snp.makeConstraints { make in
make.left.equalToSuperview() make.left.equalTo(nickNameLabel.snp.right).offset(2)
make.size.equalTo(CGSizeMake(32, 13)) // make.size.equalTo(CGSizeMake(32, 13))
make.centerY.equalTo(nickNameLabel.snp.centerY) make.centerY.equalTo(nickNameLabel.snp.centerY)
make.height.equalTo(14)
} }
nickNameLabel.snp.makeConstraints { make in nickNameLabel.snp.makeConstraints { make in
make.top.equalToSuperview() make.top.equalToSuperview()
...@@ -135,10 +137,10 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -135,10 +137,10 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
make.height.equalTo(26) make.height.equalTo(26)
} }
let arrowImageView = UIImageView(image: .fus_rightArrowIcon()) let arrowImageView = UIImageView(image: FUSUserCenterBunble.imageNamed("inviteReward_right_arrow_icon"))
charBgBtn.addSubview(arrowImageView) charBgBtn.addSubview(arrowImageView)
arrowImageView.snp.makeConstraints { make in arrowImageView.snp.makeConstraints { make in
make.right.equalTo(-8) make.right.equalTo(-15)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
...@@ -192,9 +194,11 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -192,9 +194,11 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
self.nickNameLabel.text = model.agentFactor.userInfo.userNick self.nickNameLabel.text = model.agentFactor.userInfo.userNick
self.nickNameLabel.textColor = .fus_textColorMedium() self.nickNameLabel.textColor = .fus_textColorMedium()
self.avatarView.setWebImageWithSubURLString(model.agentFactor.userInfo.userFace)
if model.agentFactor.userInfo.userIsVip == 1 { if model.agentFactor.userInfo.userIsVip == 1 {
self.avatarView.fus_setupIcon(withFacePath: model.agentFactor.userInfo.userFace, level: model.agentFactor.userInfo.userLevel) // self.avatarView.fus_setupIcon(withFacePath: model.agentFactor.userInfo.userFace, level: model.agentFactor.userInfo.userLevel)
self.vipLevelImageView.image = UIImage.fus_image(withLevel: model.agentFactor.userInfo.userLevel);
// let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level:model.agentFactor.userInfo.userLevel) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level:model.agentFactor.userInfo.userLevel)
// self.vipLevelImageView.isHidden = false // self.vipLevelImageView.isHidden = false
// self.vipLevelImageView.setWebImageWithSubURLString(levelmodel?.icon) // self.vipLevelImageView.setWebImageWithSubURLString(levelmodel?.icon)
...@@ -204,8 +208,9 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -204,8 +208,9 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
// } // }
}else { }else {
let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level:0) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level:0)
self.avatarView.fus_setupIcon(withFacePath: model.agentFactor.userInfo.userFace, level:0) // self.avatarView.fus_setupIcon(withFacePath: model.agentFactor.userInfo.userFace, level:0)
self.vipLevelImageView.image = UIImage.fus_image(withLevel: 0);
// self.vipLevelImageView.isHidden = true // self.vipLevelImageView.isHidden = true
// if let nickNameColor = levelmodel?.color, // if let nickNameColor = levelmodel?.color,
// isValidString(nickNameColor) == false{ // isValidString(nickNameColor) == false{
...@@ -227,7 +232,7 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -227,7 +232,7 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
make.append(.init(format: .fus_localString("使者身份存续条件%@"), descLabelRegexText)).textColor(.fus_textColorMedium()) make.append(.init(format: .fus_localString("使者身份存续条件%@"), descLabelRegexText)).textColor(.fus_textColorMedium())
make.regex(descLabelRegexText).replace { make in make.regex(descLabelRegexText).replace { make in
make.append("(").textColor(.fus_textColorMedium()) make.append("(").textColor(.fus_textColorMedium())
make.append("\(conditionFulfilled)").textColor(.fus_theme()) make.append("\(conditionFulfilled)").textColor(.fus_diamondBlue())
make.append("/\(model.agentFactor.conditionList.count))").textColor(.fus_textColorMedium()) make.append("/\(model.agentFactor.conditionList.count))").textColor(.fus_textColorMedium())
} }
make.font(.fus_themeFont(12)) make.font(.fus_themeFont(12))
...@@ -242,12 +247,14 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell { ...@@ -242,12 +247,14 @@ class FUSInviteRewardMyHeaderCell: UITableViewCell {
make.append { make in make.append { make in
make.image = .fus_fireIcon() make.image = .fus_fireIcon()
make.alignment = .center make.alignment = .center
} make.bounds = CGRectMake(0, 0, 30/2*0.9, 38/2*0.9)
}.baseLineOffset(2)
make.append("\(model.inviteAward)").textColor(.fus_fireGreen()) make.append("\(model.inviteAward)").textColor(.fus_fireGreen())
make.font(.fus_themeFont(13)) make.font(.fus_themeFont(13))
make.baseLineOffset(0)
}) })
self.myGroupMemberView.contentLabel.textColor = .fus_theme() self.myGroupMemberView.contentLabel.textColor = .fus_diamondBlue()
self.myGroupMemberView.contentLabel.text = "+ \(model.inviteMebmer)" self.myGroupMemberView.contentLabel.text = "+ \(model.inviteMebmer)"
self.myGroupMemberView.contentLabel.isHidden = model.inviteMebmer <= 0 self.myGroupMemberView.contentLabel.isHidden = model.inviteMebmer <= 0
} }
...@@ -260,7 +267,7 @@ class FUSInviteRewardMyHeaderTemplateView: FUSBaseView { ...@@ -260,7 +267,7 @@ class FUSInviteRewardMyHeaderTemplateView: FUSBaseView {
let bgBtn = UIButton(type: .custom) let bgBtn = UIButton(type: .custom)
let titleLabel = UILabel() let titleLabel = UILabel()
let contentLabel = UILabel() let contentLabel = UILabel()
let arrowImageView = UIImageView(image: .fus_rightArrowIcon()) let arrowImageView = UIImageView(image: FUSUserCenterBunble.imageNamed("inviteReward_right_arrow_icon"))
let lineView = UIView() let lineView = UIView()
override func makeUI() { override func makeUI() {
...@@ -287,7 +294,7 @@ class FUSInviteRewardMyHeaderTemplateView: FUSBaseView { ...@@ -287,7 +294,7 @@ class FUSInviteRewardMyHeaderTemplateView: FUSBaseView {
bgBtn.addSubview(arrowImageView) bgBtn.addSubview(arrowImageView)
arrowImageView.snp.makeConstraints { make in arrowImageView.snp.makeConstraints { make in
make.right.equalTo(-8) make.right.equalTo(-15)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
......
...@@ -74,11 +74,11 @@ class FUSInviteRewardTaskCommonCell: UITableViewCell { ...@@ -74,11 +74,11 @@ class FUSInviteRewardTaskCommonCell: UITableViewCell {
make.bottom.equalTo(-FUSInviteRewardTaskCommonCell.bgBottomMargin) make.bottom.equalTo(-FUSInviteRewardTaskCommonCell.bgBottomMargin)
} }
strokeBgImageView.contentMode = .scaleAspectFill strokeBgImageView.contentMode = .scaleToFill
bgImageView.addSubview(strokeBgImageView) bgImageView.addSubview(strokeBgImageView)
strokeBgImageView.snp.makeConstraints { make in strokeBgImageView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(4) make.left.right.equalToSuperview().inset(4)
make.bottom.equalTo(-12) make.bottom.equalTo(-4)
} }
bgImageView.addSubview(titleLabel) bgImageView.addSubview(titleLabel)
...@@ -187,7 +187,7 @@ extension FUSInviteRewardTaskCommonCell: UITableViewDelegate, UITableViewDataSou ...@@ -187,7 +187,7 @@ extension FUSInviteRewardTaskCommonCell: UITableViewDelegate, UITableViewDataSou
cell.nickNameLabel.text = userModel.name cell.nickNameLabel.text = userModel.name
cell.expireDescLabel.attributedText = userModel.fus_getExpireDate() cell.expireDescLabel.attributedText = userModel.fus_getExpireDate()
cell.drawBtn.isEnabled = (userModel.state == 0) cell.drawBtn.isEnabled = (userModel.state == 0)
cell.drawBtn.backgroundColor = (userModel.state == 0) ? .fus_diamondBlue() : .init(hexString: "#E6E6E6") cell.drawBtn.backgroundColor = (userModel.state == 0) ? .fus_theme() : .init(hexString: "#E6E6E6")
cell.redDotView.isHidden = true cell.redDotView.isHidden = true
if self.type == .reward { if self.type == .reward {
......
...@@ -210,10 +210,10 @@ class FUSInviteFunctionController: FUSBaseViewController { ...@@ -210,10 +210,10 @@ class FUSInviteFunctionController: FUSBaseViewController {
extension UIView { extension UIView {
func fus_addInviteShadow(){ func fus_addInviteShadow(){
self.layer.shadowColor = UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1).cgColor self.layer.shadowColor = UIColor.init(hex: "#8F8F8F").cgColor
self.layer.shadowOffset = CGSize(width: 0, height: 0) self.layer.shadowOffset = CGSize(width: 0, height: 1)
self.layer.shadowOpacity = 1 self.layer.shadowOpacity = 0.4
// self.layer.shadowRadius = 6.5 self.layer.shadowRadius = 8
} }
/// 添加邀请卡片的圆角,注意,会去掉所有的 CAShapeLayer /// 添加邀请卡片的圆角,注意,会去掉所有的 CAShapeLayer
...@@ -224,6 +224,10 @@ extension UIView { ...@@ -224,6 +224,10 @@ extension UIView {
// 圆角角度 // 圆角角度
let radius: CGFloat = 9 let radius: CGFloat = 9
// 阴影衍射最大距离
let shadowDiffractionDistance: CGFloat = 12.5 * 2
// 阴影角度
let shadowRadius: CGFloat = 8
// 创建两个layer // 创建两个layer
let shadowlayer = CAShapeLayer() let shadowlayer = CAShapeLayer()
...@@ -234,30 +238,31 @@ extension UIView { ...@@ -234,30 +238,31 @@ extension UIView {
if maxRowCount <= 1 { if maxRowCount <= 1 {
// 只有一个 // 只有一个
shadowBezierPath = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: [.topLeft,.topRight, .bottomLeft, .bottomRight], cornerRadii: CGSize(width: radius, height: radius)) shadowBezierPath = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: [.topLeft,.topRight, .bottomLeft, .bottomRight], cornerRadii: CGSize(width: radius, height: radius))
maskBezierPath = UIBezierPath(rect: CGRectMake(-radius, -radius, bounds.width + radius*2, bounds.height + radius*2)) maskBezierPath = UIBezierPath(rect: CGRectMake(-shadowDiffractionDistance, -shadowDiffractionDistance, bounds.width + shadowDiffractionDistance*2, bounds.height + shadowDiffractionDistance*2))
}else { }else {
if currentRow == 0 { if currentRow == 0 {
// 第一个 // 第一个
shadowBezierPath = UIBezierPath(roundedRect: CGRectMake(0, 0, bounds.width, bounds.height + radius), byRoundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: radius, height: radius)) shadowBezierPath = UIBezierPath(roundedRect: CGRectMake(0, 0, bounds.width, bounds.height + shadowRadius), byRoundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: radius, height: radius))
maskBezierPath = UIBezierPath(rect: CGRectMake(-radius, -radius, bounds.width + radius*2, bounds.height + radius)) maskBezierPath = UIBezierPath(rect: CGRectMake(-shadowDiffractionDistance, -shadowDiffractionDistance, bounds.width + shadowDiffractionDistance*2, bounds.height + shadowDiffractionDistance))
} }
else if currentRow == maxRowCount - 1 { else if currentRow == maxRowCount - 1 {
// 最后一个 // 最后一个
shadowBezierPath = UIBezierPath(roundedRect: CGRectMake(0, -radius, bounds.width, bounds.height + radius), byRoundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: radius, height: radius)) shadowBezierPath = UIBezierPath(roundedRect: CGRectMake(0, -shadowRadius, bounds.width, bounds.height + shadowRadius), byRoundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: radius, height: radius))
maskBezierPath = UIBezierPath(rect: CGRectMake(-radius, 0, bounds.width + radius*2, bounds.height + radius)) maskBezierPath = UIBezierPath(rect: CGRectMake(-shadowDiffractionDistance, 0, bounds.width + shadowDiffractionDistance*2, bounds.height + shadowDiffractionDistance))
}else { }else {
// 都不是,则不设置圆角 // 都不是,则不设置圆角
shadowBezierPath = UIBezierPath(rect: CGRectMake(0, -radius, bounds.width, bounds.height + radius*2)) shadowBezierPath = UIBezierPath(rect: CGRectMake(0, -shadowRadius, bounds.width, bounds.height + shadowRadius*2))
maskBezierPath = UIBezierPath(rect: CGRectMake(-radius, 0, bounds.width + radius*2, bounds.height)) maskBezierPath = UIBezierPath(rect: CGRectMake(-shadowDiffractionDistance, 0, bounds.width + shadowDiffractionDistance*2, bounds.height))
} }
} }
// 阴影 // 阴影
shadowlayer.shadowColor = UIColor(red: 0.7, green: 0.7, blue: 0.7, alpha: 1).cgColor shadowlayer.shadowColor = UIColor.init(hex: "#8F8F8F").cgColor
shadowlayer.shadowOpacity = 1 shadowlayer.shadowOpacity = 0.4
shadowlayer.shadowOffset = CGSize(width: 0, height: 0) shadowlayer.shadowOffset = CGSize(width: 0, height: 1)
shadowlayer.shadowRadius = shadowRadius
shadowlayer.path = shadowBezierPath.cgPath shadowlayer.path = shadowBezierPath.cgPath
shadowlayer.fillColor = UIColor.white.cgColor shadowlayer.fillColor = UIColor.white.cgColor
// normalLayer.path = bezierPath.cgPath // normalLayer.path = bezierPath.cgPath
......
...@@ -71,7 +71,7 @@ class FUSInviteCodeCopyAlertView: FUSBaseView { ...@@ -71,7 +71,7 @@ class FUSInviteCodeCopyAlertView: FUSBaseView {
} }
codeBtn.titleLabel?.font = .fus_themeHeavyFont(33) codeBtn.titleLabel?.font = .fus_themeHeavyFont(33)
codeBtn.setTitleColor(.fus_theme(), for: .normal) codeBtn.setTitleColor(.fus_diamondBlue(), for: .normal)
contentView.addSubview(codeBtn) contentView.addSubview(codeBtn)
codeBtn.snp.makeConstraints { make in codeBtn.snp.makeConstraints { make in
make.top.equalTo(descLabel.snp.bottom).offset(10) make.top.equalTo(descLabel.snp.bottom).offset(10)
......
...@@ -48,8 +48,8 @@ class FUSInviteRewardMainView: FUSBaseView { ...@@ -48,8 +48,8 @@ class FUSInviteRewardMainView: FUSBaseView {
segmentView.segmentDelegate = self segmentView.segmentDelegate = self
segmentView.isEqualSpace = true segmentView.isEqualSpace = true
segmentView.itemFont = .fus_themeFont(16) segmentView.itemFont = .fus_themeMediumFont(15)
segmentView.itemSelectedFont = .fus_themeFont(18) segmentView.itemSelectedFont = .fus_themeBoldFont(20)
segmentView.alignment = .left segmentView.alignment = .left
segmentView.verticalAlignment = .center segmentView.verticalAlignment = .center
segmentView.space = 25 segmentView.space = 25
......
...@@ -14,7 +14,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -14,7 +14,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
/// 头像下载完毕 /// 头像下载完毕
let avatarImageIsReady: BehaviorRelay<Bool> = .init(value: false) let avatarImageIsReady: BehaviorRelay<Bool> = .init(value: false)
let avatarView: FUSRichIconView = .init(frame: CGRectMake(0, 0, 28, 28)) let avatarView: UIImageView = .init(frame: CGRectMake(0, 0, 28, 28))
let userNameLabel : UILabel = .init() let userNameLabel : UILabel = .init()
let vipLevelImageView : UIImageView = .init() let vipLevelImageView : UIImageView = .init()
let qrCodeView = FUSInviteQRCodeView(frame: CGRectMake(0, 0, 248, 248)) let qrCodeView = FUSInviteQRCodeView(frame: CGRectMake(0, 0, 248, 248))
...@@ -54,19 +54,15 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -54,19 +54,15 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
make.height.equalTo(28) make.height.equalTo(28)
} }
avatarView.layer.cornerRadius = 14
avatarView.layer.masksToBounds = true
avatarCenterView.addSubview(avatarView) avatarCenterView.addSubview(avatarView)
avatarView.snp.makeConstraints { make in avatarView.snp.makeConstraints { make in
make.left.top.bottom.equalToSuperview() make.left.top.bottom.equalToSuperview()
make.width.equalTo(avatarView.snp.height) make.width.equalTo(avatarView.snp.height)
} }
vipLevelImageView.isHidden = true
avatarCenterView.addSubview(vipLevelImageView) avatarCenterView.addSubview(vipLevelImageView)
vipLevelImageView.snp.makeConstraints { make in
make.left.equalTo(avatarView.snp.right).offset(6)
make.centerY.equalTo(avatarView.snp.centerY)
make.size.equalTo(CGSizeMake(32, 13))
}
self.userNameLabel.textColor = .fus_textColorMedium() self.userNameLabel.textColor = .fus_textColorMedium()
self.userNameLabel.font = .fus_themeFont(14) self.userNameLabel.font = .fus_themeFont(14)
...@@ -78,6 +74,13 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -78,6 +74,13 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
make.right.equalToSuperview() make.right.equalToSuperview()
} }
vipLevelImageView.snp.makeConstraints { make in
make.left.equalTo(userNameLabel.snp.right).offset(2)
make.centerY.equalTo(avatarView.snp.centerY)
// make.size.equalTo(CGSizeMake(32, 13))
make.height.equalTo(14)
}
self.addSubview(qrCodeView) self.addSubview(qrCodeView)
qrCodeView.snp.makeConstraints { make in qrCodeView.snp.makeConstraints { make in
make.top.equalTo(avatarCenterView.snp.bottom).offset(4) make.top.equalTo(avatarCenterView.snp.bottom).offset(4)
...@@ -106,10 +109,12 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -106,10 +109,12 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
let privilege = FUSSwiftCacheDataShare.share.userInfo.value?.privilege let privilege = FUSSwiftCacheDataShare.share.userInfo.value?.privilege
let richPower = (privilege?["richPower"] as? Bool) ?? false let richPower = (privilege?["richPower"] as? Bool) ?? false
self.userNameLabel.textColor = .fus_textColorMedium() self.userNameLabel.textColor = .fus_textColorMedium()
self.avatarView.setWebImageWithSubURLString(FUSSwiftCacheDataShare.share.userInfo.value?.face ?? "")
if richPower == true { if richPower == true {
let level = FUSSwiftCacheDataShare.share.userInfo.value?.level.intValue ?? 0 let level = FUSSwiftCacheDataShare.share.userInfo.value?.level.intValue ?? 0
self.avatarView.fus_setupIcon(withFacePath: FUSSwiftCacheDataShare.share.userInfo.value?.face ?? "", level: level) self.vipLevelImageView.image = .fus_image(withLevel: level)
// self.avatarView.fus_setupIcon(withFacePath: FUSSwiftCacheDataShare.share.userInfo.value?.face ?? "", level: level)
// self.vipLevelImageView.isHidden = false // self.vipLevelImageView.isHidden = false
// self.userNameLabel.snp.updateConstraints { make in // self.userNameLabel.snp.updateConstraints { make in
...@@ -121,14 +126,16 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -121,14 +126,16 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
} else { } else {
self.vipLevelImageView.image = .fus_image(withLevel: 0)
// 如果服务器配置了0级,则使用0级的颜色 // 如果服务器配置了0级,则使用0级的颜色
let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: 0) // let levelmodel = FUSSwiftCacheDataShare.share.fus_levelModel(level: 0)
if let color = levelmodel?.color, // if let color = levelmodel?.color,
color.count > 0{ // color.count > 0{
self.userNameLabel.textColor = .init(hexString: color) // self.userNameLabel.textColor = .init(hexString: color)
} // }
self.avatarView.fus_setupIcon(withFacePath: FUSSwiftCacheDataShare.share.userInfo.value?.face ?? "", level: 0) // self.avatarView.fus_setupIcon(withFacePath: FUSSwiftCacheDataShare.share.userInfo.value?.face ?? "", level: 0)
// self.vipLevelImageView.isHidden = true // self.vipLevelImageView.isHidden = true
// self.userNameLabel.snp.updateConstraints { make in // self.userNameLabel.snp.updateConstraints { make in
// make.left.equalTo(avatarView.snp.right).offset(4) // make.left.equalTo(avatarView.snp.right).offset(4)
...@@ -141,7 +148,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView { ...@@ -141,7 +148,7 @@ class FUSMyEmissaryQRCodeView: FUSBaseView {
qrCodeLabel.attributedText = .sj.makeText({ make in qrCodeLabel.attributedText = .sj.makeText({ make in
make.append(.fus_localString("使者码")).textColor(.fus_textColorRich()) make.append(.fus_localString("使者码")).textColor(.fus_textColorRich())
make.append(" ") make.append(" ")
make.append(FUSSwiftCacheDataShare.share.userInfo.value?.uid ?? "").textColor(.fus_theme()) make.append(FUSSwiftCacheDataShare.share.userInfo.value?.uid ?? "").textColor(.fus_diamondBlue())
make.font(.fus_themeMediumFont(20)) make.font(.fus_themeMediumFont(20))
}) })
} }
......
...@@ -128,15 +128,15 @@ ...@@ -128,15 +128,15 @@
_areaCodeTextField.displayOnly = YES; _areaCodeTextField.displayOnly = YES;
[_areaCodeTextField addTarget:self action:@selector(textFiledEditChanged:) forControlEvents:UIControlEventEditingChanged]; [_areaCodeTextField addTarget:self action:@selector(textFiledEditChanged:) forControlEvents:UIControlEventEditingChanged];
self.countryInfoDict = [[NSUserDefaults standardUserDefaults] objectForKey:FUSUserUDKeys.fus_USER_COUNTRY_INFO]; // self.countryInfoDict = [[NSUserDefaults standardUserDefaults] objectForKey:FUSUserUDKeys.fus_USER_COUNTRY_INFO];
//
if(!self.countryInfoDict){// 设置默认值 // if(!self.countryInfoDict){// 设置默认值
self.countryInfoDict = [[FUSCountryHelper sharedInstance] fus_getCountryInfoForCountryName:@"Taiwan"]; // self.countryInfoDict = [[FUSCountryHelper sharedInstance] fus_getCountryInfoForCountryName:@"Taiwan"];
[self setupCountryAndArea]; // [self setupCountryAndArea];
// 让文本框获取焦点,弹出键盘 // // 让文本框获取焦点,弹出键盘
}else { // }else {
[self displayCountryNameAndCountryCode]; // [self displayCountryNameAndCountryCode];
} // }
[self textFiledEditChanged:_phoneTextField]; [self textFiledEditChanged:_phoneTextField];
_phoneTextField.shouldPaste = NO; _phoneTextField.shouldPaste = NO;
...@@ -158,6 +158,7 @@ ...@@ -158,6 +158,7 @@
[self fus_enableNavigationBackWithPopFunction:popToRootViewController withAnimated:YES]; [self fus_enableNavigationBackWithPopFunction:popToRootViewController withAnimated:YES];
[self fus_setupLocalStrings]; [self fus_setupLocalStrings];
[self getHistoryLoginPhone];
} }
- (void)fus_setupLocalStrings { - (void)fus_setupLocalStrings {
...@@ -361,6 +362,40 @@ ...@@ -361,6 +362,40 @@
} }
} }
/// 自动填写上次登陆的电话号码
-(void)getHistoryLoginPhone{
// 自动填写账号、密码
self.countryInfoDict = [[NSUserDefaults standardUserDefaults] objectForKey:FUSUserUDKeys.fus_USER_COUNTRY_INFO];
NSString *countryCodeStr = [self.countryInfoDict valueForKey:FUSCountryCodeKey];
if (countryCodeStr != nil && countryCodeStr.length > 0) {
NSArray *countriesArr = [[FUSCountryHelper sharedInstance] fus_getCountryInfoListForCountryCode:countryCodeStr];
if (countriesArr.count > 0) {
NSDictionary *countryInfoDict = [countriesArr firstObject];
if (countryInfoDict) {
self.countryInfoDict = countryInfoDict;
} else {
// 设置默认值
self.countryInfoDict = [[FUSCountryHelper sharedInstance] fus_getCountryInfoForCountryName:@"Taiwan"];
}
[self displayCountryNameAndCountryCode];
}else {
[self setupCountryAndArea];
}
}else {
[self setupCountryAndArea];
}
}
/** /**
设置国家地区 设置国家地区
*/ */
......
...@@ -872,14 +872,7 @@ ...@@ -872,14 +872,7 @@
break; break;
} }
// [weakSelf fus_doLoginReady]; [weakSelf fus_doLoginReady];
BOOL inBindAgent = [dataDict[@"inBindAgent"] boolValue];
BOOL showBind = FUSConfig.sharedInstanced.devConfigs.appStatus == NO && inBindAgent;
if (showBind) {
[[FUSRouter userRouter] fus_showBindAgentPageWithNeedShowSkipBtn:YES success:^{
[weakSelf fus_doLoginReady];
}];
}
} }
} }
......
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
@interface FUSRecieveNotificationHelper () @interface FUSRecieveNotificationHelper ()
/// 标记登出弹窗正在显示
@property (nonatomic, assign) BOOL logoutAlertDidDisplay;
@end @end
@implementation FUSRecieveNotificationHelper @implementation FUSRecieveNotificationHelper
...@@ -43,6 +46,7 @@ ...@@ -43,6 +46,7 @@
*/ */
- (void)fus_setup - (void)fus_setup
{ {
self.logoutAlertDidDisplay = NO;
[self registerNotification]; [self registerNotification];
} }
...@@ -135,13 +139,18 @@ ...@@ -135,13 +139,18 @@
*/ */
- (void)showDifferentLoginWithTime:(NSString *)timeStr - (void)showDifferentLoginWithTime:(NSString *)timeStr
{ {
if (self.logoutAlertDidDisplay == YES) {
return;
}
timeStr = [NSString isNull:timeStr] ? @"" : timeStr; timeStr = [NSString isNull:timeStr] ? @"" : timeStr;
NSString *message = [NSString stringWithFormat:[NSString fus_localString:@"您的账户于%@在其他设备登录,请尽快确认是否是您本人操作哦,否则小秘密可能不保哦~"],timeStr]; NSString *message = [NSString stringWithFormat:[NSString fus_localString:@"您的账户于%@在其他设备登录,请尽快确认是否是您本人操作哦,否则小秘密可能不保哦~"],timeStr];
MJWeakSelf MJWeakSelf
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[FUSAlertView showAlertWithTitle:nil message:message cancelButtonTitle:[NSString fus_localString:@"确定"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) { [FUSAlertView showAlertWithTitle:nil message:message cancelButtonTitle:[NSString fus_localString:@"确定"] otherButtonTitles:nil clickBlock:^(NSInteger buttonIndex) {
weakSelf.logoutAlertDidDisplay = NO;
[weakSelf fus_logoutHandler]; [weakSelf fus_logoutHandler];
}]; }];
}); });
...@@ -159,11 +168,11 @@ ...@@ -159,11 +168,11 @@
[FUSRouter.chatRouter fus_initiativeHandUpConversation]; [FUSRouter.chatRouter fus_initiativeHandUpConversation];
[FUSRouter.chatRouter fus_logOffWithSuccess:nil failure:nil]; [FUSRouter.chatRouter fus_logOffWithSuccess:nil failure:nil];
[[FUSLoginHelper sharedInstance] logOut]; [[FUSLoginHelper sharedInstance] logOut];
// 转跳到启动页 // // 转跳到启动页
FUSStartPageViewController *startPageVC = [[FUSStartPageViewController alloc] initNeedWaitTime:NO]; // FUSStartPageViewController *startPageVC = [[FUSStartPageViewController alloc] initNeedWaitTime:NO];
UINavigationController *navGuide = [[UINavigationController alloc] initWithRootViewController:startPageVC]; // UINavigationController *navGuide = [[UINavigationController alloc] initWithRootViewController:startPageVC];
[[[[UIApplication sharedApplication] delegate] window] setRootViewController:navGuide]; // [[[[UIApplication sharedApplication] delegate] window] setRootViewController:navGuide];
[navGuide popToRootViewControllerAnimated:YES]; // [navGuide popToRootViewControllerAnimated: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