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
356b5d11
authored
Jul 22, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一些小东西
parent
a002e5db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
24 deletions
FuSiLive/Classes/Login/Controller/FUSMessageRegisterViewController.m
FuSiLive/Classes/Login/Controller/FUSMessageRegisterViewController.m
View file @
356b5d11
...
@@ -450,7 +450,7 @@
...
@@ -450,7 +450,7 @@
[
self
fus_getVerifyCodeSucceed
];
[
self
fus_getVerifyCodeSucceed
];
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
[
_
verifyCodeTimer
invalidate
];
[
self
.
verifyCodeTimer
invalidate
];
self
.
verifyCodeTimer
=
nil
;
self
.
verifyCodeTimer
=
nil
;
[
self
setupGetVerifyCodeBtnEnable
:
YES
];
[
self
setupGetVerifyCodeBtnEnable
:
YES
];
...
@@ -459,7 +459,7 @@
...
@@ -459,7 +459,7 @@
[
FUSTalkingData
fus_trackEvent
:
EVENT_REGIST_HAVEREGIST
];
[
FUSTalkingData
fus_trackEvent
:
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
)
{
NSString
*
phone
=
[
_
phoneTextField
.
text
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
NSString
*
phone
=
[
self
.
phoneTextField
.
text
stringByTrimmingCharactersInSet
:[
NSCharacterSet
whitespaceCharacterSet
]];
if
([
NSString
isNull
:
phone
])
{
if
([
NSString
isNull
:
phone
])
{
phone
=
nil
;
phone
=
nil
;
}
}
...
@@ -650,7 +650,7 @@
...
@@ -650,7 +650,7 @@
self
.
phoneTextField
.
text
=
nil
;
self
.
phoneTextField
.
text
=
nil
;
self
.
passwordTextField
.
text
=
nil
;
self
.
passwordTextField
.
text
=
nil
;
[
_
verifyCodeTimer
invalidate
];
[
self
.
verifyCodeTimer
invalidate
];
self
.
verifyCodeTimer
=
nil
;
self
.
verifyCodeTimer
=
nil
;
[
self
setupGetVerifyCodeBtnEnable
:
YES
];
[
self
setupGetVerifyCodeBtnEnable
:
YES
];
...
@@ -736,11 +736,11 @@
...
@@ -736,11 +736,11 @@
// 未同意使用协议
// 未同意使用协议
if
(
!
_agreeBtn
.
selected
)
{
if
(
!
_agreeBtn
.
selected
)
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
FUSAlertView
showAlertWithTitle
:[
NSString
fus_localString
:
@"请先同意使用协议"
]
message
:
nil
cancelButtonTitle
:
[
NSString
fus_localString
:
@"确定"
]
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"取消"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
[
FUSAlertView
showAlertWithTitle
:[
NSString
fus_localString
:
@"请先同意使用协议"
]
message
:
nil
cancelButtonTitle
:
[
NSString
fus_localString
:
@"确定"
]
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"取消"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
0
)
{
if
(
buttonIndex
==
0
)
{
_
agreeBtn
.
selected
=
YES
;
weakSelf
.
agreeBtn
.
selected
=
YES
;
// [_nextButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
// [_nextButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
}
}
}];
}];
...
@@ -769,12 +769,13 @@
...
@@ -769,12 +769,13 @@
sender
.
userInteractionEnabled
=
YES
;
sender
.
userInteractionEnabled
=
YES
;
[
FUSLoadingView
fus_dismissProgressViewWithView
:
self
.
view
];
[
FUSLoadingView
fus_dismissProgressViewWithView
:
self
.
view
];
if
(
code
==
-
103
)
{
if
(
code
==
-
103
)
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
msg
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"换号注册"
],
[
NSString
fus_localString
:
@"登录"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
[
FUSAlertView
showAlertWithTitle
:
nil
message
:
msg
cancelButtonTitle
:
nil
otherButtonTitles
:
@[[
NSString
fus_localString
:
@"换号注册"
],
[
NSString
fus_localString
:
@"登录"
]]
clickBlock
:^
(
NSInteger
buttonIndex
)
{
if
(
buttonIndex
==
0
)
{
if
(
buttonIndex
==
0
)
{
// 清空输入框文字
// 清空输入框文字
_
phoneTextField
.
text
=
@""
;
weakSelf
.
phoneTextField
.
text
=
@""
;
// 让文本框获取焦点,弹出键盘
// 让文本框获取焦点,弹出键盘
[
_
phoneTextField
becomeFirstResponder
];
[
weakSelf
.
phoneTextField
becomeFirstResponder
];
}
else
{
}
else
{
// 点击去登录
// 点击去登录
FUSLoginViewController
*
loginViewCtrl
=
[[
FUSLoginViewController
alloc
]
init
];
FUSLoginViewController
*
loginViewCtrl
=
[[
FUSLoginViewController
alloc
]
init
];
...
@@ -939,18 +940,19 @@
...
@@ -939,18 +940,19 @@
CGFloat
inviteCodeBgviewMaxY
=
CGRectGetMaxY
(
_inviteCodeBgView
.
frame
);
CGFloat
inviteCodeBgviewMaxY
=
CGRectGetMaxY
(
_inviteCodeBgView
.
frame
);
CGFloat
upConstant
=
height
-
(
UIView
.
fus_screenH
-
inviteCodeBgviewMaxY
);
CGFloat
upConstant
=
height
-
(
UIView
.
fus_screenH
-
inviteCodeBgviewMaxY
);
__weak
typeof
(
self
)
weakSelf
=
self
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
_
headeConstraint
.
constant
=
upConstant
>
0
?
31
-
upConstant
:
31
;
weakSelf
.
headeConstraint
.
constant
=
upConstant
>
0
?
31
-
upConstant
:
31
;
[
_
areaBgView
.
superview
layoutIfNeeded
];
[
weakSelf
.
areaBgView
.
superview
layoutIfNeeded
];
}];
}];
}
}
//当键退出时调用
//当键退出时调用
-
(
void
)
keyboardWillHide
:
(
NSNotification
*
)
aNotification
{
-
(
void
)
keyboardWillHide
:
(
NSNotification
*
)
aNotification
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
[
UIView
animateWithDuration
:
0
.
2
animations
:
^
{
_
headeConstraint
.
constant
=
31
;
weakSelf
.
headeConstraint
.
constant
=
31
;
[
_
areaBgView
.
superview
layoutIfNeeded
];
[
weakSelf
.
areaBgView
.
superview
layoutIfNeeded
];
}];
}];
}
}
...
@@ -1092,18 +1094,19 @@
...
@@ -1092,18 +1094,19 @@
获取经纪人名字
获取经纪人名字
*/
*/
-
(
void
)
fus_getAgentName
{
-
(
void
)
fus_getAgentName
{
__weak
typeof
(
self
)
weakSelf
=
self
;
[
FUSLoginHttpHelper
fus_getAgentNameWithID
:
_inviteCodeTextField
.
text
success
:
^
(
NSString
*
name
)
{
[
FUSLoginHttpHelper
fus_getAgentNameWithID
:
_inviteCodeTextField
.
text
success
:
^
(
NSString
*
name
)
{
_
invitePeopleNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:%@"
,[
NSString
fus_localString
:
@"邀请人昵称"
],
name
];
weakSelf
.
invitePeopleNameLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@:%@"
,[
NSString
fus_localString
:
@"邀请人昵称"
],
name
];
// _agentResultSuccess = YES;
// _agentResultSuccess = YES;
_
agentName
=
name
;
weakSelf
.
agentName
=
name
;
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
}
failure
:^
(
NSString
*
msg
,
int
code
)
{
//没有找到用户
//没有找到用户
if
(
code
==
-
11
)
{
if
(
code
==
-
11
)
{
_
invitePeopleNameLabel
.
text
=
[
NSString
fus_localString
:
@"未查询到邀请人"
];
weakSelf
.
invitePeopleNameLabel
.
text
=
[
NSString
fus_localString
:
@"未查询到邀请人"
];
}
}
_
inviteCodeTextField
.
enabled
=
YES
;
weakSelf
.
inviteCodeTextField
.
enabled
=
YES
;
//
_
agentResultSuccess = NO;
//
weakSelf.
agentResultSuccess = NO;
}];
}];
}
}
...
@@ -1132,18 +1135,19 @@
...
@@ -1132,18 +1135,19 @@
_registerBtnTopConstraint
.
constant
=
-
_inviteCodeBgView
.
height
+
18
;
_registerBtnTopConstraint
.
constant
=
-
_inviteCodeBgView
.
height
+
18
;
_invitePeopleNameLabel
.
hidden
=
YES
;
_invitePeopleNameLabel
.
hidden
=
YES
;
}
else
{
// 没有邀请码
}
else
{
// 没有邀请码
__weak
typeof
(
self
)
weakSelf
=
self
;
// 判断设备有没有被注册
// 判断设备有没有被注册
[
FUSLoginHttpHelper
fus_checkDeviceRegistedStatusSuccess
:
^
{
// 无邀请码
[
FUSLoginHttpHelper
fus_checkDeviceRegistedStatusSuccess
:
^
{
// 无邀请码
// 没有注册显示
// 没有注册显示
_
inviteCodeBgView
.
hidden
=
NO
;
weakSelf
.
inviteCodeBgView
.
hidden
=
NO
;
_
registerBtnTopConstraint
.
constant
=
28
;
weakSelf
.
registerBtnTopConstraint
.
constant
=
28
;
_
invitePeopleNameLabel
.
hidden
=
NO
;
weakSelf
.
invitePeopleNameLabel
.
hidden
=
NO
;
_
bindType
=
@"0"
;
weakSelf
.
bindType
=
@"0"
;
}
failure
:
^
(
NSString
*
msg
,
int
code
)
{
}
failure
:
^
(
NSString
*
msg
,
int
code
)
{
// 注册过了不显示
// 注册过了不显示
_
inviteCodeBgView
.
hidden
=
YES
;
weakSelf
.
inviteCodeBgView
.
hidden
=
YES
;
_registerBtnTopConstraint
.
constant
=
-
_
inviteCodeBgView
.
height
+
18
;
weakSelf
.
registerBtnTopConstraint
.
constant
=
-
weakSelf
.
inviteCodeBgView
.
height
+
18
;
_
invitePeopleNameLabel
.
hidden
=
YES
;
weakSelf
.
invitePeopleNameLabel
.
hidden
=
YES
;
}];
}];
}
}
}
}
...
...
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