Commit c388a5c8 by ludi

修复一些列bug

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