feat: 更新登录模块以支持验证码和渐变背景

主要变更:
1. 在 EPLoginTypesViewController 中添加了渐变背景到 actionButton,提升视觉效果。
2. 实现了输入框状态检查功能,确保在输入有效信息时启用登录按钮。
3. 更新了输入框配置,支持不同类型的键盘输入(如数字键盘和邮箱键盘)。
4. 在 EPLoginService 中添加了对手机号和邮箱的 DES 加密,增强安全性。
5. 更新了 EPLoginConfig,统一输入框和按钮的样式设置。

此更新旨在提升用户体验,确保登录过程的安全性和流畅性。
This commit is contained in:
edwinQQQ
2025-10-13 17:49:09 +08:00
parent 809cc44ca5
commit 02a8335d70
8 changed files with 287 additions and 78 deletions

View File

@@ -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"
/// -