Commit 8bbb1db4 by ludi

修复一部分bug

parent 3817ed1b
Showing with 284 additions and 79 deletions
......@@ -424,7 +424,7 @@
<key>en_ctr</key>
<string>China</string>
<key>loc_ctr</key>
<string>中国</string>
<string>China</string>
<key>cn_ctr</key>
<string>中国</string>
<key>country_code</key>
......@@ -2243,6 +2243,16 @@
<key>country_code</key>
<string>263</string>
</dict>
<dict>
<key>en_ctr</key>
<string>China</string>
<key>loc_ctr</key>
<string>中國大陸</string>
<key>cn_ctr</key>
<string>中国</string>
<key>country_code</key>
<string>86</string>
</dict>
</array>
</dict>
</plist>
......@@ -25,6 +25,11 @@ typedef void(^countryCompletion)(NSString *country);
*/
+ (instancetype)sharedInstance;
/// 海外市场名称转化 [countryCode: name]
@property (nonatomic, copy) NSDictionary *overseasCountryRenameDict;
@property (nonatomic, copy) BOOL(^isCNStatus)(void);
/**
获取当前手机国家地区
......
......@@ -97,6 +97,24 @@ NSString * const FUSCountryCodeKey = @"country_code";
}
}
// 防止cn模式下,某些地区放到z开头了
if (![firstAlpha isEqualToString:@"Z"]) {
countryArr = [countriesDict objectForKey:@"Z"];
if (countryArr) {
for (NSDictionary *countryInfoDict in countryArr) {
NSString *enName = countryInfoDict[FUSCountryEnglishNameKey];
if ([enName isEqualToString:countryName]) {
return countryInfoDict;
}
}
}
}
return nil;
}
......@@ -122,7 +140,48 @@ NSString * const FUSCountryCodeKey = @"country_code";
- (NSDictionary *)fus_getAllCountries
{
NSString *filePath = [[FUSCommonBundle bundle] pathForResource:@"AllCountry" ofType:@"plist"];
NSDictionary *countriesDic = [[NSDictionary alloc] initWithContentsOfFile:filePath];
NSMutableDictionary *countriesDic = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];
// 整理所有模型
NSArray *banCountryNamesArr = [[FUSCountryHelper sharedInstance] getBanCountryNamesArr];
__block NSMutableArray *zWordsCountriesInsertArr = [[NSMutableArray alloc] init];
__block BOOL isCNStatus = self.isCNStatus();
MJWeakSelf;
[countriesDic.allKeys enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
NSMutableArray *wordCountriesArr = [[NSMutableArray alloc] init];
for (NSDictionary *countryDict in countriesDic[obj]) {
NSMutableDictionary *mutCountryDict = [[NSMutableDictionary alloc] initWithDictionary:countryDict];
if (isCNStatus == NO) {
// 海外模式
// 重命名
if ([weakSelf.overseasCountryRenameDict.allKeys containsObject:mutCountryDict[@"country_code"]]) {
mutCountryDict[@"loc_ctr"] = weakSelf.overseasCountryRenameDict[mutCountryDict[@"country_code"]];
}
}else {
// 非海外模式
// 这些重命名的地方需要收集起来放到z中,所以就跳过原来的
if ([weakSelf.overseasCountryRenameDict.allKeys containsObject:mutCountryDict[@"country_code"]]) {
[zWordsCountriesInsertArr addObject:mutCountryDict];
continue;
}
}
[wordCountriesArr addObject:mutCountryDict];
}
countriesDic[obj] = wordCountriesArr;
}];
// cn模式,把重命名放到z里面
if (isCNStatus == YES && zWordsCountriesInsertArr.count > 0) {
NSMutableArray *zWordCountriesArr = [[NSMutableArray alloc] initWithArray:countriesDic[@"Z"]];
if (zWordCountriesArr == nil) {
zWordCountriesArr = [[NSMutableArray alloc] init];
}
[zWordCountriesArr addObjectsFromArray:zWordsCountriesInsertArr];
countriesDic[@"Z"] = zWordCountriesArr;
}
return countriesDic;
}
......@@ -210,6 +269,17 @@ NSString * const FUSCountryCodeKey = @"country_code";
[resCountriesArr insertObject:tempDict atIndex:0];
}
}
// 只取单独一个的国家地区
NSString *singleCountryName = [self ffgetSingleCountry][countryCode];
NSArray *resCountriesErgodicArr = [[NSArray alloc] initWithArray:resCountriesArr copyItems:YES];
if (singleCountryName != nil && singleCountryName.length > 0) {
for (NSDictionary *obj in resCountriesErgodicArr) {
if ([obj[FUSCountryCodeKey] isEqualToString:countryCode] && ![obj[FUSCountryLocaleNameKey] isEqualToString:singleCountryName]) {
[resCountriesArr removeObject:obj];
}
}
}
return resCountriesArr;
}
......@@ -377,11 +447,22 @@ NSString * const FUSCountryCodeKey = @"country_code";
FUSLogInfo(@"");
}
- (NSDictionary *)overseasCountryRenameDict{
return @{@"886": @"Taiwan(台灣)",
@"852": @"Hong Kong(香港)",
@"853": @"Macau(澳門)"};
}
/// 取到优先的国家地区
-(NSDictionary *)fus_getPreferentialCountry{
return @{@"44": @"United Kingdom"};
}
/// 取到单一判定国家地区
-(NSDictionary *)ffgetSingleCountry{
return @{@"86": @"中國大陸"};
}
-(NSArray *)getBanCountryNamesArr{
return @[@"Afghanistan",
@"Belarus",
......
......@@ -35,7 +35,8 @@
}
if (shareType == FUSShareTypeWebUrl) {
content = @"";
// content = @"";
content = title;
}
NSString *roomType = @"";
if (FUSConfig.sharedInstanced.liveConfigs.isInRoom) {
......
......@@ -241,7 +241,7 @@
weakSelf.shareFailure = nil;
};
twitterComposeVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
twitterComposeVC.modalPresentationStyle = UIModalPresentationPageSheet;
[[UIViewController fus_topViewController] presentViewController:twitterComposeVC animated:YES completion:^{
}];
......@@ -362,10 +362,13 @@
if (shareType == FUSShareTypeImage) {
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
[pasteboard setData:UIImageJPEGRepresentation(image, 0.8) forPasteboardType:@"public.jpeg"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"line://msg/image/%@", pasteboard.name]]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"line://msg/image/%@", pasteboard.name]] options:@{} completionHandler:nil];
}else{
NSString *text = [NSString stringWithFormat:@"%@%@",content,contentURL];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"line://msg/text/%@", [text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
// [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"line://msg/text/%@", [text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"line://msg/text/%@", [text stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]] options:@{} completionHandler:^(BOOL success) {
}];
}
}
......
......@@ -140,7 +140,8 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
}
- (NSString *)lineChannelID{
return @"1657377437";
// return @"1657377437";
return @"1654468829";
}
- (NSString *)lineUniversalLink{
......
......@@ -801,7 +801,14 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
}
/// 跳转到任务中心
case FUSJsWebCidTypeOpenTaskCenter: {
[FUSRouter.userRouter fus_enterTaskVC];
NSInteger taskType = 1;
if (![NSString isNull:[dataDict[@"taskType"] stringValue]]) {
taskType = [dataDict[@"taskType"] intValue];
if (taskType < 1 || taskType > 4) {
taskType = 1;
}
}
[FUSRouter.userRouter fus_enterTaskVCWithRewardType:taskType];
break;
}
......@@ -1059,7 +1066,7 @@ NSString * const kEVENT_RECHARGE_FIRST_RECHARGE_WINDOW_RECEIVE_OFFICIAL_RECAHARG
break;
case FUSJTaskCenter:
{
[FUSRouter.userRouter fus_enterTaskVC];
[FUSRouter.userRouter fus_enterTaskVCWithRewardType:1];
}
break;
case FUSJWriteInviteCode:
......
......@@ -36,7 +36,9 @@ NS_ASSUME_NONNULL_BEGIN
- (void)fus_enterMotorWareVC;
- (void)fus_enterTaskVC;
/// 进入任务中心
/// - Parameter rewardType: 一开始选哪一个:1.新手任务。2.每日任务。3.主播任务。4.奖励领取
- (void)fus_enterTaskVCWithRewardType:(NSInteger)rewardType;
- (FUSWKWebViewController *)fus_enterVIPVC;
......
......@@ -65,4 +65,7 @@
- (NSString *)fus_adaptFusiString;
/// 地址检测,自动更换
- (NSString *)fus_addressCheck;
@end
......@@ -14,6 +14,7 @@
#import "NSArray+Check.h"
#import "FUSLocalizationHelper.h"
#import "UIColor+Conver.h"
#import <FUSFoundation/FUSFoundation-Swift.h>
@implementation NSString (Extend)
......@@ -177,4 +178,11 @@
return result;
}
- (NSString *)fus_addressCheck{
if (![self isKindOfClass:[NSString class]]) {
return self;
}
return [self fus_swiftExtAddressCheck];
}
@end
......@@ -32,8 +32,8 @@ import UIKit
}
}
@objc public extension NSString {
@objc func fus_addressCheck() -> NSString {
public extension NSString {
@objc func fus_swiftExtAddressCheck() -> NSString {
String(self).fus_addressTransfromCheck() as NSString
}
}
......
......@@ -485,7 +485,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20250402113531;
CURRENT_PROJECT_VERSION = 20250402113538;
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 = 20250402113531;
CURRENT_PROJECT_VERSION = 20250402113538;
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>79</integer>
<integer>75</integer>
</dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>77</integer>
<integer>74</integer>
</dict>
</dict>
</dict>
......
......@@ -74,7 +74,7 @@
- (void)fsr_setupWithDict:(NSDictionary *)dict {
self.dict = dict;
self.addressLabel.text = dict[@"address"];
self.addressLabel.text = [dict[@"address"] fus_addressCheck];
[self.addressLabel sizeToFit];
self.describeLabel.text = dict[@"describe"];
......
......@@ -2289,7 +2289,7 @@
if (buttonIndex == 0) {
[FUSBuyDewPopView fus_showBuyDewPopView];
} else if (buttonIndex == 1) {
[FUSRouter.userRouter fus_enterTaskVC];
[FUSRouter.userRouter fus_enterTaskVCWithRewardType:1];
}
}];
}
......
......@@ -562,7 +562,7 @@
}
break;
case 11:{
[FUSRouter.userRouter fus_enterTaskVC];
[FUSRouter.userRouter fus_enterTaskVCWithRewardType:1];
}
break;
......@@ -588,7 +588,7 @@
break;
case 18:{
// 跳轉到任務中心頁面(奖励领取),这里好像跟11一样了
[FUSRouter.userRouter fus_enterTaskVC];
[FUSRouter.userRouter fus_enterTaskVCWithRewardType:4];
}
break;
case 19:{
......
......@@ -7,7 +7,7 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>74</integer>
<integer>79</integer>
</dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict>
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "live_chat_gift_send_bg_cn2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "live_chat_gift_send_bg_cn2@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -132,7 +132,7 @@ typedef NS_ENUM(NSUInteger,JumpType) {
break;
case JTTaskCenter:
{
[FUSRouter.userRouter fus_enterTaskVC];
[FUSRouter.userRouter fus_enterTaskVCWithRewardType:1];
}
break;
case JTWriteInviteCode:
......
......@@ -168,7 +168,7 @@
self.locationBtn.hidden = YES;
}else {
self.locationBtn.hidden = NO;
[self.locationBtn setTitle:model.addr forState:UIControlStateNormal];
[self.locationBtn setTitle:[model.addr fus_addressCheck] forState:UIControlStateNormal];
}
if ([NSString isNull:model.hotSum] || model.roomType == 2) {
self.hotNumBtn.hidden = YES;
......
......@@ -51,9 +51,13 @@
self = [super initWithFrame:frame];
if (self) {
// 判断是否为中文区
if ([FUSLocalizationHelper fus_currentLanguage].languageType == FUSLanguageTypeChinese || [FUSLocalizationHelper fus_currentLanguage].languageType == FUSLanguageTypeChineseTranditional) {
if ([FUSLocalizationHelper fus_currentLanguage].languageType == FUSLanguageTypeChineseTranditional) {
_defaultBgImageName = @"live_chat_gift_send_bg_cn";
}else {
}
else if ([FUSLocalizationHelper fus_currentLanguage].languageType == FUSLanguageTypeChinese){
_defaultBgImageName = @"live_chat_gift_send_bg_cn2";
}
else {
_defaultBgImageName = @"live_chat_gift_send_bg_en";
}
_count = 1;
......
......@@ -345,7 +345,7 @@
make.append(@" ");
make.append(model.age).textColor(model.sex.integerValue == 0 ? [UIColor colorWithHex:@"#FE96B0"] : [UIColor colorWithHex:@"#76C4FF"]);
make.append(@" ");
make.append(model.addr).textColor([UIColor colorWithHex:@"#BBBAB8"]);
make.append([model.addr fus_addressCheck]).textColor([UIColor colorWithHex:@"#BBBAB8"]);
make.font([UIFont fus_themeFont:10]);
}];
// 更新 Frame
......
......@@ -322,11 +322,11 @@
model.addr = @"香港";
}
//地址
if ([NSString isNullWithString:model.addr]) {
if ([NSString isNullWithString:[model.addr fus_addressCheck]]) {
self.addressView.hidden = YES;
}else{
self.addressView.hidden = NO;
[self.addressView fus_setIcon:[FUSShowRoomCenterBunble imageNamed:@"BaoFang_icon_address"] title:model.addr];
[self.addressView fus_setIcon:[FUSShowRoomCenterBunble imageNamed:@"BaoFang_icon_address"] title:[model.addr fus_addressCheck]];
}
//设置评分
......
......@@ -12,7 +12,7 @@
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>75</integer>
<integer>77</integer>
</dict>
</dict>
</dict>
......
......@@ -19,6 +19,8 @@ class FUSBindAgentInputCodeViewController: FUSBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
self.showBackBtn = true
self.fus_setupNav()
self.fus_setupBottomViews()
self.fus_setupInputViews()
......
......@@ -20,6 +20,9 @@ import AVFoundation
public override func viewDidLoad() {
super.viewDidLoad()
self.showBackBtn = true
self.fus_setupNav()
self.fus_setupBottomViews()
self.fus_setupScanView()
......@@ -126,7 +129,7 @@ import AVFoundation
}, superView: albumQRCodeView)
qrcodeTipDescribeLabel.font = .fus_themeFont(14)
qrcodeTipDescribeLabel.textColor = .white
qrcodeTipDescribeLabel.textColor = .fus_textColorDeep()
qrcodeTipDescribeLabel.text = .fus_localString("摄像头扫描使者码QRCode绑定")
qrcodeTipDescribeLabel.textAlignment = .center
qrcodeTipDescribeLabel.isHidden = true
......@@ -154,8 +157,8 @@ import AVFoundation
}
let describeLabel = UILabel()
describeLabel.font = .fus_themeFont(16)
describeLabel.textColor = .white
describeLabel.font = .fus_themeMediumFont(16)
describeLabel.textColor = .fus_textColorDeep()
describeLabel.text = .fus_localString("扫描使者码QRCode图片完成绑定")
describeLabel.textAlignment = .center
scanView.addSubview(describeLabel)
......@@ -169,7 +172,7 @@ import AVFoundation
subdescribeLabel.font = .fus_themeFont(14)
subdescribeLabel.textColor = .init(white: 1, alpha: 0.4)
subdescribeLabel.textColor = .fus_textColorMedium()
subdescribeLabel.text = .fus_localString("请联系您的邀请人获取使者码")
subdescribeLabel.textAlignment = .center
scanView.addSubview(subdescribeLabel)
......@@ -215,7 +218,7 @@ import AVFoundation
let label = UILabel()
label.font = .fus_themeFont(16)
label.textColor = .init(white: 1, alpha: 0.5)
label.textColor = .fus_textColorRich()
label.text = .fus_localString("摄像头扫描")
label.textAlignment = .center
startCameraBtn.addSubview(label)
......@@ -254,10 +257,10 @@ import AVFoundation
let timeStr = String(format: "%02ld:%02ld:%02ld ", hour, min, sec)
let timeTotalStr = timeStr + .fus_localString("内可绑定")
let attr = NSMutableAttributedString(string: timeTotalStr, attributes: [.font: UIFont.fus_themeFont(14) ?? .systemFont(ofSize: 14), .foregroundColor: UIColor.init(white: 1, alpha: 0.4)])
let attr = NSMutableAttributedString(string: timeTotalStr, attributes: [.font: UIFont.fus_themeFont(14) ?? .systemFont(ofSize: 14), .foregroundColor: UIColor.darkGray])
if let range = timeTotalStr.range(of: timeStr) {
attr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.white, range: NSRange(range, in: timeTotalStr))
attr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.black, range: NSRange(range, in: timeTotalStr))
}
return attr
}.bind(to: subdescribeLabel.rx.attributedText).disposed(by: self.inviteCodeCountDownDisposeBag)
......@@ -273,7 +276,7 @@ import AVFoundation
let titleLabel = UILabel()
titleLabel.text = title
titleLabel.font = .fus_themeFont(14)
titleLabel.textColor = .white
titleLabel.textColor = .fus_textColorDeep()
titleLabel.textAlignment = .center
titleLabel.numberOfLines = 2
superView.addSubview(titleLabel)
......@@ -391,7 +394,7 @@ import AVFoundation
self.scanLayer?.removeFromSuperlayer()
self.scanLayer = CAShapeLayer()
self.scanLayer?.frame = self.view.bounds
self.scanLayer?.backgroundColor = UIColor.init(white: 0, alpha: 0.6).cgColor
self.scanLayer?.backgroundColor = UIColor.init(white: 1, alpha: 0.4).cgColor
// self.scanLayer?.backgroundColor = UIColor.init(hex: "#F5F4F4").cgColor
if let scanLayer = self.scanLayer {
......@@ -439,10 +442,7 @@ import AVFoundation
FUSLoadingView.fus_dismissProgressView()
FUSDialogView.fus_showDialog(msg)
if code == -30006{
//重复绑定
FUSRouter.userRouter().fus_updataBindAgentState(withIsBind: true, bindagenttime: "", getResultDate: "")
}
completed(false)
}
}
}
......
......@@ -215,7 +215,7 @@ class FUSCompleteUserInfoAvatarView: FUSBaseView {
}
self?.rightAvatarNickNamelabel.text = userInfo?.nickname
self?.rightAvatarAdressLabel.text = adressText
self?.rightAvatarAdressLabel.text = adressText?.fus_addressCheck()
if adressText != nil && adressText?.count ?? 0 > 0 {
self?.rightAvatarAdressIconImgView.isHidden = false
......
......@@ -364,7 +364,7 @@ class FFInviteFunctionStepOneContentAppStoreDownloadView: FUSBaseView{
searchLabel.attributedText = .sj.makeText({ make in
make.append(.fus_localString("搜寻") + ":").textColor(.fus_textColorMedium())
make.append("FIREFLY LIVE").textColor(.fus_diamondBlue())
make.append("FUSI CLUB").textColor(.fus_diamondBlue())
make.font(.fus_themeMediumFont(13))
})
self.addSubview(searchLabel)
......@@ -435,7 +435,7 @@ extension FUSInviteRewardInviteFunctionCell.FUSInviteRewardInviteFunctionType{
case .QRCode:
return .fus_localString("保存您的邀请QRCode图片,新玩家通过扫描QRCode可以下载")
case .appStore:
return .fus_localString("告诉朋友前往自己手机熟悉的应用商店,并搜寻“Firefly Live” 关键词")
return .fus_localString("告诉朋友前往自己手机熟悉的应用商店,并搜寻“Fusi Live” 关键词")
case .inviteCode:
return .fus_localString("部分地区新玩家注册的时候需要填写邀请码才可以完成注册流程")
default:
......
......@@ -59,7 +59,7 @@ class FUSInviteRewardInvitePlanCell: UITableViewCell {
titleLabel.attributedText = .sj.makeText({ make in
make.append(.fus_localString("邀请新玩家加入")).textColor(.fus_textColorRich())
make.append(" ")
make.append("FIREFLY").textColor(.fus_diamondBlue())
make.append("FUSI").textColor(.fus_diamondBlue())
make.font(.fus_themeMediumFont(18))
})
bgImageView.addSubview(titleLabel)
......
......@@ -175,7 +175,7 @@ extension FUSInviteRewardMyView: UITableViewDelegate, UITableViewDataSource{
else if type == .emissaryReward {
let webVC = FUSWKWebViewController()
webVC.needHideWebTitleBar = true
webVC.needHideWebTitleBar = false
webVC.hidesBottomBarWhenPushed = true
webVC.webUrlString = FUSCommonWebURLs.fus_inviteEmissaryRewardUrl()
UIViewController.fus_top()?.navigationController?.pushViewController(webVC, animated: true)
......@@ -183,7 +183,7 @@ extension FUSInviteRewardMyView: UITableViewDelegate, UITableViewDataSource{
else if type == .myGroupMember {
let webVC = FUSWKWebViewController()
webVC.needHideWebTitleBar = true
webVC.needHideWebTitleBar = false
webVC.hidesBottomBarWhenPushed = true
webVC.webUrlString = FUSCommonWebURLs.fus_inviteMyClansmanUrl()
UIViewController.fus_top()?.navigationController?.pushViewController(webVC, animated: true)
......
......@@ -45,7 +45,7 @@ class FUSInviteRewardInviteViewModel: NSObject {
guard let self = self else { return }
if let bindInfo = dataDict["bindInfo"] as? [AnyHashable: Any] {
let model = FUSInviteDataAwardGetListDataUserListModel.fus_model(withDict: bindInfo)
let model = FUSInviteDataAwardGetListDataUserListModel.fus_createSocketModel(bindInfo);
var socketAwardModelList = self.socketAwardUserModelListObserver.value
if socketAwardModelList.contains(where: { $0.uid == model.uid }) {
return
......
......@@ -170,30 +170,74 @@
//取出数据
_countryDic = [NSMutableDictionary dictionaryWithDictionary:[[FUSCountryHelper sharedInstance] fus_getAllCountries]];
// 过滤掉ban掉的国家
// 整理所有模型
NSArray *banCountryNamesArr = [[FUSCountryHelper sharedInstance] getBanCountryNamesArr];
[_countryDic.allKeys enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
NSMutableArray *wordCountriesArr = [[NSMutableArray alloc] init];
for (NSDictionary *countryDict in _countryDic[obj]) {
if (![banCountryNamesArr containsObject:countryDict[@"en_ctr"]]) {
[wordCountriesArr addObject:countryDict];
NSMutableDictionary *mutCountryDict = [[NSMutableDictionary alloc] initWithDictionary:countryDict];
// 过滤掉ban掉的国家
if ([banCountryNamesArr containsObject:mutCountryDict[@"en_ctr"]]) {
continue;
}
[wordCountriesArr addObject:mutCountryDict];
}
_countryDic[obj] = wordCountriesArr;
}];
// 过滤掉ban掉的国家
// NSArray *banCountryNamesArr = [[FUSCountryHelper sharedInstance] getBanCountryNamesArr];
// [_countryDic.allKeys enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
// NSMutableArray *wordCountriesArr = [[NSMutableArray alloc] init];
// for (NSDictionary *countryDict in _countryDic[obj]) {
// if (![banCountryNamesArr containsObject:countryDict[@"en_ctr"]]) {
// [wordCountriesArr addObject:countryDict];
// }
// }
// _countryDic[obj] = wordCountriesArr;
// }];
__block NSInteger selectedSection = 0;
__block NSInteger selectedRow = 0;
[_countryDic enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
// [_countryDic enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
//
// NSMutableArray *models = [NSMutableArray array];
// NSMutableArray *objs = [_countryDic objectForKey:[NSString stringWithFormat:@"%c", index+65]];
//
// //跳过没有国家的首字母
// while ([NSArray isNull:objs]) {
// index++;
// objs = [_countryDic objectForKey:[NSString stringWithFormat:@"%c", index+65]];
// }
//
// for (NSDictionary *dic in objs) {
// FUSContryModel *model = [FUSContryModel fus_modelWithDict:dic];
// [models addObject:model];
//
// if ([model.country_code isEqualToString:self.currentSelectedCode]) {
// selectedRow = models.count - 1;
// selectedSection = index;
// }
//
// [_dataArr addObject:model];
// }
//
// [_dataDic setObject:models forKey:[NSString stringWithFormat:@"%c", index+65]];
// [_headers addObject:[NSString stringWithFormat:@"%c", index+65]];
//
//// FUSLogInfo(@"%@",[NSString stringWithFormat:@"%c", index+65]);
// index++;
// }];
for (int index = 0; index < 26; index++) {
NSMutableArray *models = [NSMutableArray array];
NSMutableArray *objs = [_countryDic objectForKey:[NSString stringWithFormat:@"%c", index+65]];
//跳过没有国家的首字母
while ([NSArray isNull:objs]) {
index++;
objs = [_countryDic objectForKey:[NSString stringWithFormat:@"%c", index+65]];
if ([NSArray isNullWithArray:objs]) {
continue;
}
for (NSDictionary *dic in objs) {
......@@ -210,10 +254,7 @@
[_dataDic setObject:models forKey:[NSString stringWithFormat:@"%c", index+65]];
[_headers addObject:[NSString stringWithFormat:@"%c", index+65]];
// FUSLogInfo(@"%@",[NSString stringWithFormat:@"%c", index+65]);
index++;
}];
}
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (selectedSection >= self.headers.count) {
......@@ -329,7 +370,7 @@
}
if (cell) {
cell.addressLb.text = [(FUSContryModel *)countries[indexPath.row] loc_ctr];
cell.addressLb.text = [[(FUSContryModel *)countries[indexPath.row] loc_ctr] fus_addressCheck];
cell.numberLb.text = [NSString stringWithFormat:@"+%@", [(FUSContryModel *)countries[indexPath.row] country_code]];
FUSContryModel *model = countries[indexPath.row];
......
......@@ -603,7 +603,7 @@
_countryCode = countryCode;
self.countryDetailLabel.text = countryName;
self.countryDetailLabel.text = [countryName fus_addressCheck];
self.countryDetailLabel.textAlignment = NSTextAlignmentRight;
self.areaCodeTextField.text = countryCode;
......
......@@ -56,6 +56,7 @@
self.problemDescribtBGView.layer.cornerRadius = 5;
self.problemDescribtBGView.layer.masksToBounds = YES;
self.problemDescribtBGView.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
self.problemTitleLabel.text = [NSString fus_localString:@"问题描述"];
self.problemTipsLabel.text = [NSString stringWithFormat:@"(%@)",[NSString fus_localString:@"必填"]];
......@@ -65,14 +66,16 @@
textContainerInset.left = 11;
self.problemDescribeTextView.textContainerInset = textContainerInset;
self.problemDescribeTextView.textMaxLength = 1000;
self.problemDescribeTextView.attributedPlaceholder = [[NSAttributedString alloc] initWithString:[NSString fus_localString:@"请描述你的问题"] attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#999999"], NSFontAttributeName:[UIFont fus_themeFont:15]}];
self.problemDescribeTextView.attributedPlaceholder = [[NSAttributedString alloc] initWithString:[NSString fus_localString:@"请描述你的问题"] attributes:@{NSForegroundColorAttributeName:[UIColor fus_textColorLight2], NSFontAttributeName:[UIFont fus_themeFont:15]}];
self.problemDescribeTextView.yzdelegate = self;
self.problemDescribeTextView.layer.cornerRadius = 5;
self.problemDescribeTextView.layer.masksToBounds = YES;
self.problemDescribeTextView.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
self.emailInfomationLabel.text = [NSString fus_localString:@"您的邮箱"];
self.emailTipsLabel.text = [NSString stringWithFormat:@"(%@)",[NSString fus_localString:@"必填"]];
self.emailTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:[NSString fus_localString:@"请填写您的邮箱"] attributes:@{NSForegroundColorAttributeName:[UIColor colorWithHex:@"#999999"], NSFontAttributeName:[UIFont fus_themeFont:15]}];
self.emailTextField.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
self.emailTextField.layer.cornerRadius = 5;
self.emailTextField.layer.masksToBounds = YES;
......@@ -86,6 +89,7 @@
self.contactTextField.layer.masksToBounds = YES;
self.contactTextField.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 14, 1)];
self.contactTextField.leftViewMode = UITextFieldViewModeAlways;
self.contactTextField.backgroundColor = [UIColor fus_textInputBackgroundGrayColor];
self.uploadTipsLabel.text = [NSString fus_localString:@"请上传截图"];
......
......@@ -400,7 +400,7 @@
NSString *countryCode = [_countryInfoDict objectForKey:FUSCountryCodeKey];
self.countryLabel.text = countryName;
self.countryLabel.text = [countryName fus_addressCheck];
self.countryLabel.textAlignment = NSTextAlignmentRight;
[NSUserDefaults.standardUserDefaults setValue:self.countryInfoDict forKey:FUSUserUDKeys.fus_USER_COUNTRY_INFO];
[NSUserDefaults.standardUserDefaults synchronize];
......
......@@ -509,7 +509,7 @@
NSString *countryName = [_countryInfoDict objectForKey:FUSCountryLocaleNameKey];
NSString *countryCode = [_countryInfoDict objectForKey:FUSCountryCodeKey];
self.countryLabel.text = countryName;
self.countryLabel.text = [countryName fus_addressCheck];
self.countryLabel.textAlignment = NSTextAlignmentRight;
[NSUserDefaults.standardUserDefaults setValue:self.countryInfoDict forKey:FUSUserUDKeys.fus_USER_COUNTRY_INFO];
[NSUserDefaults.standardUserDefaults synchronize];
......
......@@ -1020,7 +1020,7 @@
NSString *countryCode = [_countryInfoDict objectForKey:FUSCountryCodeKey];
self.countryLabel.text = countryName;
self.countryLabel.text = [countryName fus_addressCheck];
self.countryLabel.textAlignment = NSTextAlignmentRight;
self.areaCodeTextField.text = countryCode;
......
......@@ -289,8 +289,8 @@
if (success) success(dataDict);
} failure:^(NSDictionary *dataDict, int code) {
if (code == -911 && getReferralCode) {
getReferralCode(^(NSString *code){
[FUSLoginHttpHelper fus_verifyCodeWithSMSCode:smsCode phone:phone password:pwd countryCode:countryCode inviteCode:inviteCode agentcode:agentcode bindType:bindType referralCode:referralCode success:success failure:failure getReferralCode:getReferralCode];
getReferralCode(^(NSString *rltCode){
[FUSLoginHttpHelper fus_verifyCodeWithSMSCode:smsCode phone:phone password:pwd countryCode:countryCode inviteCode:inviteCode agentcode:agentcode bindType:bindType referralCode:rltCode success:success failure:failure getReferralCode:getReferralCode];
});
}else {
if (failure) failure(FAILURE_MESSAGE, code);
......@@ -503,14 +503,14 @@
if (success) success(dataDict);
} failure:^(NSDictionary *dataDict, int code) {
} failure:^(NSDictionary *dataDict, int errorCode) {
if (code == -911 && getReferralCode) {
getReferralCode(^(NSString *code){
[FUSLoginHttpHelper fus_socialPlatformLoginWithPlatform:platform openid:openid authToken:authToken authSecret:authSecret facepath:facepath sex:sex nickname:nickname agentCode:agentCode bindType:bindType referralCode:referralCode success:success failure:failure getReferralCode:getReferralCode];
if (errorCode == -911 && getReferralCode) {
getReferralCode(^(NSString *rltCode){
[FUSLoginHttpHelper fus_socialPlatformLoginWithPlatform:platform openid:openid authToken:authToken authSecret:authSecret facepath:facepath sex:sex nickname:nickname agentCode:agentCode bindType:bindType referralCode:rltCode success:success failure:failure getReferralCode:getReferralCode];
});
}else {
if (failure) failure(FAILURE_MESSAGE, code);
if (failure) failure(FAILURE_MESSAGE, errorCode);
}
}];
......
......@@ -381,7 +381,7 @@
} else {
self.addressLabel.hidden = NO;
self.addressImageView.hidden = NO;
self.addressLabel.text = model.addr;
self.addressLabel.text = [model.addr fus_addressCheck];
}
// 内容文案
......
......@@ -120,7 +120,7 @@
if (![NSString isNull:model.addr]) {
self.addressLabel.hidden = NO;
self.addressImageView.hidden = NO;
self.addressLabel.text = model.addr;
self.addressLabel.text = [model.addr fus_addressCheck];
} else {
self.addressLabel.hidden = YES;
self.addressImageView.hidden = YES;
......
......@@ -838,7 +838,7 @@ import FUSCommon
}
if !NSString.isNull(self.userInfoModel?.addr) {
self.areaLabel.text = self.userInfoModel?.addr
self.areaLabel.text = self.userInfoModel?.addr.fus_addressCheck()
// self.areaLabel.textColor = UIColor.init(hex: "CCCCCC")
self.areaLabel.textColor = UIColor.fus_textColorMedium()
} else {
......
......@@ -80,7 +80,7 @@
if ([NSString isNull:zoneModel.addr]) {
_cityAndCountryLabel.text = @"-";
}else {
_cityAndCountryLabel.text = [NSString stringWithFormat:@"%@",zoneModel.addr];
_cityAndCountryLabel.text = [NSString stringWithFormat:@"%@",[zoneModel.addr fus_addressCheck]];
}
if (zoneModel.sign.length) {
......
......@@ -185,11 +185,17 @@
[[UIViewController fus_topViewController].navigationController pushViewController:taskCenterVC animated:YES];
}
- (void)fus_enterTaskVCWithRewardType:(NSInteger)rewardType{
FUSZoneTaskCenterViewController *taskCenterVC = [[FUSZoneTaskCenterViewController alloc] init];
taskCenterVC.startWithRewardType = (int)rewardType;
[[UIViewController fus_topViewController].navigationController pushViewController:taskCenterVC animated:YES];
}
- (void)fus_showBoundAgentInfoView {
FUSBoundAgentInfoView *agentView = [[FUSBoundAgentInfoView alloc] initWithFrame:CGRectMake(0, 0, UIView.fus_screenW, UIView.fus_screenH)];
agentView.leftTime = [self remindTime];
[agentView showWithView:[UIApplication sharedApplication].keyWindow];
[agentView showWithView:[UIWindow fus_keyWindow]];
}
- (void)fus_enterSettingVC:(BOOL)jumpToHiddingStatus {
......@@ -569,6 +575,11 @@
[[FUSAutoBindHelper shared] fus_loadAutoBindDatas:^{}];
});
// 给语言类传参进是否是cn模式
[FUSCountryHelper sharedInstance].isCNStatus = ^BOOL{
return [FUSLocalizationHelper fus_isCNStatus];
};
return 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