Add login flow, session routing, and MainTab shell aligned with reference UI.
Implement token-based root routing, Android-matched login screen, five-slot MainTabBar with scan action, and placeholder tab pages. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
50
suixinkan/UI/Scan/ScanPlaceholderViewController.swift
Normal file
50
suixinkan/UI/Scan/ScanPlaceholderViewController.swift
Normal file
@ -0,0 +1,50 @@
|
||||
//
|
||||
// ScanPlaceholderViewController.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import SnapKit
|
||||
import UIKit
|
||||
|
||||
/// 扫码核销占位页,后续替换为真实扫码页。
|
||||
final class ScanPlaceholderViewController: BaseViewController {
|
||||
|
||||
private let titleLabel = UILabel()
|
||||
private let closeButton = UIButton(type: .system)
|
||||
|
||||
override func setupNavigationBar() {
|
||||
navigationController?.setNavigationBarHidden(true, animated: false)
|
||||
}
|
||||
|
||||
override func setupUI() {
|
||||
view.backgroundColor = .black
|
||||
|
||||
titleLabel.text = "扫码核销"
|
||||
titleLabel.font = .systemFont(ofSize: 20, weight: .medium)
|
||||
titleLabel.textColor = .white
|
||||
titleLabel.textAlignment = .center
|
||||
|
||||
closeButton.setTitle("关闭", for: .normal)
|
||||
closeButton.setTitleColor(.white, for: .normal)
|
||||
closeButton.titleLabel?.font = .systemFont(ofSize: 16, weight: .medium)
|
||||
closeButton.addTarget(self, action: #selector(closeTapped), for: .touchUpInside)
|
||||
|
||||
view.addSubview(titleLabel)
|
||||
view.addSubview(closeButton)
|
||||
}
|
||||
|
||||
override func setupConstraints() {
|
||||
titleLabel.snp.makeConstraints { make in
|
||||
make.center.equalToSuperview()
|
||||
}
|
||||
|
||||
closeButton.snp.makeConstraints { make in
|
||||
make.top.equalTo(view.safeAreaLayoutGuide).offset(12)
|
||||
make.trailing.equalToSuperview().inset(16)
|
||||
}
|
||||
}
|
||||
|
||||
@objc private func closeTapped() {
|
||||
dismiss(animated: true)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user