Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6f7cc21a
authored
Jan 14, 2025
by
ludi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加验证码
parent
3d1f69f5
Show whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
933 additions
and
52 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/Other/FUSAPIDNSManager.h
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/Other/FUSAPIDNSManager.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/DataStores/FUSCommonUDKeys.h
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/DataStores/FUSCommonUDKeys.m
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.h
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.m
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/Asset.xcassets/fus_common_close_black_icon.imageset/Contents.json
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/Asset.xcassets/fus_common_close_black_icon.imageset/fus_common_close_black_icon@2x.png
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/Asset.xcassets/fus_common_close_black_icon.imageset/fus_common_close_black_icon@3x.png
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/NSString/NSStringSwiftExt.swift
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.h
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Bundle/FUSFoundationBundle.h
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Bundle/FUSFoundationBundle.m
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.h
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.m
Modules/FUSChatCenterModule/FUSChatCenterModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/project.pbxproj
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModule.h
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_close_img.imageset/Contents.json
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_close_img.imageset/login_captcha_close_img@2x.png
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_close_img.imageset/login_captcha_close_img@3x.png
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_slider_thumb_img.imageset/Contents.json
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_slider_thumb_img.imageset/login_captcha_slider_thumb_img@2x.png
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_slider_thumb_img.imageset/login_captcha_slider_thumb_img@3x.png
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaModel.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaModel.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaView.swift
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaViewModel.swift
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Controller/FUSLoginPhoneViewController.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Controller/FUSMessageRegisterViewController.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHttpHelper.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHttpHelper.m
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.h
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.m
Pods/Pods.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/Other/FUSAPIDNSManager.h
View file @
6f7cc21a
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
@property
(
nonatomic
,
copy
)
NSString
*
payURL
;
@property
(
nonatomic
,
copy
)
NSString
*
payURL
;
@property
(
nonatomic
,
copy
)
NSString
*
openUrl
;
/**
/**
检测当前API的地址
检测当前API的地址
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/Common/Other/FUSAPIDNSManager.m
View file @
6f7cc21a
...
@@ -32,6 +32,7 @@
...
@@ -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
]
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
]
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
]
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"
;
[
FUSAPIDNSManager
shareInstance
].
bigCdn
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
CUSTOM_BIG_CDN
]
?
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
CUSTOM_BIG_CDN
]
:
@"https://big.bgp.ourpow.com"
;
...
@@ -74,6 +75,12 @@
...
@@ -74,6 +75,12 @@
[
FUSAPIDNSManager
shareInstance
].
accountsDNS
=
currentApiDict
[
@"lvdou"
];
[
FUSAPIDNSManager
shareInstance
].
accountsDNS
=
currentApiDict
[
@"lvdou"
];
[
FUSAPIDNSManager
shareInstance
].
webURL
=
currentApiDict
[
@"web"
];
[
FUSAPIDNSManager
shareInstance
].
webURL
=
currentApiDict
[
@"web"
];
[
FUSAPIDNSManager
shareInstance
].
payURL
=
currentApiDict
[
@"pay"
];
[
FUSAPIDNSManager
shareInstance
].
payURL
=
currentApiDict
[
@"pay"
];
if
([
NSString
isNull
:
currentApiDict
[
@"openUrl"
]])
{
[
FUSAPIDNSManager
shareInstance
].
openUrl
=
@"http://openapi.tealive66.com"
;
}
else
{
[
FUSAPIDNSManager
shareInstance
].
openUrl
=
currentApiDict
[
@"openUrl"
];
}
}
}
// 备用图片 CDN 地址,有值就用,没值不用
// 备用图片 CDN 地址,有值就用,没值不用
...
@@ -104,6 +111,7 @@
...
@@ -104,6 +111,7 @@
@"cdn"
:
@"https://zhibocdn.yabolive.net"
,
@"cdn"
:
@"https://zhibocdn.yabolive.net"
,
@"pay"
:
@"https://zhibo.yabolive.net"
,
@"pay"
:
@"https://zhibo.yabolive.net"
,
@"web"
:
@"https://www.fusiclub.com/web/"
,
@"web"
:
@"https://www.fusiclub.com/web/"
,
@"openUrl"
:
@"http://openapi.tealive66.com"
,
@"lvdou"
:
@""
@"lvdou"
:
@""
};
};
...
@@ -111,6 +119,7 @@
...
@@ -111,6 +119,7 @@
@"cdn"
:
@"https://big.bgp.ourpow.com"
,
@"cdn"
:
@"https://big.bgp.ourpow.com"
,
@"pay"
:
@"https://zhibo.yazhaiyabo.com"
,
@"pay"
:
@"https://zhibo.yazhaiyabo.com"
,
@"web"
:
@"https://www.fusiclub.com/web/"
,
@"web"
:
@"https://www.fusiclub.com/web/"
,
@"openUrl"
:
@"http://openapi.tealive66.com"
,
@"lvdou"
:
@""
@"lvdou"
:
@""
};
};
...
@@ -127,6 +136,7 @@
...
@@ -127,6 +136,7 @@
NSString
*
historyWebUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
WEB_URL
];
NSString
*
historyWebUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
WEB_URL
];
NSString
*
historyPayUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
PAY_URL
];
NSString
*
historyPayUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
PAY_URL
];
NSString
*
historybigcdnUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
CUSTOM_BIG_CDN
];
NSString
*
historybigcdnUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
CUSTOM_BIG_CDN
];
NSString
*
historyOpenUrlString
=
[[
NSUserDefaults
standardUserDefaults
]
objectForKey
:
OPEN_URL
];
NSString
*
currentApiUrlString
;
NSString
*
currentApiUrlString
;
NSString
*
currentImageDownUrlString
;
NSString
*
currentImageDownUrlString
;
...
@@ -134,6 +144,7 @@
...
@@ -134,6 +144,7 @@
NSString
*
currentWebUrlString
;
NSString
*
currentWebUrlString
;
NSString
*
currentPayUrlString
;
NSString
*
currentPayUrlString
;
NSString
*
currentBigcdnUrlString
;
NSString
*
currentBigcdnUrlString
;
NSString
*
currentOpenUrlString
;
if
([
NSString
isNull
:
historyApiUrlString
]
||
if
([
NSString
isNull
:
historyApiUrlString
]
||
[
NSString
isNull
:
historyImageDownUrlString
]
||
[
NSString
isNull
:
historyImageDownUrlString
]
||
...
@@ -153,6 +164,7 @@
...
@@ -153,6 +164,7 @@
currentWebUrlString
=
currentApiDict
[
@"web"
];
currentWebUrlString
=
currentApiDict
[
@"web"
];
currentPayUrlString
=
currentApiDict
[
@"pay"
];
currentPayUrlString
=
currentApiDict
[
@"pay"
];
currentBigcdnUrlString
=
currentApiDict
[
@"bigCdn"
];
currentBigcdnUrlString
=
currentApiDict
[
@"bigCdn"
];
currentOpenUrlString
=
currentApiDict
[
@"openUrl"
];
}
else
{
}
else
{
currentApiUrlString
=
historyApiUrlString
;
currentApiUrlString
=
historyApiUrlString
;
currentImageDownUrlString
=
historyImageDownUrlString
;
currentImageDownUrlString
=
historyImageDownUrlString
;
...
@@ -160,6 +172,7 @@
...
@@ -160,6 +172,7 @@
currentWebUrlString
=
historyWebUrlString
;
currentWebUrlString
=
historyWebUrlString
;
currentPayUrlString
=
historyPayUrlString
;
currentPayUrlString
=
historyPayUrlString
;
currentBigcdnUrlString
=
historybigcdnUrlString
;
currentBigcdnUrlString
=
historybigcdnUrlString
;
currentOpenUrlString
=
historyOpenUrlString
;
}
}
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentApiUrlString
forKey
:
API_ADDRESS
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentApiUrlString
forKey
:
API_ADDRESS
];
...
@@ -168,6 +181,7 @@
...
@@ -168,6 +181,7 @@
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentWebUrlString
forKey
:
WEB_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentWebUrlString
forKey
:
WEB_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentPayUrlString
forKey
:
PAY_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentPayUrlString
forKey
:
PAY_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentBigcdnUrlString
forKey
:
CUSTOM_BIG_CDN
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentBigcdnUrlString
forKey
:
CUSTOM_BIG_CDN
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentOpenUrlString
forKey
:
CUSTOM_OPEN_URL
];
[[
FUSAPIDNSManager
shareInstance
]
setAPIDNS
:
currentApiUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setAPIDNS
:
currentApiUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setImageDownUrl
:
currentImageDownUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setImageDownUrl
:
currentImageDownUrlString
];
...
@@ -175,6 +189,7 @@
...
@@ -175,6 +189,7 @@
[[
FUSAPIDNSManager
shareInstance
]
setWebURL
:
currentWebUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setWebURL
:
currentWebUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setPayURL
:
currentPayUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setPayURL
:
currentPayUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setBigCdn
:
currentBigcdnUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setBigCdn
:
currentBigcdnUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setOpenUrl
:
currentOpenUrlString
];
[
FUSCommonHttpRequest
fus_updateServerAPIUrlWithSuccess
:
^
(
NSDictionary
*
dataDict
,
int
code
)
{
[
FUSCommonHttpRequest
fus_updateServerAPIUrlWithSuccess
:
^
(
NSDictionary
*
dataDict
,
int
code
)
{
NSArray
*
serversArray
=
dataDict
[
@"servers"
];
NSArray
*
serversArray
=
dataDict
[
@"servers"
];
...
@@ -203,6 +218,7 @@
...
@@ -203,6 +218,7 @@
NSString
*
serverWebUrlString
=
serverApiDict
[
@"web"
];
NSString
*
serverWebUrlString
=
serverApiDict
[
@"web"
];
NSString
*
serverPayUrlString
=
serverApiDict
[
@"pay"
];
NSString
*
serverPayUrlString
=
serverApiDict
[
@"pay"
];
NSString
*
serverBigcdnUrlString
=
serverApiDict
[
@"bigCdn"
];
NSString
*
serverBigcdnUrlString
=
serverApiDict
[
@"bigCdn"
];
NSString
*
serverOpenUrlString
=
serverApiDict
[
@"openUrl"
];
if
(
!
[
NSString
isNullWithString
:
serverApiUrlString
])
{
if
(
!
[
NSString
isNullWithString
:
serverApiUrlString
])
{
[[
FUSAPIDNSManager
shareInstance
]
setAPIDNS
:
serverApiUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setAPIDNS
:
serverApiUrlString
];
...
@@ -212,6 +228,10 @@
...
@@ -212,6 +228,10 @@
[[
FUSAPIDNSManager
shareInstance
]
setBigCdn
:
serverBigcdnUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setBigCdn
:
serverBigcdnUrlString
];
}
}
if
(
!
[
NSString
isNullWithString
:
serverOpenUrlString
])
{
[[
FUSAPIDNSManager
shareInstance
]
setOpenUrl
:
serverBigcdnUrlString
];
}
if
(
!
[
NSString
isNullWithString
:
serverImageDownUrlString
])
{
if
(
!
[
NSString
isNullWithString
:
serverImageDownUrlString
])
{
[[
FUSAPIDNSManager
shareInstance
]
setImageDownUrl
:[
NSString
stringWithFormat
:
@"%@/comm"
,
serverImageDownUrlString
]];
[[
FUSAPIDNSManager
shareInstance
]
setImageDownUrl
:[
NSString
stringWithFormat
:
@"%@/comm"
,
serverImageDownUrlString
]];
}
}
...
@@ -251,18 +271,21 @@
...
@@ -251,18 +271,21 @@
NSString
*
currentAccountsUrlString
=
currentApiDict
[
@"pay"
];
NSString
*
currentAccountsUrlString
=
currentApiDict
[
@"pay"
];
NSString
*
currentWebUrlString
=
currentApiDict
[
@"web"
];
NSString
*
currentWebUrlString
=
currentApiDict
[
@"web"
];
NSString
*
currentPayUrlString
=
currentApiDict
[
@"pay"
];
NSString
*
currentPayUrlString
=
currentApiDict
[
@"pay"
];
NSString
*
currentOpenUrlString
=
currentApiDict
[
@"openUrl"
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentApiUrlString
forKey
:
API_ADDRESS
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentApiUrlString
forKey
:
API_ADDRESS
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentImageDownUrlString
forKey
:
IMAGE_DOWNLOAD_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentImageDownUrlString
forKey
:
IMAGE_DOWNLOAD_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentAccountsUrlString
forKey
:
ACCOUNTS_ADDRESS
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentAccountsUrlString
forKey
:
ACCOUNTS_ADDRESS
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentWebUrlString
forKey
:
WEB_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentWebUrlString
forKey
:
WEB_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentPayUrlString
forKey
:
PAY_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentPayUrlString
forKey
:
PAY_URL
];
[[
NSUserDefaults
standardUserDefaults
]
setObject
:
currentOpenUrlString
forKey
:
OPEN_URL
];
[[
FUSAPIDNSManager
shareInstance
]
setAPIDNS
:
currentApiUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setAPIDNS
:
currentApiUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setImageDownUrl
:
currentImageDownUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setImageDownUrl
:
currentImageDownUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setAccountsDNS
:
currentAccountsUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setAccountsDNS
:
currentAccountsUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setWebURL
:
currentWebUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setWebURL
:
currentWebUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setPayURL
:
currentPayUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setPayURL
:
currentPayUrlString
];
[[
FUSAPIDNSManager
shareInstance
]
setOpenUrl
:
currentOpenUrlString
];
}
}
// 获取单例
// 获取单例
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
View file @
6f7cc21a
...
@@ -354,6 +354,10 @@
...
@@ -354,6 +354,10 @@
return
[
NSString
stringWithFormat
:
@"%@%@"
,[[
FUSAPIDNSManager
shareInstance
]
webURL
],
url
];
return
[
NSString
stringWithFormat
:
@"%@%@"
,[[
FUSAPIDNSManager
shareInstance
]
webURL
],
url
];
}
}
-
(
NSString
*
)
openUrl
:
(
NSString
*
)
url
{
return
[
NSString
stringWithFormat
:
@"%@%@"
,[[
FUSAPIDNSManager
shareInstance
]
openUrl
],
url
];
}
@end
@end
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/DataStores/FUSCommonUDKeys.h
View file @
6f7cc21a
...
@@ -35,6 +35,7 @@ extern NSString * const CUSTOM_ACCOUNTS_URL;
...
@@ -35,6 +35,7 @@ extern NSString * const CUSTOM_ACCOUNTS_URL;
extern
NSString
*
const
CUSTOM_PAY_URL
;
extern
NSString
*
const
CUSTOM_PAY_URL
;
extern
NSString
*
const
CUSTOM_BIG_CDN
;
extern
NSString
*
const
CUSTOM_BIG_CDN
;
extern
NSString
*
const
CUSTOM_WEB_URL
;
extern
NSString
*
const
CUSTOM_WEB_URL
;
extern
NSString
*
const
CUSTOM_OPEN_URL
;
extern
NSString
*
const
SOCKET_IP
;
extern
NSString
*
const
SOCKET_IP
;
extern
NSString
*
const
SOCKET_PORT
;
extern
NSString
*
const
SOCKET_PORT
;
...
@@ -47,6 +48,7 @@ extern NSString * const IMAGE_DOWNLOAD_URL;
...
@@ -47,6 +48,7 @@ extern NSString * const IMAGE_DOWNLOAD_URL;
extern
NSString
*
const
ACCOUNTS_ADDRESS
;
extern
NSString
*
const
ACCOUNTS_ADDRESS
;
extern
NSString
*
const
WEB_URL
;
extern
NSString
*
const
WEB_URL
;
extern
NSString
*
const
PAY_URL
;
extern
NSString
*
const
PAY_URL
;
extern
NSString
*
const
OPEN_URL
;
// IAP支付订单相关
// IAP支付订单相关
extern
NSString
*
const
IAP_ORDER_DICT
;
extern
NSString
*
const
IAP_ORDER_DICT
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/Classes/Foundation/DataStores/FUSCommonUDKeys.m
View file @
6f7cc21a
...
@@ -35,6 +35,7 @@ NSString * const CUSTOM_ACCOUNTS_URL = @"CustomAccountsUrl";
...
@@ -35,6 +35,7 @@ NSString * const CUSTOM_ACCOUNTS_URL = @"CustomAccountsUrl";
NSString
*
const
CUSTOM_PAY_URL
=
@"CustomPayUrl"
;
NSString
*
const
CUSTOM_PAY_URL
=
@"CustomPayUrl"
;
NSString
*
const
CUSTOM_BIG_CDN
=
@"CustomBigCdn"
;
NSString
*
const
CUSTOM_BIG_CDN
=
@"CustomBigCdn"
;
NSString
*
const
CUSTOM_WEB_URL
=
@"CustomWebUrl"
;
NSString
*
const
CUSTOM_WEB_URL
=
@"CustomWebUrl"
;
NSString
*
const
CUSTOM_OPEN_URL
=
@"CustomOpenUrl"
;
NSString
*
const
SOCKET_IP
=
@"SocketIp"
;
NSString
*
const
SOCKET_IP
=
@"SocketIp"
;
NSString
*
const
SOCKET_PORT
=
@"SocketPort"
;
NSString
*
const
SOCKET_PORT
=
@"SocketPort"
;
...
@@ -47,6 +48,7 @@ NSString * const IMAGE_DOWNLOAD_URL = @"ImageDownloadURL";
...
@@ -47,6 +48,7 @@ NSString * const IMAGE_DOWNLOAD_URL = @"ImageDownloadURL";
NSString
*
const
ACCOUNTS_ADDRESS
=
@"AccountsAddress"
;
NSString
*
const
ACCOUNTS_ADDRESS
=
@"AccountsAddress"
;
NSString
*
const
WEB_URL
=
@"WebUrl"
;
NSString
*
const
WEB_URL
=
@"WebUrl"
;
NSString
*
const
PAY_URL
=
@"PayURL"
;
NSString
*
const
PAY_URL
=
@"PayURL"
;
NSString
*
const
OPEN_URL
=
@"OpenURL"
;
// IAP支付订单相关
// IAP支付订单相关
NSString
*
const
IAP_ORDER_DICT
=
@"IAPOrderDictionary"
;
NSString
*
const
IAP_ORDER_DICT
=
@"IAPOrderDictionary"
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.h
View file @
6f7cc21a
...
@@ -239,6 +239,15 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -239,6 +239,15 @@ NS_ASSUME_NONNULL_BEGIN
//手机注册-手机号输入框
//手机注册-手机号输入框
+
(
NSString
*
)
fus_EVENT_REGIST_PHONEINPUT
;
+
(
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
;
+
(
NSString
*
)
fus_EVENT_REGIST_VERIFICATIONCODE
;
...
...
DevelopmentPods/FUSCommon/FUSCommon/FUSRouter/Routers/UserRouter/FUSUserPublicDefine.m
View file @
6f7cc21a
...
@@ -381,6 +381,19 @@
...
@@ -381,6 +381,19 @@
return
@"phoneregister_selectcontry"
;
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
{
+
(
NSString
*
)
fus_EVENT_REGIST_PHONEINPUT
{
return
@"phoneregister_phonenum"
;
return
@"phoneregister_phonenum"
;
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/Asset.xcassets/fus_common_close_black_icon.imageset/Contents.json
0 → 100644
View file @
6f7cc21a
{
"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
}
}
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/Asset.xcassets/fus_common_close_black_icon.imageset/fus_common_close_black_icon@2x.png
0 → 100644
View file @
6f7cc21a
992 Bytes
DevelopmentPods/FUSFoundation/FUSFoundation/Assets/Asset.xcassets/fus_common_close_black_icon.imageset/fus_common_close_black_icon@3x.png
0 → 100644
View file @
6f7cc21a
1.7 KB
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Tools/Categories/NSString/NSStringSwiftExt.swift
View file @
6f7cc21a
...
@@ -51,6 +51,17 @@ public func isEmptyDict(_ dict: [AnyHashable: Any]?) -> Bool {
...
@@ -51,6 +51,17 @@ public func isEmptyDict(_ dict: [AnyHashable: Any]?) -> Bool {
swiftString
.
removeLast
()
swiftString
.
removeLast
()
return
swiftString
as
NSString
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
{
public
extension
String
{
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.h
View file @
6f7cc21a
...
@@ -40,6 +40,9 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -40,6 +40,9 @@ NS_ASSUME_NONNULL_BEGIN
// 网址
// 网址
@property
(
nonatomic
,
copy
)
NSString
*
webUrlString
;
@property
(
nonatomic
,
copy
)
NSString
*
webUrlString
;
/// 注入script
@property
(
nonatomic
,
copy
)
NSArray
<
NSString
*>
*
scriptMessageNames
;
// 是否需要清除緩存
// 是否需要清除緩存
@property
(
nonatomic
,
assign
)
BOOL
clearCache
;
@property
(
nonatomic
,
assign
)
BOOL
clearCache
;
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FUSFoundation/Views/WebView/FUSWKWebView.m
View file @
6f7cc21a
...
@@ -115,9 +115,10 @@
...
@@ -115,9 +115,10 @@
[
self
.
wkWebView
addObserver
:
self
forKeyPath
:
@"title"
options
:
NSKeyValueObservingOptionNew
context
:
NULL
];
[
self
.
wkWebView
addObserver
:
self
forKeyPath
:
@"title"
options
:
NSKeyValueObservingOptionNew
context
:
NULL
];
// //注册js事件
// //注册js事件
[
_userContentController
removeAllUserScripts
];
// [_userContentController removeAllUserScripts];
[
_userContentController
addScriptMessageHandler
:(
id
<
WKScriptMessageHandler
>
)[
YYWeakProxy
proxyWithTarget
:
self
]
name
:
FUSFacebookReplaceJSKey
];
// [_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSFacebookReplaceJSKey];
[
_userContentController
addScriptMessageHandler
:(
id
<
WKScriptMessageHandler
>
)[
YYWeakProxy
proxyWithTarget
:
self
]
name
:
FUSAppCollaborationJSKey
];
// [_userContentController addScriptMessageHandler:(id <WKScriptMessageHandler>)[YYWeakProxy proxyWithTarget:self] name:FUSAppCollaborationJSKey];
[
self
updateScriptMessageHandlers
];
if
(
!
_webEventHelper
)
{
if
(
!
_webEventHelper
)
{
_webEventHelper
=
[
FUSConfig
.
sharedInstanced
.
webConfig
getNewWebViewEventHelper
];
_webEventHelper
=
[
FUSConfig
.
sharedInstanced
.
webConfig
getNewWebViewEventHelper
];
...
@@ -125,6 +126,20 @@
...
@@ -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
{
-
(
void
)
layoutSubviews
{
[
super
layoutSubviews
];
[
super
layoutSubviews
];
if
(
self
.
wkWebView
.
superview
==
self
)
{
if
(
self
.
wkWebView
.
superview
==
self
)
{
...
@@ -484,6 +499,11 @@
...
@@ -484,6 +499,11 @@
}
}
}
}
-
(
NSArray
<
NSString
*>
*
)
scriptMessageNames
{
_scriptMessageNames
=
_scriptMessageNames
;
[
self
updateScriptMessageHandlers
];
}
#pragma mark - other
#pragma mark - other
-
(
void
)
dealloc
{
-
(
void
)
dealloc
{
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Bundle/FUSFoundationBundle.h
View file @
6f7cc21a
...
@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
@end
@end
@interface
UIImage
(
FUSFoundationBundle
)
@interface
UIImage
(
FUSFoundationBundle
)
/// 黑色关闭按钮
+
(
UIImage
*
)
fus_closeBlackIcon
;
+
(
UIImage
*
)
fus_backImage
;
+
(
UIImage
*
)
fus_backImage
;
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Bundle/FUSFoundationBundle.m
View file @
6f7cc21a
...
@@ -67,6 +67,10 @@
...
@@ -67,6 +67,10 @@
return
[
self
fus_ImageNamed
:
@"fus_common_navigation_back_black"
];
return
[
self
fus_ImageNamed
:
@"fus_common_navigation_back_black"
];
}
}
+
(
UIImage
*
)
fus_closeBlackIcon
{
return
[
self
fus_ImageNamed
:
@"fus_common_close_black_icon"
];
}
+
(
UIImage
*
)
fus_backWhiteImage
{
+
(
UIImage
*
)
fus_backWhiteImage
{
return
[
self
fus_ImageNamed
:
@"common_navigation_back_white"
];
return
[
self
fus_ImageNamed
:
@"common_navigation_back_white"
];
}
}
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.h
View file @
6f7cc21a
...
@@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
-
(
NSString
*
)
apiUrl
:(
NSString
*
)
url
;
-
(
NSString
*
)
apiUrl
:(
NSString
*
)
url
;
-
(
NSString
*
)
webUrl
:(
NSString
*
)
url
;
-
(
NSString
*
)
webUrl
:(
NSString
*
)
url
;
-
(
NSString
*
)
openUrl
:(
NSString
*
)
url
;
@end
@end
...
...
DevelopmentPods/FUSFoundation/FUSFoundation/Classes/FuSiTheme/Config/ConfigModels/FUSPathsConfig.m
View file @
6f7cc21a
...
@@ -57,6 +57,10 @@
...
@@ -57,6 +57,10 @@
return
@""
;
return
@""
;
}
}
-
(
NSString
*
)
openUrl
:
(
NSString
*
)
url
{
return
@""
;
}
-
(
NSString
*
)
onlineStreamVideoCachePath
{
-
(
NSString
*
)
onlineStreamVideoCachePath
{
return
[[
NSSearchPathForDirectoriesInDomains
(
NSCachesDirectory
,
NSUserDomainMask
,
YES
)
lastObject
]
stringByAppendingPathComponent
:
@"com.video.cache"
];
return
[[
NSSearchPathForDirectoriesInDomains
(
NSCachesDirectory
,
NSUserDomainMask
,
YES
)
lastObject
]
stringByAppendingPathComponent
:
@"com.video.cache"
];
}
}
...
...
Modules/FUSChatCenterModule/FUSChatCenterModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
6f7cc21a
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
<
k
e
y
>
FUSChatCenterBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
FUSChatCenterBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
2
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
5
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
FUSChatCenterModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
FUSChatCenterModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
6
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
2
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
6f7cc21a
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
<
k
e
y
>
FUSShowRoomModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
FUSShowRoomModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
5
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
6
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/project.pbxproj
View file @
6f7cc21a
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
0025151F2D1AC05000A97B21
/* backpack_icon_anim.webp in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0025151E2D1AC05000A97B21
/* backpack_icon_anim.webp */
;
};
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 */
;
};
00495FD52CF0931900B6F8D3
/* FUSCompleteUserInfoViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00495FD42CF0931900B6F8D3
/* FUSCompleteUserInfoViewController.swift */
;
};
00495FD82CF093E700B6F8D3
/* FUSCompleteUserInfoViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
00495FD72CF093E700B6F8D3
/* FUSCompleteUserInfoViewModel.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 */
;
};
008AC5112D127EBA00FECA7B
/* FUSBackpackPropsUseAlert.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
008AC5102D127EBA00FECA7B
/* FUSBackpackPropsUseAlert.swift */
;
};
008AC5132D12BC0300FECA7B
/* FUSBackpackPropsActivatedAlert.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
008AC5122D12BC0300FECA7B
/* FUSBackpackPropsActivatedAlert.swift */
;
};
008AC5132D12BC0300FECA7B
/* FUSBackpackPropsActivatedAlert.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
008AC5122D12BC0300FECA7B
/* FUSBackpackPropsActivatedAlert.swift */
;
};
008AC5152D12C04000FECA7B
/* FUSUserCenterUDKeyStore.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
008AC5142D12C04000FECA7B
/* FUSUserCenterUDKeyStore.swift */
;
};
008AC5152D12C04000FECA7B
/* FUSUserCenterUDKeyStore.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
008AC5142D12C04000FECA7B
/* FUSUserCenterUDKeyStore.swift */
;
};
...
@@ -893,6 +897,10 @@
...
@@ -893,6 +897,10 @@
0025151E2D1AC05000A97B21
/* backpack_icon_anim.webp */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
file
;
path
=
backpack_icon_anim.webp
;
sourceTree
=
"<group>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
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>"
;
};
008AC5142D12C04000FECA7B
/* FUSUserCenterUDKeyStore.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
FUSUserCenterUDKeyStore.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -1842,6 +1850,17 @@
...
@@ -1842,6 +1850,17 @@
path
=
View
;
path
=
View
;
sourceTree
=
"<group>"
;
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 */
=
{
008AC5162D12CA0000FECA7B
/* Backpack */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -2482,6 +2501,7 @@
...
@@ -2482,6 +2501,7 @@
BE78C90A2C538D7D00F38855
/* Login */
=
{
BE78C90A2C538D7D00F38855
/* Login */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
0089FBB12D34F98B00485E49
/* Captcha */
,
BE78C8E92C538D7D00F38855
/* Controller */
,
BE78C8E92C538D7D00F38855
/* Controller */
,
BE78C8EE2C538D7D00F38855
/* Model */
,
BE78C8EE2C538D7D00F38855
/* Model */
,
BE78C8FB2C538D7D00F38855
/* Other */
,
BE78C8FB2C538D7D00F38855
/* Other */
,
...
@@ -3641,6 +3661,7 @@
...
@@ -3641,6 +3661,7 @@
BE78CBB62C538D7E00F38855
/* FUSPhotoBrowserView.h in Headers */
,
BE78CBB62C538D7E00F38855
/* FUSPhotoBrowserView.h in Headers */
,
BE78CBD82C538D7F00F38855
/* FUSTaskCenterProcessTableViewCell.h in Headers */
,
BE78CBD82C538D7F00F38855
/* FUSTaskCenterProcessTableViewCell.h in Headers */
,
BE78CCAF2C538D8000F38855
/* HWBaseViewController.h in Headers */
,
BE78CCAF2C538D8000F38855
/* HWBaseViewController.h in Headers */
,
0089FBB82D34FA4200485E49
/* FUSCaptchaModel.h in Headers */
,
BED6553B2C5B36A200668116
/* FUSPhotoCollectionViewCell.h in Headers */
,
BED6553B2C5B36A200668116
/* FUSPhotoCollectionViewCell.h in Headers */
,
BE78CCA02C538D8000F38855
/* FUSNewsFeedReplyListHeaderView.h in Headers */
,
BE78CCA02C538D8000F38855
/* FUSNewsFeedReplyListHeaderView.h in Headers */
,
BE78CCDA2C538D8000F38855
/* TZProgressView.h in Headers */
,
BE78CCDA2C538D8000F38855
/* TZProgressView.h in Headers */
,
...
@@ -4447,9 +4468,11 @@
...
@@ -4447,9 +4468,11 @@
BE78CC512C538D7F00F38855
/* FUSNewsFeedMessageDBHelper.m in Sources */
,
BE78CC512C538D7F00F38855
/* FUSNewsFeedMessageDBHelper.m in Sources */
,
00B778652D12DB89003D7F56
/* FUSBackpackMotorView.swift in Sources */
,
00B778652D12DB89003D7F56
/* FUSBackpackMotorView.swift in Sources */
,
BE78CB6C2C538D7E00F38855
/* FUSMyZoneCellManager.m in Sources */
,
BE78CB6C2C538D7E00F38855
/* FUSMyZoneCellManager.m in Sources */
,
0089FBB52D34FA1E00485E49
/* FUSCaptchaViewModel.swift in Sources */
,
BE78CC9E2C538D8000F38855
/* FUSNewsFeedReplyInputView.m in Sources */
,
BE78CC9E2C538D8000F38855
/* FUSNewsFeedReplyInputView.m in Sources */
,
BE78CCB72C538D8000F38855
/* FUSSearchViewController.swift in Sources */
,
BE78CCB72C538D8000F38855
/* FUSSearchViewController.swift in Sources */
,
BE78CC392C538D7F00F38855
/* FUSNewsFeedDetailViewController.m in Sources */
,
BE78CC392C538D7F00F38855
/* FUSNewsFeedDetailViewController.m in Sources */
,
0089FBB92D34FA4200485E49
/* FUSCaptchaModel.m in Sources */
,
BE189A3C2C7323FE0008418B
/* FSRMotorModel.m in Sources */
,
BE189A3C2C7323FE0008418B
/* FSRMotorModel.m in Sources */
,
BE78CB6A2C538D7E00F38855
/* FUSZoneTaskInfoMModel.m in Sources */
,
BE78CB6A2C538D7E00F38855
/* FUSZoneTaskInfoMModel.m in Sources */
,
BE78CC282C538D7F00F38855
/* FUSChatSettingHeaderView.m in Sources */
,
BE78CC282C538D7F00F38855
/* FUSChatSettingHeaderView.m in Sources */
,
...
@@ -4463,6 +4486,7 @@
...
@@ -4463,6 +4486,7 @@
BE78CC812C538D7F00F38855
/* FUSNewsFeedDetailVideoHeaderView.m in Sources */
,
BE78CC812C538D7F00F38855
/* FUSNewsFeedDetailVideoHeaderView.m in Sources */
,
BED65B1F2C5B795900668116
/* FUSLiveChatInputTaskListView.swift in Sources */
,
BED65B1F2C5B795900668116
/* FUSLiveChatInputTaskListView.swift in Sources */
,
BE78CB8B2C538D7E00F38855
/* FUSMyZoneFocusAndFansCell.m in Sources */
,
BE78CB8B2C538D7E00F38855
/* FUSMyZoneFocusAndFansCell.m in Sources */
,
0089FBB32D34F98B00485E49
/* FUSCaptchaView.swift in Sources */
,
BE78CB4C2C538D7E00F38855
/* FUSZoneTaskCenterViewController.m in Sources */
,
BE78CB4C2C538D7E00F38855
/* FUSZoneTaskCenterViewController.m in Sources */
,
BE78CC452C538D7F00F38855
/* FUSNewsFeedListModel.m in Sources */
,
BE78CC452C538D7F00F38855
/* FUSNewsFeedListModel.m in Sources */
,
BE78CBEB2C538D7F00F38855
/* FUSReportOptionTableViewCell.m in Sources */
,
BE78CBEB2C538D7F00F38855
/* FUSReportOptionTableViewCell.m in Sources */
,
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
6f7cc21a
...
@@ -7,12 +7,12 @@
...
@@ -7,12 +7,12 @@
<
k
e
y
>
FUSUserCenterModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
FUSUserCenterModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
4
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
8
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
FUSUserCenterModuleBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
FUSUserCenterModuleBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
8
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
7
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModule.h
View file @
6f7cc21a
...
@@ -16,3 +16,5 @@ FOUNDATION_EXPORT const unsigned char FUSUserCenterModuleVersionString[];
...
@@ -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>
// In this header, you should import all the public headers of your framework using statements like #import <FUSUserCenterModule/PublicHeader.h>
#import "FUSUserCenterOCHeader.h"
#import "FUSUserCenterOCHeader.h"
#import "FUSCaptchaModel.h"
#import "FUSLoginHelper.h"
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_close_img.imageset/Contents.json
0 → 100644
View file @
6f7cc21a
{
"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
}
}
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_close_img.imageset/login_captcha_close_img@2x.png
0 → 100644
View file @
6f7cc21a
1.79 KB
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_close_img.imageset/login_captcha_close_img@3x.png
0 → 100644
View file @
6f7cc21a
3.35 KB
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_slider_thumb_img.imageset/Contents.json
0 → 100644
View file @
6f7cc21a
{
"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
}
}
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_slider_thumb_img.imageset/login_captcha_slider_thumb_img@2x.png
0 → 100644
View file @
6f7cc21a
3.92 KB
Modules/FUSUserCenterModule/FUSUserCenterModule/FUSUserCenterModuleBundle.bundle/FUSUserCenterAssets.xcassets/Login/login_captcha_slider_thumb_img.imageset/login_captcha_slider_thumb_img@3x.png
0 → 100644
View file @
6f7cc21a
8.28 KB
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaModel.h
0 → 100644
View file @
6f7cc21a
//
// 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
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaModel.m
0 → 100644
View file @
6f7cc21a
//
// 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
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaView.swift
0 → 100644
View file @
6f7cc21a
//
// FUSCaptchaView.swift
// LoginRegister
//
// Created by pierce on 2023/2/1.
//
import
UIKit
@objcMembers
public
class
FUSCaptchaView
:
FUSBaseView
{
private
let
heightRatio
:
CGFloat
=
150
private
let
widthRatio
:
CGFloat
=
300
private
let
blockHeightRatio
:
CGFloat
=
45
private
let
blockWidthRatio
:
CGFloat
=
55
private
let
sliderViewMinX
:
CGFloat
=
18
let
viewModel
=
FUSCaptchaViewModel
()
var
countrycode
:
String
=
""
var
phone
:
String
=
""
/// 短信类型:1登录、2未知、3注册、4绑定手机
var
checkType
:
Int
=
3
var
validationSucceedHandler
:((
String
)
->
Void
)?
=
nil
@objc
public
static
func
fus_showCaptchaView
(
countrycode
:
String
,
phone
:
String
,
checkType
:
Int
,
dict
:
Dictionary
<
String
,
Any
>
,
succeed
:((
String
)
->
Void
)?)
->
Void
{
FUSTalkingData
.
fus_trackEvent
(
FUSUserEventTrackParams
.
fus_EVENT_REGIST_NEED_HUMAN_VERIFY
())
let
type
=
dict
[
"type"
]
as?
Int
??
1
var
url
=
(
dict
[
"url"
]
as?
String
)
??
""
if
type
==
2
&&
isValidString
(
url
)
{
let
webview
=
FUSWKWebView
(
frame
:
UIView
.
fus_screenFrame
())
webview
.
scriptMessageNames
=
[
"sendAppVerificationMsg"
]
// let closeBtn = UIButton(type: .custom)
// closeBtn.setImage(.fus_closeBlackIcon(), for: .normal)
// closeBtn.frame = CGRect(x: UIView.fus_screenW() - 50, y: UIView.fus_SafeTop() + 10, width: 50, height: 50)
// webview.addSubview(closeBtn)
// closeBtn.rx.tap.subscribe(onNext: { [weak webview] _ in
// webview?.removeFromSuperview()
// }).disposed(by: webview.disposeBag)
webview
.
backgroundColor
=
UIColor
.
clear
webview
.
wkWebView
.
backgroundColor
=
UIColor
.
clear
webview
.
wkWebView
.
scrollView
.
alwaysBounceVertical
=
false
webview
.
wkWebView
.
scrollView
.
alwaysBounceHorizontal
=
false
webview
.
showProgressAtBottom
=
false
UIViewController
.
fus_top
()?
.
view
.
addSubview
(
webview
)
webview
.
closeWebViewHandler
=
{
[
weak
webview
]
cidType
in
webview
?
.
removeFromSuperview
()
}
webview
.
jsMessageHandler
=
{
userContentController
,
message
in
if
message
.
name
==
"sendAppVerificationMsg"
{
guard
let
body
:
String
=
message
.
body
as?
String
else
{
return
false
}
guard
let
jsonData
=
body
.
data
(
using
:
String
.
Encoding
.
utf8
,
allowLossyConversion
:
false
)
else
{
return
false
}
if
let
jsonDictionary
=
try!
JSONSerialization
.
jsonObject
(
with
:
jsonData
,
options
:
[])
as?
[
String
:
Any
],
let
idStr
=
jsonDictionary
[
"id"
]
as?
String
{
succeed
?(
idStr
)
return
true
}
// let json = try! JSON(data: jsonData)
// succeed?(json["id"].stringValue)
// return true
}
return
false
}
// webview.actionPublisher.filter({ $0.cid == FFWebViewCID.hideCloseBtn.rawValue }).subscribe(onNext: { _ in
//
// closeBtn.isHidden = true
//
// }).disposed(by: webview.disposeBag)
if
url
.
contains
(
"?"
)
==
false
{
url
=
url
.
appending
(
"?"
)
}
else
{
url
=
url
.
appending
(
"&"
)
}
url
=
url
.
appending
(
"countryCode=
\(
countrycode
)
&phone=
\(
phone
)
&checkType=
\(
checkType
)
"
)
webview
.
configWebView
(
withWebUrl
:
url
)
return
}
FUSLoginHelper
.
sharedInstance
()
.
fus_getCaptchaCode
(
with
:
countrycode
,
phone
:
phone
)
{
model
in
let
captcha
=
FUSCaptchaView
(
frame
:
UIView
.
fus_screenFrame
())
captcha
.
countrycode
=
countrycode
captcha
.
phone
=
phone
captcha
.
checkType
=
checkType
captcha
.
validationSucceedHandler
=
succeed
captcha
.
viewModel
.
captchaModel
.
accept
(
model
)
UIViewController
.
fus_top
()?
.
view
.
addSubview
(
captcha
)
}
failure
:
{
msg
,
code
in
FUSDialogView
.
fus_showDialog
(
msg
)
}
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
}
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
let
contentView
=
UIView
(
frame
:
.
zero
)
let
bgImageView
=
UIImageView
(
frame
:
.
zero
)
let
captchaBgImageView
=
UIImageView
(
frame
:
.
zero
)
let
captchaSlidedImageView
=
UIImageView
(
frame
:
.
zero
)
let
closeBtn
=
UIButton
(
type
:
.
custom
)
var
captchaWidth
:
CGFloat
=
0
var
captchaHeight
:
CGFloat
=
0
var
captchaBgWidth
:
CGFloat
=
0
var
captchaBgHeight
:
CGFloat
=
0
var
captchaWidthRate
=
1.0
var
contentViewWidth
:
CGFloat
=
0
public
override
func
makeUI
()
{
super
.
makeUI
()
self
.
fus_makeCaptchaViewUI
()
self
.
fus_makeTipAndSliderUI
()
}
func
fus_makeCaptchaViewUI
()
{
self
.
backgroundColor
=
.
fus_alertViewBackground
()
self
.
addSubview
(
self
.
contentView
)
self
.
closeBtn
.
setImage
(
FUSUserCenterBunble
.
imageNamed
(
"login_captcha_close_img"
),
for
:
.
normal
)
self
.
closeBtn
.
rx
.
tap
.
subscribe
(
onNext
:{
[
weak
self
]
in
FUSTalkingData
.
fus_trackEvent
(
FUSUserEventTrackParams
.
fus_EVENT_REGIST_CLOSE_HUMAN_VERIFY
())
self
?
.
removeFromSuperview
()
})
.
disposed
(
by
:
disposeBag
)
self
.
addSubview
(
self
.
closeBtn
)
self
.
contentView
.
addSubview
(
self
.
bgImageView
)
self
.
contentView
.
addSubview
(
self
.
captchaBgImageView
)
self
.
contentView
.
addSubview
(
self
.
captchaSlidedImageView
)
self
.
bgImageView
.
backgroundColor
=
.
white
self
.
bgImageView
.
layer
.
cornerRadius
=
14
self
.
bgImageView
.
layer
.
masksToBounds
=
true
let
contentX
=
28
self
.
contentViewWidth
=
UIView
.
fus_screenW
()
-
CGFloat
(
contentX
*
2
)
self
.
bgImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
bottom
.
equalToSuperview
()
}
let
captchaBgX
=
18
let
captchaBgY
=
30
self
.
captchaBgWidth
=
self
.
contentViewWidth
-
CGFloat
(
captchaBgX
*
2
)
self
.
captchaWidthRate
=
self
.
captchaBgWidth
/
self
.
widthRatio
self
.
captchaBgHeight
=
self
.
captchaWidthRate
*
self
.
heightRatio
self
.
captchaBgImageView
.
contentMode
=
.
scaleToFill
self
.
captchaSlidedImageView
.
contentMode
=
.
scaleToFill
self
.
captchaBgImageView
.
layer
.
cornerRadius
=
10
self
.
captchaBgImageView
.
layer
.
masksToBounds
=
true
self
.
captchaBgImageView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
captchaBgY
)
make
.
left
.
equalToSuperview
()
.
offset
(
captchaBgX
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
captchaBgX
)
make
.
width
.
equalTo
(
self
.
captchaBgWidth
)
make
.
height
.
equalTo
(
self
.
captchaBgHeight
)
}
self
.
captchaSlidedImageView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
self
.
captchaBgImageView
)
make
.
left
.
equalTo
(
self
.
captchaBgImageView
)
make
.
width
.
equalTo
(
self
.
captchaWidth
)
make
.
height
.
equalTo
(
self
.
captchaHeight
)
}
self
.
contentView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
centerY
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
.
offset
(
contentX
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
contentX
)
}
self
.
closeBtn
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalTo
(
self
.
contentView
.
snp
.
centerX
)
make
.
width
.
height
.
equalTo
(
43
)
make
.
top
.
equalTo
(
self
.
contentView
.
snp
.
bottom
)
.
offset
(
12
)
}
}
let
tipLabel
=
UILabel
()
// let sliderProgressView = FUSGradientView(frame: .zero)
let
sliderProgressView
=
UIView
(
frame
:
.
zero
)
let
sliderBgView
=
UIView
(
frame
:
.
zero
)
let
sliderTipLabel
=
UILabel
()
let
sliderThumpImageView
=
UIImageView
(
frame
:
.
zero
)
func
fus_makeTipAndSliderUI
()
{
/// tipLabel
self
.
tipLabel
.
textAlignment
=
.
center
self
.
tipLabel
.
font
=
.
fus_themeFont
(
15
)
self
.
tipLabel
.
textColor
=
.
fus_textColorRich
()
self
.
tipLabel
.
numberOfLines
=
2
self
.
tipLabel
.
text
=
.
fus_versionLocalString
(
"滑动拼图到正确位置以完成验证"
)
self
.
contentView
.
addSubview
(
self
.
tipLabel
)
self
.
tipLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
self
.
captchaBgImageView
.
snp
.
bottom
)
.
offset
(
15
)
make
.
left
.
equalTo
(
self
.
captchaBgImageView
.
snp
.
left
)
make
.
right
.
equalTo
(
self
.
captchaBgImageView
.
snp
.
right
)
}
/// slider
self
.
contentView
.
addSubview
(
self
.
sliderProgressView
)
self
.
contentView
.
addSubview
(
self
.
sliderBgView
)
self
.
sliderBgView
.
addSubview
(
self
.
sliderTipLabel
)
self
.
contentView
.
addSubview
(
self
.
sliderThumpImageView
)
// self.sliderProgressView.contentColors = [.init(hex: "#D8D8D8"), .init(hex: "#D8D8D8")]
// self.sliderProgressView.cornerRadius = 15
// self.sliderProgressView.contentGradientStartPoint = .init(x: 0, y: 0)
// self.sliderProgressView.contentGradientEndPoint = .init(x: 0, y: 1)
self
.
sliderProgressView
.
backgroundColor
=
.
init
(
hex
:
"#D8D8D8"
)
self
.
sliderProgressView
.
layer
.
cornerRadius
=
15
self
.
sliderProgressView
.
layer
.
masksToBounds
=
true
self
.
sliderBgView
.
backgroundColor
=
.
init
(
hex
:
"#F1F1F2"
)
self
.
sliderBgView
.
layer
.
cornerRadius
=
15
self
.
sliderBgView
.
layer
.
masksToBounds
=
true
self
.
sliderTipLabel
.
textAlignment
=
.
center
self
.
sliderTipLabel
.
font
=
.
fus_themeFont
(
14
)
self
.
sliderTipLabel
.
textColor
=
.
fus_textColorMedium
()
self
.
sliderTipLabel
.
text
=
.
fus_versionLocalString
(
"滑动以完成验证"
)
self
.
sliderThumpImageView
.
image
=
FUSUserCenterBunble
.
imageNamed
(
"login_captcha_slider_thumb_img"
)
self
.
sliderThumpImageView
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
47
)
make
.
top
.
equalTo
(
self
.
tipLabel
.
snp
.
bottom
)
.
offset
(
15
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
30
)
make
.
left
.
equalTo
(
self
.
sliderProgressView
.
snp
.
left
)
}
self
.
sliderProgressView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
self
.
sliderViewMinX
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
self
.
sliderViewMinX
)
make
.
height
.
equalTo
(
30
)
make
.
centerY
.
equalTo
(
self
.
sliderThumpImageView
.
snp
.
centerY
)
}
self
.
sliderBgView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
self
.
sliderThumpImageView
.
snp
.
left
)
make
.
right
.
equalTo
(
self
.
sliderProgressView
.
snp
.
right
)
.
offset
(
1
)
make
.
height
.
equalTo
(
self
.
sliderProgressView
.
snp
.
height
)
.
offset
(
1
)
make
.
centerY
.
equalTo
(
self
.
sliderThumpImageView
.
snp
.
centerY
)
}
self
.
sliderTipLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
bottom
.
top
.
equalToSuperview
()
make
.
width
.
equalTo
(
self
.
sliderProgressView
.
snp
.
width
)
.
multipliedBy
(
0.7
)
make
.
centerX
.
equalTo
(
self
.
sliderProgressView
.
snp
.
centerX
)
}
self
.
sliderThumpImageView
.
isUserInteractionEnabled
=
true
var
beginX
:
CGFloat
=
self
.
sliderViewMinX
self
.
sliderThumpImageView
.
addGestureRecognizer
(
UIPanGestureRecognizer
{
[
weak
self
]
pan
in
guard
let
pan
=
pan
as?
UIPanGestureRecognizer
else
{
return
}
guard
let
self
=
self
else
{
return
}
let
minX
=
self
.
sliderViewMinX
let
progressWidth
=
self
.
sliderProgressView
.
width
let
maxX
=
minX
+
progressWidth
if
pan
.
state
==
.
began
{
beginX
=
pan
.
view
?
.
centerX
??
0
}
let
translatedPoint
=
pan
.
translation
(
in
:
UIWindow
.
fus_keyWindow
)
var
finalX
=
(
beginX
)
+
translatedPoint
.
x
if
finalX
<
minX
{
finalX
=
minX
}
if
finalX
>
maxX
{
finalX
=
maxX
}
let
progress
=
(
finalX
-
minX
)
/
progressWidth
self
.
viewModel
.
progress
.
accept
(
progress
)
switch
pan
.
state
{
case
.
ended
,
.
cancelled
,
.
failed
:
let
x
=
Int
(((
self
.
widthRatio
-
self
.
blockWidthRatio
))
*
progress
*
(
self
.
viewModel
.
captchaModel
.
value
?
.
m
??
1
))
let
captchaId
=
self
.
viewModel
.
captchaModel
.
value
?
.
captchaId
??
""
let
data
=
"
\(
captchaId
)\(
x
)
"
FUSLoginHelper
.
sharedInstance
()
.
fus_checkCaptchaCode
(
withData
:
data
,
checktype
:
self
.
checkType
)
{
self
.
validationSucceedHandler
?(
captchaId
)
self
.
removeFromSuperview
()
FUSTalkingData
.
fus_trackEvent
(
FUSUserEventTrackParams
.
fus_EVENT_REGIST_SEND_HUMAN_VERIFY_RESULT
(),
label
:
"1"
,
parameters
:
[
"desc"
:
"验证成功"
])
}
failure
:
{
msg
,
code
in
FUSTalkingData
.
fus_trackEvent
(
FUSUserEventTrackParams
.
fus_EVENT_REGIST_SEND_HUMAN_VERIFY_RESULT
(),
label
:
"
\(
code
)
"
,
parameters
:
[
"desc"
:
msg
??
""
])
self
.
viewModel
.
progress
.
accept
(
0
)
self
.
fus_updateWithCurrentProgress
()
switch
code
{
case
-
97
,
-
98
:
FUSLoginHelper
.
sharedInstance
()
.
fus_getCaptchaCode
(
with
:
self
.
countrycode
,
phone
:
self
.
phone
)
{
model
in
self
.
viewModel
.
captchaModel
.
accept
(
model
)
}
failure
:
{
msg
,
code
in
FUSDialogView
.
fus_showDialog
(
msg
)
}
case
-
99
:
FUSDialogView
.
fus_showDialog
(
.
fus_versionLocalString
(
"请滑动拼图到正确位置"
))
default
:
break
}
}
break
default
:
break
}
})
}
public
override
func
bindViewModel
()
{
super
.
bindViewModel
()
self
.
viewModel
.
captchaModel
.
distinctUntilChanged
()
.
subscribe
(
onNext
:
{
[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
progress
.
accept
(
0
)
self
.
fus_updateWithCurrentProgress
()
self
.
captchaBgImageView
.
image
=
model
?
.
backgroundImage
self
.
captchaSlidedImageView
.
image
=
model
?
.
coverImage
})
.
disposed
(
by
:
disposeBag
)
self
.
viewModel
.
progress
.
distinctUntilChanged
()
.
subscribe
(
onNext
:
{
[
weak
self
]
progress
in
guard
let
self
=
self
else
{
return
}
self
.
fus_updateWithCurrentProgress
()
})
.
disposed
(
by
:
disposeBag
)
}
func
fus_updateWithCurrentProgress
()
{
let
progress
=
self
.
viewModel
.
progress
.
value
let
captChaSliderX
=
(
self
.
captchaBgWidth
-
self
.
captchaWidth
)
*
progress
// m是服务器计算出来的 实际图片高度/300 的值
let
m
=
CGFloat
(
self
.
viewModel
.
captchaModel
.
value
?
.
m
??
1
)
let
y
=
CGFloat
(
self
.
viewModel
.
captchaModel
.
value
?
.
y
??
0
)
let
captchaSlideY
=
self
.
captchaWidthRate
*
(
y
/
m
)
self
.
captchaWidth
=
self
.
blockWidthRatio
*
self
.
captchaWidthRate
self
.
captchaHeight
=
self
.
blockHeightRatio
*
self
.
captchaWidthRate
self
.
captchaSlidedImageView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
self
.
captchaBgImageView
.
snp
.
top
)
.
offset
(
captchaSlideY
)
make
.
left
.
equalTo
(
self
.
captchaBgImageView
.
snp
.
left
)
.
offset
(
captChaSliderX
)
make
.
width
.
height
.
equalTo
(
self
.
captchaWidth
)
make
.
height
.
equalTo
(
self
.
captchaHeight
)
}
let
sliderWidth
=
self
.
contentViewWidth
-
self
.
sliderViewMinX
*
2
-
47
let
sliderX
=
sliderWidth
*
progress
self
.
sliderThumpImageView
.
snp
.
remakeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
47
)
make
.
top
.
equalTo
(
self
.
tipLabel
.
snp
.
bottom
)
.
offset
(
15
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
30
)
make
.
left
.
equalTo
(
self
.
sliderProgressView
.
snp
.
left
)
.
offset
(
sliderX
)
}
}
}
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Captcha/FUSCaptchaViewModel.swift
0 → 100644
View file @
6f7cc21a
//
// 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
)
}
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Controller/FUSLoginPhoneViewController.m
View file @
6f7cc21a
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#import "FUSDataStatisticsManager.h"
#import "FUSDataStatisticsManager.h"
#import <SJAttributesFactory/SJAttributesFactory.h>
#import <SJAttributesFactory/SJAttributesFactory.h>
#import <FUSUserCenterModule/FUSUserCenterModule-Swift.h>
@interface
FUSLoginPhoneViewController
()
<
UITextFieldDelegate
,
FUSTextFieldDelegate
>
@interface
FUSLoginPhoneViewController
()
<
UITextFieldDelegate
,
FUSTextFieldDelegate
>
...
@@ -173,6 +174,51 @@
...
@@ -173,6 +174,51 @@
self
.
countryOrAreaLabel
.
text
=
[
NSString
fus_localString
:
@"国家/地区"
];
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 @@
...
@@ -210,32 +256,33 @@
sender
.
userInteractionEnabled
=
NO
;
sender
.
userInteractionEnabled
=
NO
;
[
FUSLoadingView
fus_showProgressViewWithMessage
:
nil
];
[
FUSLoadingView
fus_showProgressViewWithMessage
:
nil
];
__weak
typeof
(
self
)
weakSelf
=
self
;
[
self
fus_requstLoginWithCaptchaId
:
nil
cancel
:
0
sender
:
sender
];
[
FUSLoginHttpHelper
fus_accountMobileLoginWithPhone
:
phone
countryCode
:
countryCode
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
// __weak typeof(self) weakSelf = self;
[
FUSLoadingView
fus_dismissProgressView
];
// [FUSLoginHttpHelper fus_accountMobileLoginWithPhone:phone countryCode:countryCode success:^(NSDictionary *dataDict, int code) {
// 转跳注册界面
// [FUSLoadingView fus_dismissProgressView];
FUSMessageRegisterViewController
*
registViewCtrl
=
[[
FUSMessageRegisterViewController
alloc
]
init
];
// // 转跳注册界面
registViewCtrl
.
phone
=
phone
;
// FUSMessageRegisterViewController *registViewCtrl = [[FUSMessageRegisterViewController alloc] init];
registViewCtrl
.
countryCode
=
countryCode
;
// registViewCtrl.phone = phone;
registViewCtrl
.
countryInfoDict
=
self
.
countryInfoDict
;
// registViewCtrl.countryCode = countryCode;
registViewCtrl
.
hasSendVerifyCode
=
YES
;
// registViewCtrl.countryInfoDict = self.countryInfoDict;
sender
.
userInteractionEnabled
=
YES
;
// registViewCtrl.hasSendVerifyCode = YES;
[
weakSelf
.
navigationController
pushViewController
:
registViewCtrl
animated
:
YES
];
// sender.userInteractionEnabled = YES;
// [weakSelf.navigationController pushViewController:registViewCtrl animated:YES];
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
//
// } failure:^(NSString *msg, int code) {
sender
.
userInteractionEnabled
=
YES
;
//
[
FUSLoadingView
fus_dismissProgressView
];
// sender.userInteractionEnabled = YES;
if
(
code
==
-
24
)
{
// [FUSLoadingView fus_dismissProgressView];
FUSLoginViewController
*
loginVC
=
[[
FUSLoginViewController
alloc
]
init
];
// if (code == -24) {
loginVC
.
phone
=
phone
;
// FUSLoginViewController *loginVC = [[FUSLoginViewController alloc] init];
loginVC
.
countryInfoDict
=
self
.
countryInfoDict
;
// loginVC.phone = phone;
[
self
.
navigationController
pushViewController
:
loginVC
animated
:
YES
];
// loginVC.countryInfoDict = self.countryInfoDict;
}
else
{
// [self.navigationController pushViewController:loginVC animated:YES];
[
FUSDialogView
fus_showDialog
:
msg
];
// } else {
[
FUSDataStatisticsManager
fus_registWithSMSVerifyCodeWithServerCode
:
@
(
code
).
description
log
:
msg
];
// [FUSDialogView fus_showDialog:msg];
}
// [FUSDataStatisticsManager fus_registWithSMSVerifyCodeWithServerCode:@(code).description log:msg];
}];
// }
// }];
}
}
#pragma mark - TextField
#pragma mark - TextField
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Controller/FUSMessageRegisterViewController.m
View file @
6f7cc21a
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import <FirebaseAnalytics/FirebaseAnalytics.h>
#import <SJAttributesFactory/SJAttributesFactory.h>
#import <SJAttributesFactory/SJAttributesFactory.h>
#import "FUSCommon/FUSCommon-Swift.h"
#import "FUSCommon/FUSCommon-Swift.h"
#import <FUSUserCenterModule/FUSUserCenterModule-Swift.h>
@interface
FUSMessageRegisterViewController
()
<
UITextFieldDelegate
,
UITextFieldDelegate
,
FUSTextFieldDelegate
>
@interface
FUSMessageRegisterViewController
()
<
UITextFieldDelegate
,
UITextFieldDelegate
,
FUSTextFieldDelegate
>
...
@@ -463,17 +464,26 @@
...
@@ -463,17 +464,26 @@
self
.
countryCode
=
countryCode
;
self
.
countryCode
=
countryCode
;
// 请求验证码
// 请求验证码
[
FUSLoginHttpHelper
fus_getVerifyPasswordWithPhone
:
phone
countrycode
:
countryCode
success
:^
{
[
self
fus_requestVerifyCode
:
@""
countryCode
:
countryCode
];
[
self
fus_getVerifyCodeSucceed
];
}
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
[
self
.
verifyCodeTimer
invalidate
];
-
(
void
)
fus_requestVerifyCode
:
(
NSString
*
)
captchaId
countryCode
:
(
NSString
*
)
countryCode
{
self
.
verifyCodeTimer
=
nil
;
[
self
setupGetVerifyCodeBtnEnable
:
NO
];
[
self
setupGetVerifyCodeBtnEnable
:
YES
];
MJWeakSelf
[
FUSLoginHttpHelper
fus_getVerifyPasswordWithPhone
:
self
.
phone
countrycode
:
countryCode
captchaId
:
captchaId
success
:^
{
[
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
)
{
if
(
code
==
-
24
)
{
[
s
elf
.
view
endEditing
:
YES
];
[
weakS
elf
.
view
endEditing
:
YES
];
[
FUSTalkingData
fus_trackEvent
:
FUSUserEventTrackParams
.
fus_EVENT_REGIST_HAVEREGIST
];
[
FUSTalkingData
fus_trackEvent
:
FUSUserEventTrackParams
.
fus_EVENT_REGIST_HAVEREGIST
];
[
FUSAlertView
showAlertWithTitle
:[
NSString
fus_localString
:
@"注册"
]
message
:
msg
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"去登录"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
[
FUSAlertView
showAlertWithTitle
:[
NSString
fus_localString
:
@"注册"
]
message
:
msg
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"去登录"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
...
@@ -488,13 +498,17 @@
...
@@ -488,13 +498,17 @@
[
self
.
navigationController
pushViewController
:
loginViewCtrl
animated
:
YES
];
[
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
];
[
FUSDialogView
fus_showDialog
:
msg
];
}
}
}];
}];
}
}
-
(
void
)
fus_getVerifyCodeSucceed
{
-
(
void
)
fus_getVerifyCodeSucceed
{
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.h
View file @
6f7cc21a
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
//
//
#import <Foundation/Foundation.h>
#import <Foundation/Foundation.h>
#import "FUSCaptchaModel.h"
/**
/**
登录结果回调,包括成功失败回调
登录结果回调,包括成功失败回调
...
@@ -44,6 +45,26 @@ typedef void(^loginCompletion)(int code, NSString *msg);
...
@@ -44,6 +45,26 @@ typedef void(^loginCompletion)(int code, NSString *msg);
success
:(
void
(
^
)(
int
code
))
success
success
:(
void
(
^
)(
int
code
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
;
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
;
-
(
void
)
fus_checkLiveState
;
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHelper.m
View file @
6f7cc21a
...
@@ -195,6 +195,13 @@
...
@@ -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
];
}
/**
/**
登出,注销
登出,注销
*/
*/
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHttpHelper.h
View file @
6f7cc21a
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
#import "FUSUpdateModel.h"
#import "FUSUpdateModel.h"
#import "FUSCaptchaModel.h"
typedef
NS_ENUM
(
NSInteger
,
Platform
)
{
typedef
NS_ENUM
(
NSInteger
,
Platform
)
{
PlatformQQ
=
1
,
PlatformQQ
=
1
,
...
@@ -53,13 +54,15 @@ typedef NS_ENUM(NSInteger, Platform) {
...
@@ -53,13 +54,15 @@ typedef NS_ENUM(NSInteger, Platform) {
@param phone 手机号
@param phone 手机号
@param countrycode 区域号
@param countrycode 区域号
@param captchaId 验证码
@param success 成功回调
@param success 成功回调
@param failure 失败回调
@param failure 失败回调
*/
*/
+
(
void
)
fus_getVerifyPasswordWithPhone
:(
NSString
*
)
phone
+
(
void
)
fus_getVerifyPasswordWithPhone
:(
NSString
*
)
phone
countrycode
:(
NSString
*
)
countrycode
countrycode
:(
NSString
*
)
countrycode
captchaId
:(
NSString
*
)
captchaId
success
:(
void
(
^
)(
void
))
success
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) {
...
@@ -350,6 +353,40 @@ typedef NS_ENUM(NSInteger, Platform) {
success
:(
void
(
^
)(
NSDictionary
*
dataDict
,
int
code
))
success
success
:(
void
(
^
)(
NSDictionary
*
dataDict
,
int
code
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
;
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只调用一次,进入后台再进入前台不需要调用
/// 打开app只调用一次,进入后台再进入前台不需要调用
+
(
void
)
fus_requestSettingInitData
;
+
(
void
)
fus_requestSettingInitData
;
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHttpHelper.m
View file @
6f7cc21a
...
@@ -137,7 +137,20 @@
...
@@ -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 消息服务器信息
获取 Socket 消息服务器信息
...
@@ -195,18 +208,19 @@
...
@@ -195,18 +208,19 @@
*/
*/
+
(
void
)
fus_getVerifyPasswordWithPhone
:(
NSString
*
)
phone
+
(
void
)
fus_getVerifyPasswordWithPhone
:(
NSString
*
)
phone
countrycode
:(
NSString
*
)
countrycode
countrycode
:(
NSString
*
)
countrycode
captchaId
:(
NSString
*
)
captchaId
success
:(
void
(
^
)(
void
))
success
success
:(
void
(
^
)(
void
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
failure
:(
void
(
^
)(
NSString
*
,
int
,
NSDictionary
*
))
failure
{
{
if
([
NSString
isNull
:
phone
])
{
if
([
NSString
isNull
:
phone
])
{
FUSLogInfo
(
@"--->获取密码失败,手机号为空"
);
FUSLogInfo
(
@"--->获取密码失败,手机号为空"
);
if
(
failure
)
failure
(
@"参数为空"
,
ERROR_CODE
);
if
(
failure
)
failure
(
@"参数为空"
,
ERROR_CODE
,
nil
);
return
;
return
;
}
}
if
([
NSString
isNull
:
countrycode
])
{
if
([
NSString
isNull
:
countrycode
])
{
FUSLogInfo
(
@"--->获取密码失败,区号为空"
);
FUSLogInfo
(
@"--->获取密码失败,区号为空"
);
if
(
failure
)
failure
(
@"参数错误"
,
ERROR_CODE
);
if
(
failure
)
failure
(
@"参数错误"
,
ERROR_CODE
,
nil
);
return
;
return
;
}
}
...
@@ -218,7 +232,7 @@
...
@@ -218,7 +232,7 @@
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSUserCenterURLs
.
fus_FUS_URL_GET_VERIFY_CODE
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSUserCenterURLs
.
fus_FUS_URL_GET_VERIFY_CODE
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
if
(
success
)
success
();
if
(
success
)
success
();
}
failure
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
}
failure
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
if
(
failure
)
failure
(
FAILURE_MESSAGE
,
code
);
if
(
failure
)
failure
(
FAILURE_MESSAGE
,
code
,
dataDict
);
}];
}];
}
}
...
@@ -820,6 +834,25 @@
...
@@ -820,6 +834,25 @@
if
(
failure
)
failure
(
FAILURE_MESSAGE
,
code
);
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
);
}];
}
/**
/**
同步用户相关数据
同步用户相关数据
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.h
View file @
6f7cc21a
...
@@ -52,6 +52,9 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -52,6 +52,9 @@ NS_ASSUME_NONNULL_BEGIN
// 手机登录/注册
// 手机登录/注册
+
(
NSString
*
)
fus_URL_ACCOUNT_MOBILE_LOGIN
;
+
(
NSString
*
)
fus_URL_ACCOUNT_MOBILE_LOGIN
;
/// 手机登录 新版本
+
(
NSString
*
)
fus_URL_ACCOUNT_mobilePhoneLogin
;
// 退出登录
// 退出登录
+
(
NSString
*
)
fus_URL_LOGIN_OUT_YAZHAI
;
+
(
NSString
*
)
fus_URL_LOGIN_OUT_YAZHAI
;
...
@@ -64,6 +67,12 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -64,6 +67,12 @@ NS_ASSUME_NONNULL_BEGIN
// 第三方注册
// 第三方注册
+
(
NSString
*
)
fus_URL_THIRD_REGIST
;
+
(
NSString
*
)
fus_URL_THIRD_REGIST
;
/// 获取人机图形验证码
+
(
NSString
*
)
fus_URL_getCaptchaCode
;
/// 验证人机图形验证码
+
(
NSString
*
)
fus_URL_checkCaptchaCode
;
// 拉取Scoket消息服务器信息
// 拉取Scoket消息服务器信息
+
(
NSString
*
)
fus_URL_SYNC_SCOKET
;
+
(
NSString
*
)
fus_URL_SYNC_SCOKET
;
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Others/FUSUserCenterURLs.m
View file @
6f7cc21a
...
@@ -63,6 +63,10 @@
...
@@ -63,6 +63,10 @@
+
(
NSString
*
)
fus_URL_ACCOUNT_MOBILE_LOGIN
{
+
(
NSString
*
)
fus_URL_ACCOUNT_MOBILE_LOGIN
{
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/account/mobileLogin.html"
];
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
{
+
(
NSString
*
)
fus_URL_LOGIN_OUT_YAZHAI
{
...
@@ -84,6 +88,15 @@
...
@@ -84,6 +88,15 @@
return
[
FUSConfig
.
sharedInstanced
.
pathConfigs
apiUrl
:
@"/third/reg.html"
];
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消息服务器信息
// 拉取Scoket消息服务器信息
+
(
NSString
*
)
fus_URL_SYNC_SCOKET
{
+
(
NSString
*
)
fus_URL_SYNC_SCOKET
{
...
@@ -543,7 +556,8 @@
...
@@ -543,7 +556,8 @@
// 获取验证码
// 获取验证码
+
(
NSString
*
)
fus_FUS_URL_GET_VERIFY_CODE
{
+
(
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"
];
}
}
// 注册
// 注册
...
...
Pods/Pods.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
6f7cc21a
...
@@ -392,7 +392,7 @@
...
@@ -392,7 +392,7 @@
<
k
e
y
>
SSZipArchive.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
k
e
y
>
SSZipArchive.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
7
7
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
7
4
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
k
e
y
>
SnapKit-SnapKit_Privacy.xcscheme
<
/k
e
y
>
<
k
e
y
>
SnapKit-SnapKit_Privacy.xcscheme
<
/k
e
y
>
<
d
i
c
t
>
<
d
i
c
t
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment