
主要变更: 1. 在 EPLoginTypesViewController 中添加了渐变背景到 actionButton,提升视觉效果。 2. 实现了输入框状态检查功能,确保在输入有效信息时启用登录按钮。 3. 更新了输入框配置,支持不同类型的键盘输入(如数字键盘和邮箱键盘)。 4. 在 EPLoginService 中添加了对手机号和邮箱的 DES 加密,增强安全性。 5. 更新了 EPLoginConfig,统一输入框和按钮的样式设置。 此更新旨在提升用户体验,确保登录过程的安全性和流畅性。
34 lines
785 B
Swift
34 lines
785 B
Swift
//
|
||
// EPLoginBridge.swift
|
||
// YuMi
|
||
//
|
||
// Created by AI on 2025-01-27.
|
||
// 桥接 Objective-C 宏到 Swift
|
||
//
|
||
|
||
import UIKit
|
||
|
||
/// 桥接 kImage 宏
|
||
func kImage(_ name: String) -> UIImage? {
|
||
return UIImage(named: name)
|
||
}
|
||
|
||
/// 桥接 YMLocalizedString 宏
|
||
func YMLocalizedString(_ key: String) -> String {
|
||
return Bundle.ymLocalizedString(forKey: key)
|
||
}
|
||
|
||
/// 桥接 URLType 枚举常量
|
||
extension URLType {
|
||
static var captchaSwitch: URLType {
|
||
return URLType(rawValue: 113)! // kCaptchaSwitchPath
|
||
}
|
||
}
|
||
|
||
/// DES 加密辅助函数
|
||
func encryptDES(_ plainText: String) -> String {
|
||
// 直接使用加密密钥(与 ObjC 版本保持一致)
|
||
let key = "1ea53d260ecf11e7b56e00163e046a26"
|
||
return DESEncrypt.encryptUseDES(plainText, key: key) ?? plainText
|
||
}
|