Commit 8bbb1db4 by ludi

修复一部分bug

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