Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FastService
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AppWaiBao
FastService
Commits
4d06bec2
Commit
4d06bec2
authored
Feb 04, 2024
by
xuning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
忘记密码
parent
6a62d1f5
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
497 additions
and
14 deletions
+497
-14
project.pbxproj
FastService.xcodeproj/project.pbxproj
+12
-0
UserInterfaceState.xcuserstate
...serdata/xuning.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
XVBaseViewController.m
FastService/Base/Controller/XVBaseViewController.m
+2
-0
XVLoginViewController.m
FastService/Login/Controller/XVLoginViewController.m
+15
-2
XVPasswordViewController.h
FastService/Login/Controller/XVPasswordViewController.h
+17
-0
XVPasswordViewController.m
FastService/Login/Controller/XVPasswordViewController.m
+154
-0
XVRegisterViewController.h
FastService/Login/Controller/XVRegisterViewController.h
+17
-0
XVRegisterViewController.m
FastService/Login/Controller/XVRegisterViewController.m
+266
-0
XVInputFieldView.m
FastService/Login/View/XVInputFieldView.m
+1
-1
PrefixHeader.pch
FastService/PrefixHeader.pch
+13
-11
No files found.
FastService.xcodeproj/project.pbxproj
View file @
4d06bec2
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
7981EABA2B6E670200F357E7
/* UIView+XVAdd.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EAB92B6E670200F357E7
/* UIView+XVAdd.m */
;
};
7981EABA2B6E670200F357E7
/* UIView+XVAdd.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EAB92B6E670200F357E7
/* UIView+XVAdd.m */
;
};
7981EABD2B6E675F00F357E7
/* NSString+XVAdd.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EABC2B6E675F00F357E7
/* NSString+XVAdd.m */
;
};
7981EABD2B6E675F00F357E7
/* NSString+XVAdd.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EABC2B6E675F00F357E7
/* NSString+XVAdd.m */
;
};
7981EAC42B6E800900F357E7
/* XVInputFieldView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EAC22B6E800900F357E7
/* XVInputFieldView.m */
;
};
7981EAC42B6E800900F357E7
/* XVInputFieldView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EAC22B6E800900F357E7
/* XVInputFieldView.m */
;
};
7981EAC72B6F41B000F357E7
/* XVRegisterViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EAC62B6F41B000F357E7
/* XVRegisterViewController.m */
;
};
7981EACA2B6F59E800F357E7
/* XVPasswordViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
7981EAC92B6F59E800F357E7
/* XVPasswordViewController.m */
;
};
799DF0C62B6BD8AF00680907
/* AppDelegate.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
799DF0C52B6BD8AF00680907
/* AppDelegate.m */
;
};
799DF0C62B6BD8AF00680907
/* AppDelegate.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
799DF0C52B6BD8AF00680907
/* AppDelegate.m */
;
};
799DF0D12B6BD8B100680907
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
799DF0D02B6BD8B100680907
/* Assets.xcassets */
;
};
799DF0D12B6BD8B100680907
/* Assets.xcassets in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
799DF0D02B6BD8B100680907
/* Assets.xcassets */
;
};
799DF0D42B6BD8B100680907
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
799DF0D22B6BD8B100680907
/* LaunchScreen.storyboard */
;
};
799DF0D42B6BD8B100680907
/* LaunchScreen.storyboard in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
799DF0D22B6BD8B100680907
/* LaunchScreen.storyboard */
;
};
...
@@ -41,6 +43,10 @@
...
@@ -41,6 +43,10 @@
7981EABC2B6E675F00F357E7
/* NSString+XVAdd.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"NSString+XVAdd.m"
;
sourceTree
=
"<group>"
;
};
7981EABC2B6E675F00F357E7
/* NSString+XVAdd.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
"NSString+XVAdd.m"
;
sourceTree
=
"<group>"
;
};
7981EAC22B6E800900F357E7
/* XVInputFieldView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
XVInputFieldView.m
;
sourceTree
=
"<group>"
;
};
7981EAC22B6E800900F357E7
/* XVInputFieldView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
XVInputFieldView.m
;
sourceTree
=
"<group>"
;
};
7981EAC32B6E800900F357E7
/* XVInputFieldView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
XVInputFieldView.h
;
sourceTree
=
"<group>"
;
};
7981EAC32B6E800900F357E7
/* XVInputFieldView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
XVInputFieldView.h
;
sourceTree
=
"<group>"
;
};
7981EAC52B6F41B000F357E7
/* XVRegisterViewController.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
XVRegisterViewController.h
;
sourceTree
=
"<group>"
;
};
7981EAC62B6F41B000F357E7
/* XVRegisterViewController.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
XVRegisterViewController.m
;
sourceTree
=
"<group>"
;
};
7981EAC82B6F59E800F357E7
/* XVPasswordViewController.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
XVPasswordViewController.h
;
sourceTree
=
"<group>"
;
};
7981EAC92B6F59E800F357E7
/* XVPasswordViewController.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
XVPasswordViewController.m
;
sourceTree
=
"<group>"
;
};
799DF0C12B6BD8AF00680907
/* fastservice.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
fastservice.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
799DF0C12B6BD8AF00680907
/* fastservice.app */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.application
;
includeInIndex
=
0
;
path
=
fastservice.app
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
799DF0C42B6BD8AF00680907
/* AppDelegate.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AppDelegate.h
;
sourceTree
=
"<group>"
;
};
799DF0C42B6BD8AF00680907
/* AppDelegate.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
AppDelegate.h
;
sourceTree
=
"<group>"
;
};
799DF0C52B6BD8AF00680907
/* AppDelegate.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AppDelegate.m
;
sourceTree
=
"<group>"
;
};
799DF0C52B6BD8AF00680907
/* AppDelegate.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
AppDelegate.m
;
sourceTree
=
"<group>"
;
};
...
@@ -256,6 +262,10 @@
...
@@ -256,6 +262,10 @@
children
=
(
children
=
(
799DF1182B6D2B3200680907
/* XVLoginViewController.h */
,
799DF1182B6D2B3200680907
/* XVLoginViewController.h */
,
799DF1192B6D2B3200680907
/* XVLoginViewController.m */
,
799DF1192B6D2B3200680907
/* XVLoginViewController.m */
,
7981EAC52B6F41B000F357E7
/* XVRegisterViewController.h */
,
7981EAC62B6F41B000F357E7
/* XVRegisterViewController.m */
,
7981EAC82B6F59E800F357E7
/* XVPasswordViewController.h */
,
7981EAC92B6F59E800F357E7
/* XVPasswordViewController.m */
,
);
);
path
=
Controller
;
path
=
Controller
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -404,8 +414,10 @@
...
@@ -404,8 +414,10 @@
7981EAB72B6E669000F357E7
/* UIScrollView+XVAdd.m in Sources */
,
7981EAB72B6E669000F357E7
/* UIScrollView+XVAdd.m in Sources */
,
799DF1042B6D220300680907
/* XVBaseViewController.m in Sources */
,
799DF1042B6D220300680907
/* XVBaseViewController.m in Sources */
,
799DF0C62B6BD8AF00680907
/* AppDelegate.m in Sources */
,
799DF0C62B6BD8AF00680907
/* AppDelegate.m in Sources */
,
7981EAC72B6F41B000F357E7
/* XVRegisterViewController.m in Sources */
,
799DF1112B6D25B400680907
/* NSObject+SXRuntime.m in Sources */
,
799DF1112B6D25B400680907
/* NSObject+SXRuntime.m in Sources */
,
7981EABA2B6E670200F357E7
/* UIView+XVAdd.m in Sources */
,
7981EABA2B6E670200F357E7
/* UIView+XVAdd.m in Sources */
,
7981EACA2B6F59E800F357E7
/* XVPasswordViewController.m in Sources */
,
7981EABD2B6E675F00F357E7
/* NSString+XVAdd.m in Sources */
,
7981EABD2B6E675F00F357E7
/* NSString+XVAdd.m in Sources */
,
799DF0F72B6BDA1400680907
/* BRPlaceholderTextView.m in Sources */
,
799DF0F72B6BDA1400680907
/* BRPlaceholderTextView.m in Sources */
,
799DF0F82B6BDA1400680907
/* NSString+Unicode.m in Sources */
,
799DF0F82B6BDA1400680907
/* NSString+Unicode.m in Sources */
,
...
...
FastService.xcworkspace/xcuserdata/xuning.xcuserdatad/UserInterfaceState.xcuserstate
View file @
4d06bec2
No preview for this file type
FastService/Base/Controller/XVBaseViewController.m
View file @
4d06bec2
...
@@ -17,6 +17,8 @@
...
@@ -17,6 +17,8 @@
-
(
void
)
viewDidLoad
{
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
[
super
viewDidLoad
];
self
.
edgesForExtendedLayout
=
UIRectEdgeNone
;
self
.
view
.
backgroundColor
=
DEFAULT_BACKGROUND_COLOR
;
self
.
view
.
backgroundColor
=
DEFAULT_BACKGROUND_COLOR
;
//ctrl + i 格式化
//ctrl + i 格式化
// 设置导航栏默认的背景颜色
// 设置导航栏默认的背景颜色
...
...
FastService/Login/Controller/XVLoginViewController.m
View file @
4d06bec2
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
//
//
#import "XVLoginViewController.h"
#import "XVLoginViewController.h"
#import "XVRegisterViewController.h"
#import "XVPasswordViewController.h"
#import "XVInputFieldView.h"
#import "XVInputFieldView.h"
@interface
XVLoginViewController
()
@interface
XVLoginViewController
()
...
@@ -53,7 +55,7 @@
...
@@ -53,7 +55,7 @@
[
self
.
view
addSubview
:
self
.
containerView
];
[
self
.
view
addSubview
:
self
.
containerView
];
[
self
.
containerView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
containerView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
view
).
mas_offset
(
120
*
heightScale
);
make
.
top
.
mas_equalTo
(
self
.
view
).
mas_offset
(
(
120
-
KTOP_HEIGHT
)
*
heightScale
);
make
.
left
.
right
.
bottom
.
mas_equalTo
(
self
.
view
);
make
.
left
.
right
.
bottom
.
mas_equalTo
(
self
.
view
);
}];
}];
[
self
.
view
layoutIfNeeded
];
[
self
.
view
layoutIfNeeded
];
...
@@ -158,7 +160,7 @@
...
@@ -158,7 +160,7 @@
-
(
UILabel
*
)
titleLabel
{
-
(
UILabel
*
)
titleLabel
{
if
(
_titleLabel
==
nil
)
{
if
(
_titleLabel
==
nil
)
{
_titleLabel
=
[[
UILabel
alloc
]
initWithText
:
@"登录骑手账号"
textColor
:
F
ONT_1
_COLOR
textAlignment
:
NSTextAlignmentLeft
fontSize
:
24
];
_titleLabel
=
[[
UILabel
alloc
]
initWithText
:
@"登录骑手账号"
textColor
:
F
_3D3B4F
_COLOR
textAlignment
:
NSTextAlignmentLeft
fontSize
:
24
];
}
}
return
_titleLabel
;
return
_titleLabel
;
}
}
...
@@ -211,6 +213,11 @@
...
@@ -211,6 +213,11 @@
if
(
_forgetButton
==
nil
)
{
if
(
_forgetButton
==
nil
)
{
_forgetButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"忘记密码"
fontSize
:
14
titleColor
:
BLUE_COLOR
normalImageName
:
@"right"
selectedImgName
:
@"right"
backgroundColor
:
[
UIColor
whiteColor
]];
_forgetButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"忘记密码"
fontSize
:
14
titleColor
:
BLUE_COLOR
normalImageName
:
@"right"
selectedImgName
:
@"right"
backgroundColor
:
[
UIColor
whiteColor
]];
[
_forgetButton
setForceRightToLeft
:
0
forState
:
UIControlStateNormal
];
[
_forgetButton
setForceRightToLeft
:
0
forState
:
UIControlStateNormal
];
WS
(
weakSelf
);
[
_forgetButton
addBlockForControlEvents
:
UIControlEventTouchUpInside
block
:
^
(
id
_Nonnull
sender
)
{
XVPasswordViewController
*
vc
=
[[
XVPasswordViewController
alloc
]
init
];
[
weakSelf
.
navigationController
pushViewController
:
vc
animated
:
YES
];
}];
}
}
return
_forgetButton
;
return
_forgetButton
;
...
@@ -219,6 +226,12 @@
...
@@ -219,6 +226,12 @@
-
(
UIButton
*
)
registerButton
{
-
(
UIButton
*
)
registerButton
{
if
(
_registerButton
==
nil
)
{
if
(
_registerButton
==
nil
)
{
_registerButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"注册账号"
fontSize
:
14
titleColor
:
kHexRGB
(
0x3D3B4F
)
bgColor
:
[
UIColor
whiteColor
]];
_registerButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"注册账号"
fontSize
:
14
titleColor
:
kHexRGB
(
0x3D3B4F
)
bgColor
:
[
UIColor
whiteColor
]];
WS
(
weakSelf
);
[
_registerButton
addBlockForControlEvents
:
UIControlEventTouchUpInside
block
:
^
(
id
_Nonnull
sender
)
{
XVRegisterViewController
*
registerVc
=
[[
XVRegisterViewController
alloc
]
init
];
[
weakSelf
presentViewController
:
registerVc
animated
:
YES
completion
:
nil
];
}];
}
}
return
_registerButton
;
return
_registerButton
;
}
}
...
...
FastService/Login/Controller/XVPasswordViewController.h
0 → 100644
View file @
4d06bec2
//
// XVPasswordViewController.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface
XVPasswordViewController
:
XVBaseViewController
@end
NS_ASSUME_NONNULL_END
FastService/Login/Controller/XVPasswordViewController.m
0 → 100644
View file @
4d06bec2
//
// XVPasswordViewController.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVPasswordViewController.h"
#import "XVInputFieldView.h"
@interface
XVPasswordViewController
()
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
// 手机号
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
phoneView
;
// 验证码
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
smsCodeView
;
// 图片验证码
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
imgCodeView
;
// 密码
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
passwordView
;
@property
(
nonatomic
,
strong
)
UILabel
*
tipLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
sureButton
;
@end
@implementation
XVPasswordViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
[
self
setupUI
];
}
-
(
void
)
setupUI
{
[
self
.
view
addSubview
:
self
.
titleLabel
];
[
self
.
titleLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
top
.
mas_equalTo
(
self
.
view
).
mas_offset
(
30
);
}];
[
self
.
view
addSubview
:
self
.
phoneView
];
[
self
.
phoneView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
titleLabel
.
mas_bottom
).
mas_offset
(
29
);
make
.
left
.
mas_equalTo
(
self
.
view
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
view
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
view
addSubview
:
self
.
smsCodeView
];
[
self
.
smsCodeView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
phoneView
.
mas_bottom
).
mas_offset
(
31
);
make
.
left
.
mas_equalTo
(
self
.
view
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
view
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
view
addSubview
:
self
.
imgCodeView
];
[
self
.
imgCodeView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
smsCodeView
.
mas_bottom
).
mas_offset
(
31
);
make
.
left
.
mas_equalTo
(
self
.
view
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
view
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
view
addSubview
:
self
.
passwordView
];
[
self
.
passwordView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
imgCodeView
.
mas_bottom
).
mas_offset
(
31
);
make
.
left
.
mas_equalTo
(
self
.
view
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
view
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
view
addSubview
:
self
.
tipLabel
];
[
self
.
tipLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
left
.
mas_equalTo
(
self
.
passwordView
).
mas_offset
(
8
);
}];
[
self
.
view
addSubview
:
self
.
sureButton
];
[
self
.
sureButton
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
self
.
view
).
mas_offset
(
66
);
make
.
right
.
mas_equalTo
(
self
.
view
).
mas_offset
(
-
66
);
make
.
height
.
mas_equalTo
(
44
);
make
.
top
.
mas_equalTo
(
self
.
passwordView
.
mas_bottom
).
mas_offset
(
64
);
}];
kViewBorderRadius
(
self
.
sureButton
,
10
,
0
,
[
UIColor
clearColor
]);
}
-
(
UILabel
*
)
titleLabel
{
if
(
_titleLabel
==
nil
)
{
_titleLabel
=
[[
UILabel
alloc
]
initWithText
:
@"找回密码"
textColor
:
F_3D3B4F_COLOR
textAlignment
:
NSTextAlignmentLeft
fontSize
:
24
];
}
return
_titleLabel
;
}
//
-
(
XVInputFieldView
*
)
phoneView
{
if
(
_phoneView
==
nil
)
{
_phoneView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypeSmsCode
placeholder
:
@"请输入手机号"
];
}
return
_phoneView
;
}
-
(
XVInputFieldView
*
)
smsCodeView
{
if
(
_smsCodeView
==
nil
)
{
_smsCodeView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypeNumber
placeholder
:
@"请输入验证码"
];
}
return
_smsCodeView
;
}
-
(
XVInputFieldView
*
)
imgCodeView
{
if
(
_imgCodeView
==
nil
)
{
_imgCodeView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypeSmsCode
placeholder
:
@"请输入图片验证码"
];
}
return
_imgCodeView
;
}
-
(
XVInputFieldView
*
)
passwordView
{
if
(
_passwordView
==
nil
)
{
_passwordView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypePassword
placeholder
:
@"请设置登录密码"
];
}
return
_passwordView
;
}
-
(
UILabel
*
)
tipLabel
{
if
(
_tipLabel
==
nil
)
{
_tipLabel
=
[[
UILabel
alloc
]
initWithText
:
@"密码长度6-20位"
textColor
:
BB_3_COLOR
textAlignment
:
(
NSTextAlignmentLeft
)
fontSize
:
10
];
}
return
_tipLabel
;
}
-
(
UIButton
*
)
sureButton
{
if
(
_sureButton
==
nil
)
{
_sureButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"确定"
fontSize
:
16
titleColor
:
[
UIColor
whiteColor
]
bgColor
:
COLOR_THEMEGRENN
];
WS
(
weakSelf
);
[
_sureButton
addBlockForControlEvents
:
UIControlEventTouchUpInside
block
:
^
(
id
_Nonnull
sender
)
{
}];
}
return
_sureButton
;
}
@end
FastService/Login/Controller/XVRegisterViewController.h
0 → 100644
View file @
4d06bec2
//
// XVRegisterViewController.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface
XVRegisterViewController
:
XVBaseViewController
@end
NS_ASSUME_NONNULL_END
FastService/Login/Controller/XVRegisterViewController.m
0 → 100644
View file @
4d06bec2
//
// XVRegisterViewController.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVRegisterViewController.h"
#import "XVInputFieldView.h"
@interface
XVRegisterViewController
()
@property
(
nonatomic
,
strong
)
UIView
*
containerView
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UIButton
*
accountButton
;
@property
(
nonatomic
,
strong
)
UIButton
*
registerButton
;
// 手机号
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
phoneView
;
// 验证码
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
smsCodeView
;
// 图片验证码
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
imgCodeView
;
// 密码
@property
(
nonatomic
,
strong
)
XVInputFieldView
*
passwordView
;
@property
(
nonatomic
,
strong
)
YYLabel
*
protocolLabel
;
@end
@implementation
XVRegisterViewController
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
view
.
backgroundColor
=
COLOR_THEMEGRENN
;
[
self
setupUI
];
}
-
(
void
)
setupUI
{
[
self
.
view
addSubview
:
self
.
containerView
];
[
self
.
containerView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
view
).
mas_offset
(
120
*
heightScale
);
make
.
left
.
right
.
bottom
.
mas_equalTo
(
self
.
view
);
}];
[
self
.
view
layoutIfNeeded
];
[
self
.
containerView
addRoundedCorners
:
UIRectCornerTopLeft
|
UIRectCornerTopRight
withRadii
:
CGSizeMake
(
50
,
50
)];
[
self
.
containerView
addSubview
:
self
.
titleLabel
];
[
self
.
titleLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
37
);
make
.
top
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
108
*
heightScale
);
}];
[
self
.
containerView
addSubview
:
self
.
accountButton
];
[
self
.
accountButton
sizeToFit
];
[
self
.
accountButton
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
right
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
-
31
);
make
.
centerY
.
mas_equalTo
(
self
.
titleLabel
);
}];
[
self
.
containerView
addSubview
:
self
.
phoneView
];
[
self
.
phoneView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
titleLabel
.
mas_bottom
).
mas_offset
(
58
*
heightScale
);
make
.
left
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
containerView
addSubview
:
self
.
smsCodeView
];
[
self
.
smsCodeView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
phoneView
.
mas_bottom
).
mas_offset
(
31
*
heightScale
);
make
.
left
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
containerView
addSubview
:
self
.
imgCodeView
];
[
self
.
imgCodeView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
smsCodeView
.
mas_bottom
).
mas_offset
(
31
*
heightScale
);
make
.
left
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
containerView
addSubview
:
self
.
passwordView
];
[
self
.
passwordView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
top
.
mas_equalTo
(
self
.
imgCodeView
.
mas_bottom
).
mas_offset
(
31
*
heightScale
);
make
.
left
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
30
);
make
.
right
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
-
30
);
make
.
height
.
mas_equalTo
(
30
);
}];
[
self
.
containerView
addSubview
:
self
.
protocolLabel
];
[
self
.
protocolLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
bottom
.
mas_equalTo
(
self
.
containerView
.
mas_safeAreaLayoutGuideBottom
).
mas_offset
(
-
55
*
widthScale
);
make
.
left
.
right
.
mas_equalTo
(
self
.
containerView
);
}];
[
self
.
containerView
addSubview
:
self
.
registerButton
];
[
self
.
registerButton
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
66
);
make
.
right
.
mas_equalTo
(
self
.
containerView
).
mas_offset
(
-
66
);
make
.
height
.
mas_equalTo
(
44
);
make
.
bottom
.
mas_equalTo
(
self
.
protocolLabel
.
mas_top
).
mas_offset
(
-
72
*
heightScale
);
}];
kViewBorderRadius
(
self
.
registerButton
,
10
,
0
,
[
UIColor
clearColor
]);
}
-
(
void
)
agreeClick
:
(
UIButton
*
)
button
{
button
.
selected
=
!
button
.
selected
;
}
-
(
UIView
*
)
containerView
{
if
(
_containerView
==
nil
)
{
_containerView
=
[[
UIView
alloc
]
init
];
_containerView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
return
_containerView
;
}
-
(
UILabel
*
)
titleLabel
{
if
(
_titleLabel
==
nil
)
{
_titleLabel
=
[[
UILabel
alloc
]
initWithText
:
@"登录骑手账号"
textColor
:
F_3D3B4F_COLOR
textAlignment
:
NSTextAlignmentLeft
fontSize
:
24
];
}
return
_titleLabel
;
}
-
(
UIButton
*
)
accountButton
{
if
(
_accountButton
==
nil
)
{
_accountButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"我有账号"
fontSize
:
14
titleColor
:
BLUE_COLOR
normalImageName
:
@"right"
selectedImgName
:
@"right"
backgroundColor
:
[
UIColor
whiteColor
]];
[
_accountButton
setForceRightToLeft
:
0
forState
:
UIControlStateNormal
];
WS
(
weakSelf
);
[
_accountButton
addBlockForControlEvents
:
UIControlEventTouchUpInside
block
:
^
(
UIButton
*
sender
)
{
[
weakSelf
dismissViewControllerAnimated
:
YES
completion
:
nil
];
}];
}
return
_accountButton
;
}
//
-
(
XVInputFieldView
*
)
phoneView
{
if
(
_phoneView
==
nil
)
{
_phoneView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypeSmsCode
placeholder
:
@"请输入手机号"
];
}
return
_phoneView
;
}
-
(
XVInputFieldView
*
)
smsCodeView
{
if
(
_smsCodeView
==
nil
)
{
_smsCodeView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypeNumber
placeholder
:
@"请输入验证码"
];
}
return
_smsCodeView
;
}
-
(
XVInputFieldView
*
)
imgCodeView
{
if
(
_imgCodeView
==
nil
)
{
_imgCodeView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypeSmsCode
placeholder
:
@"请输入图片验证码"
];
}
return
_imgCodeView
;
}
-
(
XVInputFieldView
*
)
passwordView
{
if
(
_passwordView
==
nil
)
{
_passwordView
=
[[
XVInputFieldView
alloc
]
initWithType
:
InputTypePassword
placeholder
:
@"请设置登录密码"
];
}
return
_passwordView
;
}
-
(
UIButton
*
)
registerButton
{
if
(
_registerButton
==
nil
)
{
_registerButton
=
[[
UIButton
alloc
]
initWithTitle
:
@"注册"
fontSize
:
16
titleColor
:
[
UIColor
whiteColor
]
bgColor
:
COLOR_THEMEGRENN
];
WS
(
weakSelf
);
[
_registerButton
addBlockForControlEvents
:
UIControlEventTouchUpInside
block
:
^
(
id
_Nonnull
sender
)
{
}];
}
return
_registerButton
;
}
-
(
YYLabel
*
)
protocolLabel
{
if
(
_protocolLabel
==
nil
)
{
_protocolLabel
=
[[
YYLabel
alloc
]
init
];
NSMutableAttributedString
*
text
=
[
NSMutableAttributedString
new
];
UIFont
*
font
=
[
UIFont
systemFontOfSize
:
12
];
UIColor
*
color
=
[
UIColor
colorWithHexString
:
@"#737272"
];
// UIView attachment
UIButton
*
selectButton
=
[[
UIButton
alloc
]
init
];
[
selectButton
setImage
:
IMG
(
@"order_check box"
)
forState
:
UIControlStateNormal
];
[
selectButton
setImage
:
IMG
(
@"order_checkSelect"
)
forState
:
UIControlStateSelected
];
[
selectButton
addTarget
:
self
action
:
@selector
(
agreeClick
:
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
selectButton
sizeToFit
];
selectButton
.
hitEdgeInsets
=
UIEdgeInsetsMake
(
-
40
,
-
40
,
-
40
,
-
40
);
NSMutableAttributedString
*
attachment
=
[
NSMutableAttributedString
attachmentStringWithContent
:
selectButton
contentMode
:
UIViewContentModeBottom
attachmentSize
:
selectButton
.
size
alignToFont
:
font
alignment
:
YYTextVerticalAlignmentCenter
];
[
text
appendAttributedString
:
attachment
];
NSMutableAttributedString
*
str1
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
@" 我已阅读并同意"
];
str1
.
font
=
font
;
str1
.
color
=
color
;
[
text
appendAttributedString
:
str1
];
NSMutableAttributedString
*
str2
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
@"《快服务服务者合作协议》"
];
str2
.
font
=
font
;
str2
.
color
=
BLUE_COLOR
;
YYTextHighlight
*
highlight
=
[
YYTextHighlight
new
];
highlight
.
tapAction
=
^
(
UIView
*
containerView
,
NSAttributedString
*
text
,
NSRange
range
,
CGRect
rect
)
{
};
[
str2
setTextHighlight
:
highlight
range
:
str2
.
rangeOfAll
];
[
text
appendAttributedString
:
str2
];
NSMutableAttributedString
*
str3
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
@"及"
];
str3
.
font
=
font
;
str3
.
color
=
color
;
[
text
appendAttributedString
:
str3
];
NSMutableAttributedString
*
str4
=
[[
NSMutableAttributedString
alloc
]
initWithString
:
@"《隐私协议》"
];
str4
.
font
=
font
;
str4
.
color
=
BLUE_COLOR
;
YYTextHighlight
*
highlight1
=
[
YYTextHighlight
new
];
highlight1
.
tapAction
=
^
(
UIView
*
containerView
,
NSAttributedString
*
text
,
NSRange
range
,
CGRect
rect
)
{
};
[
str4
setTextHighlight
:
highlight1
range
:
str4
.
rangeOfAll
];
[
text
appendAttributedString
:
str4
];
_protocolLabel
.
attributedText
=
text
;
_protocolLabel
.
textAlignment
=
NSTextAlignmentCenter
;
}
return
_protocolLabel
;
}
@end
FastService/Login/View/XVInputFieldView.m
View file @
4d06bec2
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
make
.
left
.
mas_equalTo
(
self
).
mas_offset
(
0
);
make
.
left
.
mas_equalTo
(
self
).
mas_offset
(
0
);
make
.
right
.
mas_equalTo
(
self
).
mas_offset
(
0
);
make
.
right
.
mas_equalTo
(
self
).
mas_offset
(
0
);
make
.
width
.
mas_lessThanOrEqualTo
(
SCREEN_WIDTH
-
60
);
make
.
width
.
mas_lessThanOrEqualTo
(
SCREEN_WIDTH
-
60
);
make
.
height
.
mas_equalTo
(
44
);
make
.
height
.
mas_equalTo
(
30
);
}];
}];
[
self
addSubview
:
self
.
lineView
];
[
self
addSubview
:
self
.
lineView
];
...
...
FastService/PrefixHeader.pch
View file @
4d06bec2
...
@@ -46,17 +46,19 @@
...
@@ -46,17 +46,19 @@
#define YELLOW_COLOR [UIColor colorWithHexString:@"#edb10f"]
#define YELLOW_COLOR [UIColor colorWithHexString:@"#edb10f"]
#define PURPLE_COLOR [UIColor colorWithHexString:@"#9E5BCA"]
#define PURPLE_COLOR [UIColor colorWithHexString:@"#9E5BCA"]
#define RED_COLOR [UIColor colorWithHexString:@"#f25555"]
#define RED_COLOR [UIColor colorWithHexString:@"#f25555"]
#define FONT_1_COLOR [UIColor colorWithHexString:@"#3D3B4F"]
#define FONT_2_COLOR [UIColor colorWithHexString:@"#707070"]
#define F_3D3B4F_COLOR [UIColor colorWithHexString:@"#3D3B4F"]
#define FONT_3_COLOR [UIColor colorWithHexString:@"#8a8a8a"]
#define F_707070_COLOR [UIColor colorWithHexString:@"#707070"]
#define FONT_4_COLOR [UIColor colorWithHexString:@"#bcbcbc"]
#define F_8A8A8A_COLOR [UIColor colorWithHexString:@"#8a8a8a"]
#define FONT_5_COLOR [UIColor colorWithHexString:@"#cfcfcf"]
#define F_BCBCBC_COLOR [UIColor colorWithHexString:@"#bcbcbc"]
#define FONT_6_COLOR [UIColor colorWithHexString:@"#7D7D7D"]
#define F_CFCFCF_COLOR [UIColor colorWithHexString:@"#cfcfcf"]
#define FONT_7_COLOR [UIColor colorWithHexString:@"#9B9B9B"]
#define F_7D7D7d_COLOR [UIColor colorWithHexString:@"#7D7D7D"]
#define FONT_8_COLOR [UIColor colorWithHexString:@"#666666"]
#define F_9B9B9B_COLOR [UIColor colorWithHexString:@"#9B9B9B"]
#define BG_1_COLOR [UIColor colorWithHexString:@"#e9e9e9"]
#define F_666666_COLOR [UIColor colorWithHexString:@"#666666"]
#define BG_2_COLOR [UIColor colorWithHexString:@"#f2f2f2"]
#define BG_3_COLOR [UIColor colorWithHexString:@"#fafafa"]
#define E9_3_COLOR [UIColor colorWithHexString:@"#e9e9e9"]
#define F2_3_COLOR [UIColor colorWithHexString:@"#f2f2f2"]
#define FA_3_COLOR [UIColor colorWithHexString:@"#fafafa"]
#define BB_3_COLOR [UIColor colorWithHexString:@"#BBBBBB"]
#define BB_3_COLOR [UIColor colorWithHexString:@"#BBBBBB"]
#define EF_3_COLOR [UIColor colorWithHexString:@"#efefef"]
#define EF_3_COLOR [UIColor colorWithHexString:@"#efefef"]
...
...
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