feat: 更新登录模块以支持验证码和渐变背景
主要变更: 1. 在 EPLoginTypesViewController 中添加了渐变背景到 actionButton,提升视觉效果。 2. 实现了输入框状态检查功能,确保在输入有效信息时启用登录按钮。 3. 更新了输入框配置,支持不同类型的键盘输入(如数字键盘和邮箱键盘)。 4. 在 EPLoginService 中添加了对手机号和邮箱的 DES 加密,增强安全性。 5. 更新了 EPLoginConfig,统一输入框和按钮的样式设置。 此更新旨在提升用户体验,确保登录过程的安全性和流畅性。
This commit is contained in:
@@ -24,6 +24,13 @@ struct EPLoginConfig {
|
||||
static let loginButtonSpacing: CGFloat = 24
|
||||
/// 登录按钮左右边距
|
||||
static let loginButtonHorizontalPadding: CGFloat = 30
|
||||
|
||||
/// 输入框/按钮统一高度
|
||||
static let uniformHeight: CGFloat = 56
|
||||
/// 输入框/按钮统一左右边距
|
||||
static let uniformHorizontalPadding: CGFloat = 29
|
||||
/// 输入框/按钮统一圆角
|
||||
static let uniformCornerRadius: CGFloat = 28
|
||||
/// 标准圆角半径(按钮/输入框)
|
||||
static let cornerRadius: CGFloat = 23
|
||||
|
||||
@@ -83,13 +90,15 @@ struct EPLoginConfig {
|
||||
static let feedbackButtonCornerRadius: CGFloat = 10.5
|
||||
|
||||
/// 输入框高度
|
||||
static let inputHeight: CGFloat = 52
|
||||
static let inputHeight: CGFloat = 56
|
||||
/// 输入框圆角
|
||||
static let inputCornerRadius: CGFloat = 26
|
||||
static let inputCornerRadius: CGFloat = 28
|
||||
/// 输入框左右内边距
|
||||
static let inputHorizontalPadding: CGFloat = 24
|
||||
/// 输入框 icon 尺寸
|
||||
static let inputIconSize: CGFloat = 20
|
||||
/// 输入框边框宽度
|
||||
static let inputBorderWidth: CGFloat = 1
|
||||
|
||||
/// 验证码按钮宽度
|
||||
static let codeButtonWidth: CGFloat = 102
|
||||
@@ -117,11 +126,15 @@ struct EPLoginConfig {
|
||||
static let iconDisabled = UIColor.gray
|
||||
|
||||
/// 输入框颜色
|
||||
static let inputBackground = UIColor(red: 0xF3/255.0, green: 0xF5/255.0, blue: 0xFA/255.0, alpha: 1.0)
|
||||
static let inputBackground = UIColor.white.withAlphaComponent(0.1)
|
||||
static let inputText = UIColor(red: 0x1F/255.0, green: 0x1B/255.0, blue: 0x4F/255.0, alpha: 1.0)
|
||||
static let inputBorder = UIColor.lightGray.withAlphaComponent(0.3)
|
||||
static let inputBorder = UIColor.white
|
||||
static let inputBorderFocused = UIColor.systemPurple
|
||||
|
||||
/// 渐变色(Login/Confirm按钮)
|
||||
static let gradientStart = UIColor(red: 0xF8/255.0, green: 0x54/255.0, blue: 0xFC/255.0, alpha: 1.0) // #F854FC
|
||||
static let gradientEnd = UIColor(red: 0x50/255.0, green: 0x0F/255.0, blue: 0xFF/255.0, alpha: 1.0) // #500FFF
|
||||
|
||||
/// 验证码按钮颜色
|
||||
static let codeButtonBackground = UIColor(red: 0x91/255.0, green: 0x68/255.0, blue: 0xFA/255.0, alpha: 1.0)
|
||||
|
||||
@@ -203,11 +216,11 @@ struct EPLoginConfig {
|
||||
/// Client Secret
|
||||
static let clientSecret = "uyzjdhds"
|
||||
/// Client ID
|
||||
static let clientId = "1"
|
||||
static let clientId = "erban-client"
|
||||
/// Grant Type
|
||||
static let grantType = "sms_code"
|
||||
static let grantType = "password"
|
||||
/// 版本号
|
||||
static let version = "1.0.31"
|
||||
static let version = "1"
|
||||
|
||||
/// 验证码类型:登录
|
||||
static let codeTypeLogin = 1
|
||||
@@ -253,6 +266,10 @@ struct EPLoginConfig {
|
||||
/// 图标 - 数字
|
||||
static let iconNumber = "number"
|
||||
|
||||
/// 密码可见性图标
|
||||
static let iconPasswordSee = "icon_password_see"
|
||||
static let iconPasswordUnsee = "icon_password_unsee"
|
||||
|
||||
/// 图标 - 返回
|
||||
static let iconBack = "chevron.left"
|
||||
/// 图标 - 眼睛(隐藏)
|
||||
|
Reference in New Issue
Block a user