完善账号切换展示、首页菜单图标与有线传输设置 chip。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-15 14:59:31 +08:00
parent 5eef31b8da
commit ce6de76055
18 changed files with 321 additions and 130 deletions

View File

@ -161,7 +161,7 @@ private final class AccountSwitchCell: UITableViewCell {
private let titleLabel = UILabel()
private let currentTagLabel = UILabel()
private let subtitleLabel = UILabel()
private let phoneLabel = UILabel()
private let nameLabel = UILabel()
private let tagLabel = UILabel()
private let checkView = UIImageView()
@ -197,8 +197,8 @@ private final class AccountSwitchCell: UITableViewCell {
currentTagLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
subtitleLabel.font = .systemFont(ofSize: 13)
subtitleLabel.textColor = AppColor.text666
phoneLabel.font = .systemFont(ofSize: 12)
phoneLabel.textColor = UIColor(hex: 0x9AA1AA)
nameLabel.font = .systemFont(ofSize: 12)
nameLabel.textColor = UIColor(hex: 0x9AA1AA)
tagLabel.font = .systemFont(ofSize: 11, weight: .semibold)
tagLabel.textAlignment = .center
tagLabel.layer.cornerRadius = 4
@ -210,7 +210,7 @@ private final class AccountSwitchCell: UITableViewCell {
card.addSubview(titleStackView)
card.addSubview(subtitleLabel)
card.addSubview(phoneLabel)
card.addSubview(nameLabel)
card.addSubview(tagLabel)
card.addSubview(checkView)
@ -234,7 +234,7 @@ private final class AccountSwitchCell: UITableViewCell {
make.leading.equalTo(titleStackView)
make.top.equalTo(titleStackView.snp.bottom).offset(4)
}
phoneLabel.snp.makeConstraints { make in
nameLabel.snp.makeConstraints { make in
make.leading.equalTo(titleLabel)
make.top.equalTo(subtitleLabel.snp.bottom).offset(4)
}
@ -257,7 +257,9 @@ private final class AccountSwitchCell: UITableViewCell {
titleLabel.text = account.title
currentTagLabel.isHidden = !isCurrent
subtitleLabel.text = account.subtitle
phoneLabel.text = account.phone
subtitleLabel.isHidden = account.subtitle.isEmpty
nameLabel.text = account.realName
nameLabel.isHidden = account.realName.isEmpty
tagLabel.text = account.isStoreUser ? "门店" : "景区"
tagLabel.textColor = account.isStoreUser ? UIColor(hex: 0x0F9F6E) : UIColor(hex: 0x7C3AED)
tagLabel.backgroundColor = account.isStoreUser ? UIColor(hex: 0xE8F8F1) : UIColor(hex: 0xF3ECFF)