Implement profile tab with Android-aligned flows and OSS upload.

Add personal info page, account switch, real-name auth, withdrawal settings, session cache extensions, AlibabaCloudOSS SPM, and unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 16:01:05 +08:00
parent 02a80764ea
commit 005cac3f78
36 changed files with 4077 additions and 57 deletions

View File

@ -0,0 +1,62 @@
//
// ProfileStatusBadgeView.swift
// suixinkan
//
import SnapKit
import UIKit
///
final class ProfileStatusBadgeView: UIView {
enum Style {
case accountActive
case scenic
case auditPending
case auditApproved
case auditRejected
case bankPending
case bankApproved
case bankRejected
}
private let label = UILabel()
override init(frame: CGRect) {
super.init(frame: frame)
label.font = .systemFont(ofSize: 12, weight: .medium)
label.textAlignment = .center
addSubview(label)
label.snp.makeConstraints { make in
make.edges.equalToSuperview().inset(UIEdgeInsets(top: 3, left: 8, bottom: 3, right: 8))
}
layer.cornerRadius = 4
clipsToBounds = true
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func apply(style: Style, text: String) {
label.text = text
switch style {
case .accountActive:
label.textColor = UIColor(hex: 0x22C55E)
backgroundColor = UIColor(hex: 0xF0FDF4)
case .scenic:
label.textColor = AppColor.primary
backgroundColor = UIColor(hex: 0xEFF6FF)
case .auditPending, .bankPending:
label.textColor = UIColor(hex: 0xFF7B00)
backgroundColor = UIColor(hex: 0xFFF0E2)
case .auditApproved, .bankApproved:
label.textColor = AppColor.primary
backgroundColor = UIColor(hex: 0xEFF6FF)
case .auditRejected, .bankRejected:
label.textColor = UIColor(hex: 0xEF4444)
backgroundColor = UIColor(hex: 0xFFE7E7)
}
}
}