Commit 6f7cc21a by ludi

添加验证码

parent 3d1f69f5
Showing with 511 additions and 53 deletions
......@@ -24,6 +24,8 @@
@property (nonatomic, copy) NSString *payURL;
@property (nonatomic, copy) NSString *openUrl;
/**
检测当前API的地址
......
......@@ -32,6 +32,7 @@
[[FUSAPIDNSManager shareInstance] setAccountsDNS:[[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_ACCOUNTS_URL] ? [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_ACCOUNTS_URL] : @"https://zhibo.yabolive.net"];
[[FUSAPIDNSManager shareInstance] setWebURL:[[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_WEB_URL] ? [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_WEB_URL] : @"https://www.fusiclub.com/web/"];
[[FUSAPIDNSManager shareInstance] setPayURL:[[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_PAY_URL] ? [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_PAY_URL] : @""];
[[FUSAPIDNSManager shareInstance] setOpenUrl:[[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_OPEN_URL] ? [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_OPEN_URL] : @"http://openapi.tealive66.com"];
[FUSAPIDNSManager shareInstance].bigCdn = [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_BIG_CDN] ? [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_BIG_CDN] : @"https://big.bgp.ourpow.com";
......@@ -74,6 +75,12 @@
[FUSAPIDNSManager shareInstance].accountsDNS = currentApiDict[@"lvdou"];
[FUSAPIDNSManager shareInstance].webURL = currentApiDict[@"web"];
[FUSAPIDNSManager shareInstance].payURL = currentApiDict[@"pay"];
if ([NSString isNull:currentApiDict[@"openUrl"]]) {
[FUSAPIDNSManager shareInstance].openUrl = @"http://openapi.tealive66.com";
}else{
[FUSAPIDNSManager shareInstance].openUrl = currentApiDict[@"openUrl"];
}
}
// 备用图片 CDN 地址,有值就用,没值不用
......@@ -104,6 +111,7 @@
@"cdn":@"https://zhibocdn.yabolive.net",
@"pay":@"https://zhibo.yabolive.net",
@"web":@"https://www.fusiclub.com/web/",
@"openUrl":@"http://openapi.tealive66.com",
@"lvdou":@""
};
......@@ -111,6 +119,7 @@
@"cdn":@"https://big.bgp.ourpow.com",
@"pay":@"https://zhibo.yazhaiyabo.com",
@"web":@"https://www.fusiclub.com/web/",
@"openUrl":@"http://openapi.tealive66.com",
@"lvdou":@""
};
......@@ -127,6 +136,7 @@
NSString *historyWebUrlString = [[NSUserDefaults standardUserDefaults] objectForKey:WEB_URL];
NSString *historyPayUrlString = [[NSUserDefaults standardUserDefaults] objectForKey:PAY_URL];
NSString *historybigcdnUrlString = [[NSUserDefaults standardUserDefaults] objectForKey:CUSTOM_BIG_CDN];
NSString *historyOpenUrlString = [[NSUserDefaults standardUserDefaults] objectForKey:OPEN_URL];
NSString *currentApiUrlString;
NSString *currentImageDownUrlString;
......@@ -134,6 +144,7 @@
NSString *currentWebUrlString;
NSString *currentPayUrlString;
NSString *currentBigcdnUrlString;
NSString *currentOpenUrlString;
if ([NSString isNull:historyApiUrlString] ||
[NSString isNull:historyImageDownUrlString] ||
......@@ -153,6 +164,7 @@
currentWebUrlString = currentApiDict[@"web"];
currentPayUrlString = currentApiDict[@"pay"];
currentBigcdnUrlString = currentApiDict[@"bigCdn"];
currentOpenUrlString = currentApiDict[@"openUrl"];
} else {
currentApiUrlString = historyApiUrlString;
currentImageDownUrlString = historyImageDownUrlString;
......@@ -160,6 +172,7 @@
currentWebUrlString = historyWebUrlString;
currentPayUrlString = historyPayUrlString;
currentBigcdnUrlString = historybigcdnUrlString;
currentOpenUrlString = historyOpenUrlString;
}
[[NSUserDefaults standardUserDefaults] setObject:currentApiUrlString forKey:API_ADDRESS];
......@@ -168,6 +181,7 @@
[[NSUserDefaults standardUserDefaults] setObject:currentWebUrlString forKey:WEB_URL];
[[NSUserDefaults standardUserDefaults] setObject:currentPayUrlString forKey:PAY_URL];
[[NSUserDefaults standardUserDefaults] setObject:currentBigcdnUrlString forKey:CUSTOM_BIG_CDN];
[[NSUserDefaults standardUserDefaults] setObject:currentOpenUrlString forKey:CUSTOM_OPEN_URL];
[[FUSAPIDNSManager shareInstance] setAPIDNS:currentApiUrlString];
[[FUSAPIDNSManager shareInstance] setImageDownUrl:currentImageDownUrlString];
......@@ -175,6 +189,7 @@
[[FUSAPIDNSManager shareInstance] setWebURL:currentWebUrlString];
[[FUSAPIDNSManager shareInstance] setPayURL:currentPayUrlString];
[[FUSAPIDNSManager shareInstance] setBigCdn:currentBigcdnUrlString];
[[FUSAPIDNSManager shareInstance] setOpenUrl:currentOpenUrlString];
[FUSCommonHttpRequest fus_updateServerAPIUrlWithSuccess:^(NSDictionary *dataDict, int code) {
NSArray *serversArray = dataDict[@"servers"];
......@@ -203,6 +218,7 @@
NSString *serverWebUrlString = serverApiDict[@"web"];
NSString *serverPayUrlString = serverApiDict[@"pay"];
NSString *serverBigcdnUrlString = serverApiDict[@"bigCdn"];
NSString *serverOpenUrlString = serverApiDict[@"openUrl"];
if (![NSString isNullWithString:serverApiUrlString]) {
[[FUSAPIDNSManager shareInstance] setAPIDNS:serverApiUrlString];
......@@ -212,6 +228,10 @@
[[FUSAPIDNSManager shareInstance] setBigCdn:serverBigcdnUrlString];
}
if (![NSString isNullWithString:serverOpenUrlString]) {
[[FUSAPIDNSManager shareInstance] setOpenUrl:serverBigcdnUrlString];
}
if (![NSString isNullWithString:serverImageDownUrlString]) {
[[FUSAPIDNSManager shareInstance] setImageDownUrl:[NSString stringWithFormat:@"%@/comm", serverImageDownUrlString]];
}
......@@ -251,18 +271,21 @@
NSString *currentAccountsUrlString = currentApiDict[@"pay"];
NSString *currentWebUrlString = currentApiDict[@"web"];
NSString *currentPayUrlString = currentApiDict[@"pay"];
NSString *currentOpenUrlString = currentApiDict[@"openUrl"];
[[NSUserDefaults standardUserDefaults] setObject:currentApiUrlString forKey:API_ADDRESS];
[[NSUserDefaults standardUserDefaults] setObject:currentImageDownUrlString forKey:IMAGE_DOWNLOAD_URL];
[[NSUserDefaults standardUserDefaults] setObject:currentAccountsUrlString forKey:ACCOUNTS_ADDRESS];
[[NSUserDefaults standardUserDefaults] setObject:currentWebUrlString forKey:WEB_URL];
[[NSUserDefaults standardUserDefaults] setObject:currentPayUrlString forKey:PAY_URL];
[[NSUserDefaults standardUserDefaults] setObject:currentOpenUrlString forKey:OPEN_URL];
[[FUSAPIDNSManager shareInstance] setAPIDNS:currentApiUrlString];
[[FUSAPIDNSManager shareInstance] setImageDownUrl:currentImageDownUrlString];
[[FUSAPIDNSManager shareInstance] setAccountsDNS:currentAccountsUrlString];
[[FUSAPIDNSManager shareInstance] setWebURL:currentWebUrlString];
[[FUSAPIDNSManager shareInstance] setPayURL:currentPayUrlString];
[[FUSAPIDNSManager shareInstance] setOpenUrl:currentOpenUrlString];
}
// 获取单例
......
......@@ -354,6 +354,10 @@
return [NSString stringWithFormat:@"%@%@",[[FUSAPIDNSManager shareInstance] webURL],url];
}
- (NSString *)openUrl:(NSString *)url{
return [NSString stringWithFormat:@"%@%@",[[FUSAPIDNSManager shareInstance] openUrl],url];
}
@end
......
......@@ -35,6 +35,7 @@ extern NSString * const CUSTOM_ACCOUNTS_URL;
extern NSString * const CUSTOM_PAY_URL;
extern NSString * const CUSTOM_BIG_CDN;
extern NSString * const CUSTOM_WEB_URL;
extern NSString * const CUSTOM_OPEN_URL;
extern NSString * const SOCKET_IP;
extern NSString * const SOCKET_PORT;
......@@ -47,6 +48,7 @@ extern NSString * const IMAGE_DOWNLOAD_URL;
extern NSString * const ACCOUNTS_ADDRESS;
extern NSString * const WEB_URL;
extern NSString * const PAY_URL;
extern NSString * const OPEN_URL;
// IAP支付订单相关
extern NSString * const IAP_ORDER_DICT;
......
......@@ -35,6 +35,7 @@ NSString * const CUSTOM_ACCOUNTS_URL = @"CustomAccountsUrl";
NSString * const CUSTOM_PAY_URL = @"CustomPayUrl";
NSString * const CUSTOM_BIG_CDN = @"CustomBigCdn";
NSString * const CUSTOM_WEB_URL = @"CustomWebUrl";
NSString * const CUSTOM_OPEN_URL = @"CustomOpenUrl";
NSString * const SOCKET_IP = @"SocketIp";
NSString * const SOCKET_PORT = @"SocketPort";
......@@ -47,6 +48,7 @@ NSString * const IMAGE_DOWNLOAD_URL = @"ImageDownloadURL";
NSString * const ACCOUNTS_ADDRESS = @"AccountsAddress";
NSString * const WEB_URL = @"WebUrl";
NSString * const PAY_URL = @"PayURL";
NSString * const OPEN_URL = @"OpenURL";
// IAP支付订单相关
NSString * const IAP_ORDER_DICT = @"IAPOrderDictionary";
......
......@@ -239,6 +239,15 @@ NS_ASSUME_NONNULL_BEGIN
//手机注册-手机号输入框
+ (NSString *)fus_EVENT_REGIST_PHONEINPUT;
/// 手机注册-图形验证码
+ (NSString *)fus_EVENT_REGIST_NEED_HUMAN_VERIFY;
/// 手机注册-关闭图形验证码
+ (NSString *)fus_EVENT_REGIST_CLOSE_HUMAN_VERIFY;
/// 手机注册-图形验证码结果
+ (NSString *)fus_EVENT_REGIST_SEND_HUMAN_VERIFY_RESULT;
//手机注册-发送验证码
+ (NSString *)fus_EVENT_REGIST_VERIFICATIONCODE;
......
......@@ -381,6 +381,19 @@
return @"phoneregister_selectcontry";
}
/// 手机注册-图形验证码
+ (NSString *)fus_EVENT_REGIST_NEED_HUMAN_VERIFY{
return @"phoneregister_needHumanVerify";
}
/// 手机注册-关闭图形验证码
+ (NSString *)fus_EVENT_REGIST_CLOSE_HUMAN_VERIFY{
return @"phoneregister_closeHumanVerify";
}
/// 手机注册-图形验证码结果
+ (NSString *)fus_EVENT_REGIST_SEND_HUMAN_VERIFY_RESULT{
return @"phoneregister_sendHumanVerifyResult";
}
//手机注册-手机号输入框
+ (NSString *)fus_EVENT_REGIST_PHONEINPUT {
return @"phoneregister_phonenum";
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fus_common_close_black_icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fus_common_close_black_icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -51,6 +51,17 @@ public func isEmptyDict(_ dict: [AnyHashable: Any]?) -> Bool {
swiftString.removeLast()
return swiftString as NSString
}
@objc static func base64urlToBase64(base64url: NSString) -> NSString {
let swiftString = base64url as String
var base64 = swiftString
.replacingOccurrences(of: "-", with: "+")
.replacingOccurrences(of: "_", with: "/")
if base64.count % 4 != 0 {
base64.append(String(repeating: "=", count: 4 - base64.count % 4))
}
return base64 as NSString
}
}
public extension String {
......
......@@ -40,6 +40,9 @@ NS_ASSUME_NONNULL_BEGIN
// 网址
@property (nonatomic, copy) NSString *webUrlString;
/// 注入script
@property (nonatomic, copy) NSArray<NSString *> *scriptMessageNames;
// 是否需要清除緩存
@property (nonatomic, assign) BOOL clearCache;
......
......@@ -115,9 +115,10 @@
[self.wkWebView addObserver:self forKeyPath:@"title" options:NSKeyValueObservingOptionNew context:NULL];
// //注册js事件
[_userContentController removeAllUserScripts];
[_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSFacebookReplaceJSKey];
[_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSAppCollaborationJSKey];
// [_userContentController removeAllUserScripts];
// [_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSFacebookReplaceJSKey];
// [_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSAppCollaborationJSKey];
[self updateScriptMessageHandlers];
if (!_webEventHelper) {
_webEventHelper = [FUSConfig.sharedInstanced.webConfig getNewWebViewEventHelper];
......@@ -125,6 +126,20 @@
}
}
-(void)updateScriptMessageHandlers{
[_userContentController removeAllUserScripts];
[_userContentController removeScriptMessageHandlerForName:FUSFacebookReplaceJSKey];
[_userContentController removeScriptMessageHandlerForName:FUSAppCollaborationJSKey];
[_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSFacebookReplaceJSKey];
[_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSAppCollaborationJSKey];
if (self.scriptMessageNames.count > 0) {
for (NSString *name in self.scriptMessageNames) {
[_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:name];
}
}
}
- (void)layoutSubviews {
[super layoutSubviews];
if (self.wkWebView.superview == self) {
......@@ -484,6 +499,11 @@
}
}
- (NSArray<NSString *> *)scriptMessageNames{
_scriptMessageNames = _scriptMessageNames;
[self updateScriptMessageHandlers];
}
#pragma mark - other
-(void)dealloc{
......
......@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
@end
@interface UIImage (FUSFoundationBundle)
/// 黑色关闭按钮
+ (UIImage *)fus_closeBlackIcon;
+ (UIImage *)fus_backImage;
......
......@@ -67,6 +67,10 @@
return [self fus_ImageNamed:@"fus_common_navigation_back_black"];
}
+ (UIImage *)fus_closeBlackIcon{
return [self fus_ImageNamed:@"fus_common_close_black_icon"];
}
+ (UIImage *)fus_backWhiteImage{
return [self fus_ImageNamed:@"common_navigation_back_white"];
}
......
......@@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSString *)apiUrl:(NSString *)url;
- (NSString *)webUrl:(NSString *)url;
- (NSString *)openUrl:(NSString *)url;
@end
......
......@@ -57,6 +57,10 @@
return @"";
}
- (NSString *)openUrl:(NSString *)url{
return @"";
}
- (NSString *)onlineStreamVideoCachePath {
return [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"com.video.cache"];
}
......
......@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>72</integer>
<integer>75</integer>
</dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>76</integer>
<integer>72</integer>
</dict>
</dict>
</dict>
......
......@@ -12,7 +12,7 @@
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>75</integer>
<integer>76</integer>
</dict>
</dict>
</dict>
......
......@@ -12,6 +12,10 @@
0025151F2D1AC05000A97B21 /* backpack_icon_anim.webp in Resources */ = {isa = PBXBuildFile; fileRef = 0025151E2D1AC05000A97B21 /* backpack_icon_anim.webp */; };
00495FD52CF0931900B6F8D3 /* FUSCompleteUserInfoViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00495FD42CF0931900B6F8D3 /* FUSCompleteUserInfoViewController.swift */; };
00495FD82CF093E700B6F8D3 /* FUSCompleteUserInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00495FD72CF093E700B6F8D3 /* FUSCompleteUserInfoViewModel.swift */; };
0089FBB32D34F98B00485E49 /* FUSCaptchaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0089FBB02D34F98B00485E49 /* FUSCaptchaView.swift */; };
0089FBB52D34FA1E00485E49 /* FUSCaptchaViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0089FBB42D34FA1E00485E49 /* FUSCaptchaViewModel.swift */; };
0089FBB82D34FA4200485E49 /* FUSCaptchaModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 0089FBB62D34FA4200485E49 /* FUSCaptchaModel.h */; };
0089FBB92D34FA4200485E49 /* FUSCaptchaModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 0089FBB72D34FA4200485E49 /* FUSCaptchaModel.m */; };
008AC5112D127EBA00FECA7B /* FUSBackpackPropsUseAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008AC5102D127EBA00FECA7B /* FUSBackpackPropsUseAlert.swift */; };
008AC5132D12BC0300FECA7B /* FUSBackpackPropsActivatedAlert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008AC5122D12BC0300FECA7B /* FUSBackpackPropsActivatedAlert.swift */; };
008AC5152D12C04000FECA7B /* FUSUserCenterUDKeyStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 008AC5142D12C04000FECA7B /* FUSUserCenterUDKeyStore.swift */; };
......@@ -893,6 +897,10 @@
0025151E2D1AC05000A97B21 /* backpack_icon_anim.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = backpack_icon_anim.webp; sourceTree = "<group>"; };
00495FD42CF0931900B6F8D3 /* FUSCompleteUserInfoViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSCompleteUserInfoViewController.swift; sourceTree = "<group>"; };
00495FD72CF093E700B6F8D3 /* FUSCompleteUserInfoViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSCompleteUserInfoViewModel.swift; sourceTree = "<group>"; };
0089FBB02D34F98B00485E49 /* FUSCaptchaView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSCaptchaView.swift; sourceTree = "<group>"; };
0089FBB42D34FA1E00485E49 /* FUSCaptchaViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSCaptchaViewModel.swift; sourceTree = "<group>"; };
0089FBB62D34FA4200485E49 /* FUSCaptchaModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FUSCaptchaModel.h; sourceTree = "<group>"; };
0089FBB72D34FA4200485E49 /* FUSCaptchaModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FUSCaptchaModel.m; sourceTree = "<group>"; };
008AC5102D127EBA00FECA7B /* FUSBackpackPropsUseAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSBackpackPropsUseAlert.swift; sourceTree = "<group>"; };
008AC5122D12BC0300FECA7B /* FUSBackpackPropsActivatedAlert.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSBackpackPropsActivatedAlert.swift; sourceTree = "<group>"; };
008AC5142D12C04000FECA7B /* FUSUserCenterUDKeyStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FUSUserCenterUDKeyStore.swift; sourceTree = "<group>"; };
......@@ -1842,6 +1850,17 @@
path = View;
sourceTree = "<group>";
};
0089FBB12D34F98B00485E49 /* Captcha */ = {
isa = PBXGroup;
children = (
0089FBB02D34F98B00485E49 /* FUSCaptchaView.swift */,
0089FBB42D34FA1E00485E49 /* FUSCaptchaViewModel.swift */,
0089FBB62D34FA4200485E49 /* FUSCaptchaModel.h */,
0089FBB72D34FA4200485E49 /* FUSCaptchaModel.m */,
);
path = Captcha;
sourceTree = "<group>";
};
008AC5162D12CA0000FECA7B /* Backpack */ = {
isa = PBXGroup;
children = (
......@@ -2482,6 +2501,7 @@
BE78C90A2C538D7D00F38855 /* Login */ = {
isa = PBXGroup;
children = (
0089FBB12D34F98B00485E49 /* Captcha */,
BE78C8E92C538D7D00F38855 /* Controller */,
BE78C8EE2C538D7D00F38855 /* Model */,
BE78C8FB2C538D7D00F38855 /* Other */,
......@@ -3641,6 +3661,7 @@
BE78CBB62C538D7E00F38855 /* FUSPhotoBrowserView.h in Headers */,
BE78CBD82C538D7F00F38855 /* FUSTaskCenterProcessTableViewCell.h in Headers */,
BE78CCAF2C538D8000F38855 /* HWBaseViewController.h in Headers */,
0089FBB82D34FA4200485E49 /* FUSCaptchaModel.h in Headers */,
BED6553B2C5B36A200668116 /* FUSPhotoCollectionViewCell.h in Headers */,
BE78CCA02C538D8000F38855 /* FUSNewsFeedReplyListHeaderView.h in Headers */,
BE78CCDA2C538D8000F38855 /* TZProgressView.h in Headers */,
......@@ -4447,9 +4468,11 @@
BE78CC512C538D7F00F38855 /* FUSNewsFeedMessageDBHelper.m in Sources */,
00B778652D12DB89003D7F56 /* FUSBackpackMotorView.swift in Sources */,
BE78CB6C2C538D7E00F38855 /* FUSMyZoneCellManager.m in Sources */,
0089FBB52D34FA1E00485E49 /* FUSCaptchaViewModel.swift in Sources */,
BE78CC9E2C538D8000F38855 /* FUSNewsFeedReplyInputView.m in Sources */,
BE78CCB72C538D8000F38855 /* FUSSearchViewController.swift in Sources */,
BE78CC392C538D7F00F38855 /* FUSNewsFeedDetailViewController.m in Sources */,
0089FBB92D34FA4200485E49 /* FUSCaptchaModel.m in Sources */,
BE189A3C2C7323FE0008418B /* FSRMotorModel.m in Sources */,
BE78CB6A2C538D7E00F38855 /* FUSZoneTaskInfoMModel.m in Sources */,
BE78CC282C538D7F00F38855 /* FUSChatSettingHeaderView.m in Sources */,
......@@ -4463,6 +4486,7 @@
BE78CC812C538D7F00F38855 /* FUSNewsFeedDetailVideoHeaderView.m in Sources */,
BED65B1F2C5B795900668116 /* FUSLiveChatInputTaskListView.swift in Sources */,
BE78CB8B2C538D7E00F38855 /* FUSMyZoneFocusAndFansCell.m in Sources */,
0089FBB32D34F98B00485E49 /* FUSCaptchaView.swift in Sources */,
BE78CB4C2C538D7E00F38855 /* FUSZoneTaskCenterViewController.m in Sources */,
BE78CC452C538D7F00F38855 /* FUSNewsFeedListModel.m in Sources */,
BE78CBEB2C538D7F00F38855 /* FUSReportOptionTableViewCell.m in Sources */,
......
......@@ -7,12 +7,12 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>74</integer>
<integer>78</integer>
</dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>78</integer>
<integer>77</integer>
</dict>
</dict>
</dict>
......
......@@ -16,3 +16,5 @@ FOUNDATION_EXPORT const unsigned char FUSUserCenterModuleVersionString[];
// In this header, you should import all the public headers of your framework using statements like #import <FUSUserCenterModule/PublicHeader.h>
#import "FUSUserCenterOCHeader.h"
#import "FUSCaptchaModel.h"
#import "FUSLoginHelper.h"
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_captcha_close_img@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_captcha_close_img@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "login_captcha_slider_thumb_img@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "login_captcha_slider_thumb_img@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
//
// FUSCaptchaModel.h
// FUSUserCenterModule
//
// Created by aaa on 2025/1/13.
//
#import <FUSFoundation/FUSFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface FUSCaptchaModel : FUSBaseModel
/// 验证码id
@property (nonatomic, copy) NSString *captchaId;
/// 背景图
@property (nonatomic, copy) NSString *background;
/// 覆盖图
@property (nonatomic, copy) NSString *cover;
/// y轴
@property (nonatomic, assign) CGFloat y;
/// 放大系数
@property (nonatomic, assign) CGFloat m;
@property (nonatomic, strong) UIImage *backgroundImage;
@property (nonatomic, strong) UIImage *coverImage;
@end
NS_ASSUME_NONNULL_END
//
// FUSCaptchaModel.m
// FUSUserCenterModule
//
// Created by aaa on 2025/1/13.
//
#import "FUSCaptchaModel.h"
#import <FUSFoundation/FUSFoundation-Swift.h>
@implementation FUSCaptchaModel
- (void)setBackground:(NSString *)background{
_background = background;
if (background.length > 1) {
NSString *base64Str = [NSString base64urlToBase64WithBase64url:background];
NSData *data = [NSData dataWithBase64EncodedString:base64Str];
_backgroundImage = [UIImage imageWithData:data];
}
}
- (void)setCover:(NSString *)cover{
_cover = cover;
if (cover.length > 1) {
NSString *base64Str = [NSString base64urlToBase64WithBase64url:cover];
NSData *data = [NSData dataWithBase64EncodedString:base64Str];
_coverImage = [UIImage imageWithData:data];
}
}
//返回一个 Dict,将 Model 属性名对映射到 JSON 的 Key。
+ (NSDictionary *)modelCustomPropertyMapper {
// return @{@"nickName" : @"nickname"};
return @{@"captchaId": @"id"};
}
@end
//
// FUSCaptchaViewModel.swift
// FUSUserCenterModule
//
// Created by aaa on 2025/1/13.
//
import UIKit
import RxSwift
import RxCocoa
class FUSCaptchaViewModel: NSObject {
let captchaModel = BehaviorRelay<FUSCaptchaModel?>(value: nil)
let progress = BehaviorRelay<Double>(value: 0)
}
......@@ -21,6 +21,7 @@
#import "FUSDataStatisticsManager.h"
#import <SJAttributesFactory/SJAttributesFactory.h>
#import <FUSUserCenterModule/FUSUserCenterModule-Swift.h>
@interface FUSLoginPhoneViewController () <UITextFieldDelegate, FUSTextFieldDelegate>
......@@ -173,6 +174,51 @@
self.countryOrAreaLabel.text = [NSString fus_localString:@"国家/地区"];
}
/// 请求登陆接口
- (void)fus_requstLoginWithCaptchaId:(NSString *)captchaId cancel:(NSInteger)cancel sender:(UIButton *)sender{
NSString *phone = [_phoneTextField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
NSString *countryCode = [self.countryInfoDict objectForKey:FUSCountryCodeKey];
MJWeakSelf
[FUSLoginHttpHelper fus_accountMobileLoginWithPhone:phone countryCode:countryCode captchaId:captchaId cancel:cancel success:^(NSDictionary *dataDict, int code) {
[FUSLoadingView fus_dismissProgressView];
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"获取验证码成功"]];
// 转跳注册界面
FUSMessageRegisterViewController *registViewCtrl = [[FUSMessageRegisterViewController alloc] init];
registViewCtrl.phone = phone;
registViewCtrl.countryCode = countryCode;
registViewCtrl.countryInfoDict = self.countryInfoDict;
registViewCtrl.hasSendVerifyCode = YES;
sender.userInteractionEnabled = YES;
[weakSelf.navigationController pushViewController:registViewCtrl animated:YES];
sender.userInteractionEnabled = YES;
} failure:^(NSString *msg, int code, NSDictionary *dataDict) {
sender.userInteractionEnabled = YES;
[FUSLoadingView fus_dismissProgressView];
if (code == -24) {
FUSLoginViewController *loginVC = [[FUSLoginViewController alloc] init];
loginVC.phone = phone;
loginVC.countryInfoDict = self.countryInfoDict;
[self.navigationController pushViewController:loginVC animated:YES];
}
else if (code == -95){
[FUSCaptchaView fus_showCaptchaViewWithCountrycode:countryCode phone:phone checkType:1 dict:dataDict succeed:^(NSString * _Nonnull captchaId) {
[self fus_requstLoginWithCaptchaId:captchaId cancel:0 sender:sender];
}];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
sender.userInteractionEnabled = YES;
});
}
else {
[FUSDialogView fus_showDialog:msg];
[FUSDataStatisticsManager fus_registWithSMSVerifyCodeWithServerCode:@(code).description log:msg];
}
}];
}
/**
点击国家按钮响应事件
*/
......@@ -210,32 +256,33 @@
sender.userInteractionEnabled = NO;
[FUSLoadingView fus_showProgressViewWithMessage:nil];
__weak typeof(self) weakSelf = self;
[FUSLoginHttpHelper fus_accountMobileLoginWithPhone:phone countryCode:countryCode success:^(NSDictionary *dataDict, int code) {
[FUSLoadingView fus_dismissProgressView];
// 转跳注册界面
FUSMessageRegisterViewController *registViewCtrl = [[FUSMessageRegisterViewController alloc] init];
registViewCtrl.phone = phone;
registViewCtrl.countryCode = countryCode;
registViewCtrl.countryInfoDict = self.countryInfoDict;
registViewCtrl.hasSendVerifyCode = YES;
sender.userInteractionEnabled = YES;
[weakSelf.navigationController pushViewController:registViewCtrl animated:YES];
} failure:^(NSString *msg, int code) {
sender.userInteractionEnabled = YES;
[FUSLoadingView fus_dismissProgressView];
if (code == -24) {
FUSLoginViewController *loginVC = [[FUSLoginViewController alloc] init];
loginVC.phone = phone;
loginVC.countryInfoDict = self.countryInfoDict;
[self.navigationController pushViewController:loginVC animated:YES];
} else {
[FUSDialogView fus_showDialog:msg];
[FUSDataStatisticsManager fus_registWithSMSVerifyCodeWithServerCode:@(code).description log:msg];
}
}];
[self fus_requstLoginWithCaptchaId:nil cancel:0 sender:sender];
// __weak typeof(self) weakSelf = self;
// [FUSLoginHttpHelper fus_accountMobileLoginWithPhone:phone countryCode:countryCode success:^(NSDictionary *dataDict, int code) {
// [FUSLoadingView fus_dismissProgressView];
// // 转跳注册界面
// FUSMessageRegisterViewController *registViewCtrl = [[FUSMessageRegisterViewController alloc] init];
// registViewCtrl.phone = phone;
// registViewCtrl.countryCode = countryCode;
// registViewCtrl.countryInfoDict = self.countryInfoDict;
// registViewCtrl.hasSendVerifyCode = YES;
// sender.userInteractionEnabled = YES;
// [weakSelf.navigationController pushViewController:registViewCtrl animated:YES];
//
// } failure:^(NSString *msg, int code) {
//
// sender.userInteractionEnabled = YES;
// [FUSLoadingView fus_dismissProgressView];
// if (code == -24) {
// FUSLoginViewController *loginVC = [[FUSLoginViewController alloc] init];
// loginVC.phone = phone;
// loginVC.countryInfoDict = self.countryInfoDict;
// [self.navigationController pushViewController:loginVC animated:YES];
// } else {
// [FUSDialogView fus_showDialog:msg];
// [FUSDataStatisticsManager fus_registWithSMSVerifyCodeWithServerCode:@(code).description log:msg];
// }
// }];
}
#pragma mark - TextField
......
......@@ -30,6 +30,7 @@
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import <SJAttributesFactory/SJAttributesFactory.h>
#import "FUSCommon/FUSCommon-Swift.h"
#import <FUSUserCenterModule/FUSUserCenterModule-Swift.h>
@interface FUSMessageRegisterViewController () <UITextFieldDelegate, UITextFieldDelegate, FUSTextFieldDelegate>
......@@ -463,17 +464,26 @@
self.countryCode = countryCode;
// 请求验证码
[FUSLoginHttpHelper fus_getVerifyPasswordWithPhone:phone countrycode:countryCode success:^{
[self fus_requestVerifyCode:@"" countryCode:countryCode];
}
- (void)fus_requestVerifyCode:(NSString *)captchaId countryCode:(NSString *)countryCode{
[self setupGetVerifyCodeBtnEnable:NO];
MJWeakSelf
[FUSLoginHttpHelper fus_getVerifyPasswordWithPhone:self.phone countrycode:countryCode captchaId:captchaId success:^{
[self fus_getVerifyCodeSucceed];
} failure:^(NSString *msg, int code) {
[self.verifyCodeTimer invalidate];
self.verifyCodeTimer = nil;
[self setupGetVerifyCodeBtnEnable:YES];
[FUSDialogView fus_showDialog:[NSString fus_versionLocalString:@"获取验证码成功"]];
[weakSelf fus_getVerifyCodeSucceed];
} failure:^(NSString *msg, int code, NSDictionary *dataDict) {
[weakSelf.verifyCodeTimer invalidate];
weakSelf.verifyCodeTimer = nil;
[weakSelf setupGetVerifyCodeBtnEnable:YES];
if (code == -24) {
[self.view endEditing:YES];
[weakSelf.view endEditing:YES];
[FUSTalkingData fus_trackEvent:FUSUserEventTrackParams.fus_EVENT_REGIST_HAVEREGIST];
[FUSAlertView showAlertWithTitle:[NSString fus_localString:@"注册"] message:msg cancelButtonTitle:nil otherButtonTitles:@[[NSString fus_localString:@"去登录"]] clickBlock:^(NSInteger buttonIndex) {
......@@ -488,13 +498,17 @@
[self.navigationController pushViewController:loginViewCtrl animated:YES];
}];
} else {
}
else if (code == -95){
[FUSCaptchaView fus_showCaptchaViewWithCountrycode:countryCode phone:weakSelf.phone checkType:1 dict:dataDict succeed:^(NSString * _Nonnull captchaId1) {
[self fus_requestVerifyCode:captchaId1 countryCode:countryCode];
}];
}
else {
[FUSDialogView fus_showDialog:msg];
}
}];
}
- (void)fus_getVerifyCodeSucceed {
......
......@@ -7,6 +7,7 @@
//
#import <Foundation/Foundation.h>
#import "FUSCaptchaModel.h"
/**
登录结果回调,包括成功失败回调
......@@ -44,6 +45,26 @@ typedef void(^loginCompletion)(int code, NSString *msg);
success:(void(^)(int code))success
failure:(void(^)(NSString *msg, int code))failure;
/// 获取人机图形验证码
/// @param countrycode 国家code
/// @param phone 手机号码
/// @param success 1
/// @param failure 0
-(void)fus_getCaptchaCodeWith:(NSString *)countrycode
phone:(NSString *)phone
success:(void(^)(FUSCaptchaModel *model))success
failure:(void(^)(NSString *msg, int code))failure;
/// 验证人机图形验证码
/// @param data 数据
/// @param checktype 验证类型
/// @param success 1
/// @param failure 0
-(void)fus_checkCaptchaCodeWithData:(NSString *)data
checktype:(NSInteger)checktype
success:(void(^)(void))success
failure:(void(^)(NSString *msg,int code))failure;
// 检测上次直播状态
- (void)fus_checkLiveState;
......
......@@ -195,6 +195,13 @@
}];
}
- (void)fus_getCaptchaCodeWith:(NSString *)countrycode phone:(NSString *)phone success:(void (^)(FUSCaptchaModel *))success failure:(void (^)(NSString *, int))failure{
[FUSLoginHttpHelper fus_getCaptchaCodeWith:countrycode phone:phone success:success failure:false];
}
- (void)fus_checkCaptchaCodeWithData:(NSString *)data checktype:(NSInteger)checktype success:(void (^)(void))success failure:(void (^)(NSString *, int))failure{
[FUSLoginHttpHelper fus_checkCaptchaCodeWithData:data checktype:checktype success:success failure:failure];
}
/**
登出,注销
*/
......
......@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import "FUSUpdateModel.h"
#import "FUSCaptchaModel.h"
typedef NS_ENUM(NSInteger, Platform) {
PlatformQQ = 1,
......@@ -53,13 +54,15 @@ typedef NS_ENUM(NSInteger, Platform) {
@param phone 手机号
@param countrycode 区域号
@param captchaId 验证码
@param success 成功回调
@param failure 失败回调
*/
+(void)fus_getVerifyPasswordWithPhone:(NSString *)phone
countrycode:(NSString *)countrycode
captchaId:(NSString *)captchaId
success:(void (^)(void))success
failure:(void (^)(NSString *msg, int code))failure;
failure:(void (^)(NSString *msg, int code, NSDictionary *dataDict))failure;
/**
短信验证码+密码 注册
......@@ -350,6 +353,40 @@ typedef NS_ENUM(NSInteger, Platform) {
success:(void (^)(NSDictionary *dataDict, int code))success
failure:(void (^)(NSString *msg, int code))failure;
/// 手机号码登录
/// @param phone 手机号码
/// @param countryCode 区号
/// @param captchaId 人机图形验证码ID
/// @param cancel 取消销号申请(1:是、0:否)
/// @param success 成功回调
/// @param failure 失败回调
+ (void)fus_accountMobileLoginWithPhone:(NSString *)phone
countryCode:(NSString *)countryCode
captchaId:(NSString *)captchaId
cancel:(NSInteger)cancel
success:(void (^)(NSDictionary *dataDict, int code))success
failure:(void (^)(NSString *msg, int code, NSDictionary *dataDict))failure;
/// 获取人机图形验证码
/// @param countrycode 国家code
/// @param phone 手机号码
/// @param success 1
/// @param failure 0
+(void)fus_getCaptchaCodeWith:(NSString *)countrycode
phone:(NSString *)phone
success:(void(^)(FUSCaptchaModel *model))success
failure:(void(^)(NSString *msg, int code))failure;
/// 验证人机图形验证码
/// @param data 数据
/// @param checktype 验证类型
/// @param success 1
/// @param failure 0
+(void)fus_checkCaptchaCodeWithData:(NSString *)data
checktype:(NSInteger)checktype
success:(void(^)(void))success
failure:(void(^)(NSString *msg,int code))failure;
/// 打开app只调用一次,进入后台再进入前台不需要调用
+ (void)fus_requestSettingInitData;
......
......@@ -137,7 +137,20 @@
}];
}
+ (void)fus_accountMobileLoginWithPhone:(NSString *)phone countryCode:(NSString *)countryCode captchaId:(NSString *)captchaId cancel:(NSInteger)cancel success:(void (^)(NSDictionary *, int))success failure:(void (^)(NSString *, int, NSDictionary *))failure{
NSMutableDictionary *parm = [[NSMutableDictionary alloc] init];
parm[@"phone"] = phone;
parm[@"countrycode"] = countryCode;
parm[@"cancel"] = @(cancel);
if (![NSString isNull:captchaId]) {
parm[@"validationId"] = captchaId;
}
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_ACCOUNT_mobilePhoneLogin params:parm success:^(NSDictionary * _Nullable dataDict, int code) {
success(dataDict, code);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if(failure) failure(FAILURE_MESSAGE, code, dataDict);
}];
}
/**
获取 Socket 消息服务器信息
......@@ -195,18 +208,19 @@
*/
+(void)fus_getVerifyPasswordWithPhone:(NSString *)phone
countrycode:(NSString *)countrycode
captchaId:(NSString *)captchaId
success:(void (^)(void))success
failure:(void (^)(NSString *msg, int code))failure
failure:(void (^)(NSString *, int, NSDictionary *))failure
{
if ([NSString isNull:phone]) {
FUSLogInfo(@"--->获取密码失败,手机号为空");
if (failure) failure(@"参数为空", ERROR_CODE);
if (failure) failure(@"参数为空", ERROR_CODE, nil);
return;
}
if ([NSString isNull:countrycode]) {
FUSLogInfo(@"--->获取密码失败,区号为空");
if (failure) failure(@"参数错误", ERROR_CODE);
if (failure) failure(@"参数错误", ERROR_CODE, nil);
return;
}
......@@ -218,7 +232,7 @@
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_FUS_URL_GET_VERIFY_CODE params:params success:^(NSDictionary *dataDict, int code) {
if (success) success();
} failure:^(NSDictionary *dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
if (failure) failure(FAILURE_MESSAGE, code, dataDict);
}];
}
......@@ -820,6 +834,25 @@
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
+ (void)fus_getCaptchaCodeWith:(NSString *)countrycode phone:(NSString *)phone success:(void (^)(FUSCaptchaModel *))success failure:(void (^)(NSString *, int))failure{
NSDictionary *parm = @{@"phone": phone,
@"countrycode": countrycode};
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_getCaptchaCode params:parm success:^(NSDictionary * _Nullable dataDict, int code) {
success([FUSCaptchaModel fus_modelWithDict:dataDict]);
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
+ (void)fus_checkCaptchaCodeWithData:(NSString *)data checktype:(NSInteger)checktype success:(void (^)(void))success failure:(void (^)(NSString *, int))failure{
NSDictionary *parm = @{@"data": data,
@"checktype":@(checktype)};
[FUSHttpHelper postRequestBinaryWithUrl:FUSUserCenterURLs.fus_URL_checkCaptchaCode params:parm success:^(NSDictionary * _Nullable dataDict, int code) {
success();
} failure:^(NSDictionary * _Nullable dataDict, int code) {
if (failure) failure(FAILURE_MESSAGE, code);
}];
}
/**
同步用户相关数据
......
......@@ -52,6 +52,9 @@ NS_ASSUME_NONNULL_BEGIN
// 手机登录/注册
+ (NSString *)fus_URL_ACCOUNT_MOBILE_LOGIN;
/// 手机登录 新版本
+ (NSString *)fus_URL_ACCOUNT_mobilePhoneLogin;
// 退出登录
+ (NSString *)fus_URL_LOGIN_OUT_YAZHAI;
......@@ -64,6 +67,12 @@ NS_ASSUME_NONNULL_BEGIN
// 第三方注册
+ (NSString *)fus_URL_THIRD_REGIST;
/// 获取人机图形验证码
+ (NSString *)fus_URL_getCaptchaCode;
/// 验证人机图形验证码
+ (NSString *)fus_URL_checkCaptchaCode;
// 拉取Scoket消息服务器信息
+ (NSString *)fus_URL_SYNC_SCOKET;
......
......@@ -63,6 +63,10 @@
+ (NSString *)fus_URL_ACCOUNT_MOBILE_LOGIN {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/account/mobileLogin.html"];
}
/// 手机登录 新版本
+ (NSString *)fus_URL_ACCOUNT_mobilePhoneLogin{
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/account/mobile/v2/login"];
}
// 退出登录
+ (NSString *)fus_URL_LOGIN_OUT_YAZHAI {
......@@ -84,6 +88,15 @@
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/third/reg.html"];
}
/// 获取人机图形验证码
+ (NSString *)fus_URL_getCaptchaCode{
return [FUSConfig.sharedInstanced.pathConfigs openUrl:@"/captcha/slide/get"];
}
/// 验证人机图形验证码
+ (NSString *)fus_URL_checkCaptchaCode{
return [FUSConfig.sharedInstanced.pathConfigs openUrl:@"/captcha/slide/check"];
}
// 拉取Scoket消息服务器信息
+ (NSString *)fus_URL_SYNC_SCOKET {
......@@ -543,7 +556,8 @@
// 获取验证码
+ (NSString *)fus_FUS_URL_GET_VERIFY_CODE {
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/user/getRegcap.html"];
// return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/user/getRegcap.html"];
return [FUSConfig.sharedInstanced.pathConfigs apiUrl:@"/account/regcap/get"];
}
// 注册
......
......@@ -392,7 +392,7 @@
<key>SSZipArchive.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>77</integer>
<integer>74</integer>
</dict>
<key>SnapKit-SnapKit_Privacy.xcscheme</key>
<dict>
......
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