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
33c40c18
authored
Jun 23, 2025
by
ludi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成注扫码册绑定相关
parent
6524d21c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
197 additions
and
18 deletions
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.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/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/BindAgentVC/FUSAutoBindHelper.swift
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/BindAgentVC/FUSBindAgentViewController.swift
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHttpHelper.m
DevelopmentPods/FUSCommon/FUSCommon/Classes/FUSAPPConfigs/FUSFuSiConfigs.m
View file @
33c40c18
...
...
@@ -77,12 +77,12 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
/// App Version
-
(
NSString
*
)
appVersion
{
return
@"77
01
"
;
return
@"77
30
"
;
}
/// App Dot Version
-
(
NSString
*
)
appDotVersion
{
return
@"7.7.
0.1
"
;
return
@"7.7.
3.0
"
;
}
/// App Id
...
...
Modules/FUSChatCenterModule/FUSChatCenterModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
33c40c18
...
...
@@ -7,12 +7,12 @@
<
k
e
y
>
FUSChatCenterBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
8
2
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
8
3
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
FUSChatCenterModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
8
3
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
8
1
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
Modules/FUSShowRoomModule/FUSShowRoomModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
33c40c18
...
...
@@ -7,12 +7,12 @@
<
k
e
y
>
FUSShowRoomBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
79
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
80
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
k
e
y
>
FUSShowRoomModule.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
8
1
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
8
2
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule.xcodeproj/xcuserdata/aaa.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
33c40c18
...
...
@@ -12,7 +12,7 @@
<
k
e
y
>
FUSUserCenterModuleBundle.xcscheme_
^#
shared
#^
_
<
/k
e
y
>
<
d
i
c
t
>
<
k
e
y
>
orderHint
<
/k
e
y
>
<
int
e
g
e
r
>
80
<
/int
e
g
e
r
>
<
int
e
g
e
r
>
79
<
/int
e
g
e
r
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
<
/
d
i
c
t
>
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/BindAgentVC/FUSAutoBindHelper.swift
View file @
33c40c18
...
...
@@ -11,6 +11,7 @@ import FUSFoundation
import
FUSCommon
import
RxSwift
import
RxCocoa
import
SwiftyJSON
private
let
FUSAutoBindHelperFirstCallUDKey
=
"FUSAutoBindHelperFirstCallUDKey"
...
...
@@ -57,7 +58,7 @@ private let FUSAutoBindHelperFirstCallUDKey = "FUSAutoBindHelperFirstCallUDKey"
// 自动绑定回调
if
cid
==
FUSJsWebCidType
.
typeAutoBind
.
rawValue
{
FUSLog
.
info
(
"----autoBind:
\(
dataDict
?
.
description
??
""
)
"
)
FUSLog
.
info
(
"----autoBind:
\(
JSON
(
dataDict
??
[])
.
rawString
()
??
""
)
"
)
let
cid
=
(
dataDict
?[
"channelId"
]
as?
String
)
??
""
let
agentCode
=
(
dataDict
?[
"agentUid"
]
as?
String
)
??
""
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/BindAgentVC/FUSBindAgentViewController.swift
View file @
33c40c18
...
...
@@ -517,7 +517,8 @@ import FUSCommon
FUSRegisteredBindAgentInfoAlertView
.
fus_show
(
model
)
{[
weak
self
]
in
let
showErrorHandle
:
((
String
?,
Int
)
->
Void
)
=
{
errorMsg
,
code
in
// 有错误信息
if
let
errorMsg
=
errorMsg
{
if
let
errorMsg
=
errorMsg
,
errorMsg
.
count
>
0
{
FUSAlertView
.
showAlert
(
withTitle
:
.
fus_versionLocalString
(
"绑定使者"
),
message
:
errorMsg
,
cancelButtonTitle
:
.
fus_localString
(
"确认"
),
otherButtonTitles
:
nil
)
{[
weak
self
]
_
in
completed
(
false
)
// 如果哪天gcp说,注册的时候,扫使者码出来了,然后点确认,注册失败了,就得返回注册页面,那么就在这里,把ff_startCamera换成pop
...
...
Modules/FUSUserCenterModule/FUSUserCenterModule/Features/Login/Other/FUSLoginHttpHelper.m
View file @
33c40c18
...
...
@@ -255,6 +255,39 @@
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
getReferralCode
:(
void
(
^
)(
void
(
^
getReferralCodeHandler
)(
NSString
*
)))
getReferralCode
{
// agentcode现在已经默认不显示了,直接使用指纹的
[
FUSLoginHttpHelper
fus_handleVerifyCodeWithSMSCode
:
smsCode
phone
:
phone
password:
pwd
countryCode:
countryCode
inviteCode:
inviteCode
agentcode:
[
FUSCacheDataShare
shareStore
].
agentCode
?:
@""
bindType:
bindType
referralCode
:
referralCode
skip:
0
origin:
[
FUSCacheDataShare
shareStore
].
origin
originType:
[
FUSCacheDataShare
shareStore
].
originType
success:
success
failure:
failure
getReferralCode:
getReferralCode
];
}
/// 增加一些内部可以确定的数据
+
(
void
)
fus_handleVerifyCodeWithSMSCode
:(
NSString
*
)
smsCode
phone
:(
NSString
*
)
phone
password
:(
NSString
*
)
pwd
countryCode
:(
NSString
*
)
countryCode
inviteCode
:(
NSString
*
)
inviteCode
agentcode
:(
NSString
*
)
agentcode
bindType
:(
NSString
*
)
bindType
referralCode
:(
NSString
*
)
referralCode
skip
:(
NSInteger
)
skip
origin
:(
NSString
*
)
origin
originType
:(
NSString
*
)
originType
success
:(
void
(
^
)(
NSDictionary
*
dataDic
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
getReferralCode
:(
void
(
^
)(
void
(
^
getReferralCodeHandler
)(
NSString
*
)))
getReferralCode
{
if
([
NSString
isNull
:
countryCode
])
{
if
(
failure
)
failure
([
NSString
fus_localString
:
@"验证码错误,请重新输入"
],
ERROR_CODE
);
return
;
...
...
@@ -278,24 +311,75 @@
@"pwd"
:
pwd
,
@"countrycode"
:
countryCode
,
@"invcode"
:
inviteCode
,
@"agentCode"
:
agentcode
,
@"agentCode"
:
agentcode
?:
@""
,
@"bindType"
:
bindType
,
@"skip"
:
@
(
skip
)
}];
if
(
!
[
NSString
isNull
:
referralCode
])
{
params
[
@"referralCode"
]
=
referralCode
;
}
if
(
!
[
NSString
isNull
:
origin
])
{
params
[
@"origin"
]
=
origin
;
}
if
(
!
[
NSString
isNull
:
originType
])
{
params
[
@"originType"
]
=
originType
;
}
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSUserCenterURLs
.
fus_FUS_URL_VERIFY_CODE
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
// 注册完成后,使者类型的全清除掉
[
FUSCacheDataShare
shareStore
].
origin
=
nil
;
[
FUSCacheDataShare
shareStore
].
originType
=
nil
;
[
FUSCacheDataShare
shareStore
].
agentCode
=
nil
;
if
(
success
)
success
(
dataDict
);
}
failure
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
if
(
code
==
-
911
&&
getReferralCode
)
{
getReferralCode
(
^
(
NSString
*
rltCode
){
[
FUSLoginHttpHelper
fus_verifyCodeWithSMSCode
:
smsCode
phone
:
phone
password
:
pwd
countryCode
:
countryCode
inviteCode
:
inviteCode
agentcode
:
agentcode
bindType
:
bindType
referralCode
:
rltCode
success
:
success
failure
:
failure
getReferralCode
:
getReferralCode
];
});
if
(
code
==
-
911
&&
skip
==
0
)
{
// 中国大陆逻辑,需要扫描邀请
__block
NSString
*
backErrorMsg
=
FAILURE_MESSAGE
;
__block
int
backErrorCode
=
code
;
// 进入扫码页面,直接隐藏菊花
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSRouter
.
userRouter
fus_showRegisterBindAgentPageWithRegisterVerify
:
^
(
FUSAccountAgentcodeVerifyModel
*
_Nonnull
verifyModel
,
void
(
^
_Nonnull
errorHandle
)(
NSString
*
_Nonnull
,
NSInteger
))
{
// 扫到使者,并且点击了确认
[
FUSLoadingView
fus_showProgressViewWithMessage
:
nil
canTouchBottomView
:
YES
];
// 再次进行原路信息注册
[
FUSLoginHttpHelper
fus_handleVerifyCodeWithSMSCode
:
smsCode
phone
:
phone
password
:
pwd
countryCode
:
countryCode
inviteCode
:
inviteCode
agentcode
:
verifyModel
.
info
.
uid
bindType
:
@""
referralCode
:
referralCode
skip
:
0
origin
:
verifyModel
.
origin
originType
:
@"2"
success
:^
(
NSDictionary
*
dataDict2
)
{
[
FUSLoadingView
fus_dismissProgressView
];
errorHandle
(
@""
,
0
);
success
(
dataDict2
);
}
failure
:^
(
NSString
*
msg2
,
int
code2
)
{
// 注册失败,提示给扫码页面,让其再提示注册失败信息,并且进行继续扫码
[
FUSLoadingView
fus_dismissProgressView
];
errorHandle
(
msg2
,
code2
);
backErrorMsg
=
msg2
;
backErrorCode
=
code2
;
}
getReferralCode
:
getReferralCode
];
}
skip
:
^
(
void
(
^
_Nonnull
dismissHandle
)(
void
))
{
// 跳过的逻辑,跳过是没有来源类型的
[
FUSLoadingView
fus_showProgressViewWithMessage
:
nil
canTouchBottomView
:
YES
];
[
FUSLoginHttpHelper
fus_handleVerifyCodeWithSMSCode
:
smsCode
phone
:
phone
password
:
pwd
countryCode
:
countryCode
inviteCode
:
inviteCode
agentcode
:
agentcode
bindType
:
bindType
referralCode
:
referralCode
skip
:
1
origin
:
origin
originType
:
originType
success
:^
(
NSDictionary
*
dataDict2
)
{
[
FUSLoadingView
fus_dismissProgressView
];
success
(
dataDict2
);
}
failure
:^
(
NSString
*
msg2
,
int
code2
)
{
[
FUSLoadingView
fus_dismissProgressView
];
backErrorMsg
=
msg2
;
backErrorCode
=
code2
;
dismissHandle
();
}
getReferralCode
:
getReferralCode
];
}
back
:^
{
failure
(
backErrorMsg
,
backErrorCode
);
}];
}
else
{
if
(
failure
)
failure
(
FAILURE_MESSAGE
,
code
);
}
}];
}
...
...
@@ -458,6 +542,42 @@
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
getReferralCode
:(
void
(
^
)(
void
(
^
getReferralCodeHandler
)(
NSString
*
)))
getReferralCode
{
[
FUSLoginHttpHelper
fus_handleSocialPlatformLoginWithPlatform
:
platform
openid
:
openid
authToken:
authToken
authSecret:
authSecret
facepath:
facepath
sex:
sex
nickname:
nickname
agentCode:
agentCode
bindType:
bindType
referralCode:
referralCode
skip:
0
origin:
[
FUSCacheDataShare
shareStore
].
origin
originType:
[
FUSCacheDataShare
shareStore
].
originType
success:
success
failure:
failure
getReferralCode:
getReferralCode
];
}
/// 增加一些内部可以确定的数据
+
(
void
)
fus_handleSocialPlatformLoginWithPlatform
:(
NSString
*
)
platform
openid
:(
NSString
*
)
openid
authToken
:(
NSString
*
)
authToken
authSecret
:(
NSString
*
)
authSecret
facepath
:(
NSString
*
)
facepath
sex
:(
int
)
sex
nickname
:(
NSString
*
)
nickname
agentCode
:(
NSString
*
)
agentCode
bindType
:(
NSString
*
)
bindType
referralCode
:(
NSString
*
)
referralCode
skip
:(
NSInteger
)
skip
origin
:(
NSString
*
)
origin
originType
:(
NSString
*
)
originType
success
:(
void
(
^
)(
NSDictionary
*
))
success
failure
:(
void
(
^
)(
NSString
*
msg
,
int
code
))
failure
getReferralCode
:(
void
(
^
)(
void
(
^
getReferralCodeHandler
)(
NSString
*
)))
getReferralCode
{
// 空值判断
if
([
NSString
isNull
:
platform
])
{
if
(
failure
)
failure
(
@"参数错误"
,
ERROR_CODE
);
...
...
@@ -482,8 +602,22 @@
if
(
!
[
NSString
isNull
:
referralCode
])
{
params
[
@"referralCode"
]
=
referralCode
;
}
params
[
@"skip"
]
=
@
(
skip
);
if
(
!
[
NSString
isNull
:
origin
])
{
params
[
@"origin"
]
=
origin
;
}
if
(
!
[
NSString
isNull
:
originType
])
{
params
[
@"originType"
]
=
originType
;
}
[
FUSHttpHelper
postRequestBinaryWithUrl
:
FUSUserCenterURLs
.
fus_FUS_URL_SOCIAL_LOG_IN
params
:
params
success
:^
(
NSDictionary
*
dataDict
,
int
code
)
{
// 注册完成后,使者类型的全清除掉
[
FUSCacheDataShare
shareStore
].
origin
=
nil
;
[
FUSCacheDataShare
shareStore
].
originType
=
nil
;
[
FUSCacheDataShare
shareStore
].
agentCode
=
nil
;
// 解析数据
NSString
*
phone
=
[
NSString
stringWithObject
:[
dataDict
objectForKey
:
@"phone"
]];
NSString
*
uid
=
[
NSString
stringWithObject
:[
dataDict
objectForKey
:
@"uid"
]];
...
...
@@ -507,16 +641,59 @@
}
failure
:^
(
NSDictionary
*
dataDict
,
int
errorCode
)
{
if
(
errorCode
==
-
911
&&
getReferralCode
)
{
getReferralCode
(
^
(
NSString
*
rltCode
){
[
FUSLoginHttpHelper
fus_socialPlatformLoginWithPlatform
:
platform
openid
:
openid
authToken
:
authToken
authSecret
:
authSecret
facepath
:
facepath
sex
:
sex
nickname
:
nickname
agentCode
:
agentCode
bindType
:
bindType
referralCode
:
rltCode
success
:
success
failure
:
failure
getReferralCode
:
getReferralCode
];
if
(
errorCode
==
-
911
&&
skip
==
0
&&
[
dataDict
[
@"inReg"
]
intValue
]
==
1
)
{
// 中国大陆逻辑,需要扫描邀请
__block
NSString
*
backErrorMsg
=
FAILURE_MESSAGE
;
__block
int
backErrorCode
=
errorCode
;
NSTimeInterval
delayInt
=
0
;
if
([
platform
isEqualToString
:[
NSString
stringWithFormat
:
@"%ld"
,
PlatformGoogle
]])
{
// 谷歌是persent的,并且立马就回调,导致顶层视窗错误,这样会让新推出的扫码页面推不出来
delayInt
=
0
.
35
;
}
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
delayInt
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
// 进入扫码页面,直接隐藏菊花
[
FUSLoadingView
fus_dismissProgressView
];
[
FUSRouter
.
userRouter
fus_showRegisterBindAgentPageWithRegisterVerify
:
^
(
FUSAccountAgentcodeVerifyModel
*
_Nonnull
verifyModel
,
void
(
^
_Nonnull
errorHandle
)(
NSString
*
_Nonnull
,
NSInteger
))
{
// 扫到使者,并且点击了确认
[
FUSLoadingView
fus_showProgressViewWithMessage
:
nil
canTouchBottomView
:
YES
];
// 再次进行原路信息注册
[
FUSLoginHttpHelper
fus_handleSocialPlatformLoginWithPlatform
:
platform
openid
:
openid
authToken
:
authToken
authSecret
:
authSecret
facepath
:
facepath
sex
:
sex
nickname
:
nickname
agentCode
:
verifyModel
.
info
.
uid
bindType
:
@""
referralCode
:
referralCode
skip
:
0
origin
:
verifyModel
.
origin
originType
:
@"2"
success
:^
(
NSDictionary
*
dataDict2
)
{
[
FUSLoadingView
fus_dismissProgressView
];
errorHandle
(
@""
,
0
);
success
(
dataDict2
);
}
failure
:^
(
NSString
*
msg2
,
int
code2
)
{
// 注册失败,提示给扫码页面,让其再提示注册失败信息,并且进行继续扫码
[
FUSLoadingView
fus_dismissProgressView
];
errorHandle
(
msg2
,
code2
);
backErrorMsg
=
msg2
;
backErrorCode
=
code2
;
}
getReferralCode
:
getReferralCode
];
}
skip
:
^
(
void
(
^
_Nonnull
dismissHandle
)(
void
))
{
// 跳过的逻辑,跳过是没有来源类型的
[
FUSLoadingView
fus_showProgressViewWithMessage
:
nil
canTouchBottomView
:
YES
];
[
FUSLoginHttpHelper
fus_handleSocialPlatformLoginWithPlatform
:
platform
openid
:
openid
authToken
:
authToken
authSecret
:
authSecret
facepath
:
facepath
sex
:
sex
nickname
:
nickname
agentCode
:
agentCode
bindType
:
bindType
referralCode
:
referralCode
skip
:
1
origin
:
origin
originType
:
originType
success
:^
(
NSDictionary
*
dataDict2
)
{
[
FUSLoadingView
fus_dismissProgressView
];
success
(
dataDict2
);
}
failure
:^
(
NSString
*
msg2
,
int
code2
)
{
[
FUSLoadingView
fus_dismissProgressView
];
backErrorMsg
=
msg2
;
backErrorCode
=
code2
;
dismissHandle
();
}
getReferralCode
:
getReferralCode
];
}
back
:^
{
failure
(
backErrorMsg
,
backErrorCode
);
}];
});
}
else
{
if
(
failure
)
failure
(
FAILURE_MESSAGE
,
errorCode
);
}
}];
}
/**
...
...
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