From: liangzhenying <867174124@qq.com> Date: Wed, 21 Jan 2026 06:52:26 +0000 (+0800) Subject: UI颜色调整 X-Git-Tag: 1.0.3~2 X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=9a6b50c079086aed320c8fbd88141a06494dfb1f;p=mirrors%2FShenYin.git UI颜色调整 --- diff --git a/ShenYin/ShenYin/Launch/SceneDelegate.swift b/ShenYin/ShenYin/Launch/SceneDelegate.swift index 22b045e..3abffac 100644 --- a/ShenYin/ShenYin/Launch/SceneDelegate.swift +++ b/ShenYin/ShenYin/Launch/SceneDelegate.swift @@ -18,7 +18,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { App.shared.window = window // window?.rootViewController = BaseTC() -// window?.rootViewController = UINavigationController(rootViewController: HistorySelectedVC()) +// window?.rootViewController = UINavigationController(rootViewController: SportHomeVC()) AppLaunch.start() } diff --git a/ShenYin/ShenYin/Resource/colors/Colors+YL.swift b/ShenYin/ShenYin/Resource/colors/Colors+YL.swift index 514d988..7e0d091 100644 --- a/ShenYin/ShenYin/Resource/colors/Colors+YL.swift +++ b/ShenYin/ShenYin/Resource/colors/Colors+YL.swift @@ -14,14 +14,12 @@ public enum YLColor { case theme /// 次级主题色 case subTheme - /// 主标题 - 0x222222 + /// 主标题 case first - /// 主标题 - 0x333333 - case primary /// 二级标题 case secondary /// 三级标题 - case tertiary + case level3 case placeholder @@ -42,11 +40,9 @@ extension YLColor: ColorRGBProviderProtocol { return 0xF4FAFF case .first: return 0x121212 - case .primary: - return 0x333333 case .secondary: return 0x666666 - case .tertiary: + case .level3: return 0x999999 case .placeholder: return 0xcccccc @@ -66,12 +62,10 @@ extension YLColor: ColorRGBProviderProtocol { return 0xF4FAFF case .first: return 0xffffff - case .primary: - return 0xffffff case .secondary: return 0x999999 - case .tertiary: - return 0x999999 + case .level3: + return 0xcccccc case .placeholder: return 0x666666 case .separateLine: diff --git a/ShenYin/ShenYin/Tools/ShareView.swift b/ShenYin/ShenYin/Tools/ShareView.swift deleted file mode 100644 index ce7939f..0000000 --- a/ShenYin/ShenYin/Tools/ShareView.swift +++ /dev/null @@ -1,140 +0,0 @@ -//// -//// ShareView.swift -//// Magpie -//// -//// Created by incar on 2024/1/10. -//// -// -//import Foundation -//extension UnAuthSchoolDetailVC{ -// class AgreementView: YLPresentView { -// private let titleLabel = UILabel() -// private let des = UILabel() -// private let selectButton = UIButton() -// private let privacyLabel = UILabel() -// private let okButton = AnimationButton() -// private var vm:ClassDetailVM -// -// init(code:String) { -// self.vm = ClassDetailVM(code:code) -// super.init(contentHeight: 400.fitR) -// } -// -// override func setupSubView() { -// super.setupSubView() -// contentView.addSubview(titleLabel) -// contentView.addSubview(des) -// contentView.addSubview(selectButton) -// contentView.addSubview(privacyLabel) -// contentView.addSubview(okButton) -// } -// override func setupLayout() { -// super.setupLayout() -// titleLabel.snp.makeConstraints { (m) in -// m.top.equalToSuperview().inset(25.fitR) -// m.left.right.equalToSuperview() -// m.height.greaterThanOrEqualTo(0) -// } -// des.snp.makeConstraints { (m) in -// m.left.right.equalToSuperview().inset(20.fitR) -// m.top.equalToSuperview().inset(67.fitR) -// } -// selectButton.snp.makeConstraints { (m) in -// m.left.equalToSuperview().inset(20.fitR) -// m.bottom.equalToSuperview().inset(96.fitR) -// m.height.equalTo(15.fitR) -// m.width.equalTo(15.fitR) -// } -// privacyLabel.snp.makeConstraints { (m) in -// m.left.equalTo(selectButton.snp.right) -// m.centerY.equalTo(selectButton) -// } -// okButton.snp.makeConstraints { (m) in -// m.bottom.equalToSuperview().inset(30.fitR) -// m.height.equalTo(44.fitR) -// m.left.right.equalToSuperview().inset(25.fitR) -// } -// } -// -// override func setupStyle() { -// super.setupStyle() -// titleLabel.do { (v) in -// v.textColor = .rgb(0x333333) -// v.font = .semiBold(16) -// v.textAlignment = .center -// v.text = "诸葛驾到代运营协议说明" -// } -// des.do { (v) in -// v.text = "1.用户通过诸葛驾到寻找到合适的驾校后,委托诸葛驾到负责撮合驾校学车的服务提供方,为用户代报名指定班型的学车服务,在代报名过程中提供驾校信息核验、学车权益守护、学车资金托管、代理结算等服务。具体服务内容由诸葛驾到根据实际情况提供,包括但不限于: (1) 作为用户的学车经纪人代表用户与驾校签约学车报名协议;(2)学车报名资金的托管; (3) 维护用户在驾校学车的约定权益;(4) 服务商收入结算和用户支付费用:具体金额以产生的统计数据为准;(5) 订单查询;2.用户通过诸葛驾到完成的学车报名信息以平台发布的相应信息为准,交易应签署《学车报名服务合同》。具体内容《学车报名服务合同》以约定为准,该合同文本格式由诸葛驾到平台的驾校提供,经诸葛驾到平台撮合,由用户与诸葛驾到平台的驾校直接签约。所有发给用户的通告及其他消息都可通过APP或者用户所提供的联系方式发送 。" -// v.textAlignment = .left -// v.numberOfLines = 0 -// v.font = .regular(12) -// v.textColor = .color(.secondary) -// } -// selectButton.do { (v) in -// v.yc.setBorder(width: 1.fitR, color: .rgb(0x999999), radius: 2.fitR) -// v.setImage(nil, for: .normal) -// v.addTarget(self, action: #selector(selectBtnAction), for: .touchUpInside) -// } -// privacyLabel.do { (v) in -// v.text = " 已阅读同意协议说明" -// v.textAlignment = .left -// v.numberOfLines = 1 -// v.font = .regular(12) -// v.textColor = .rgb(0x999999) -// privacyLabel.yc.addTap(target: self, action: #selector(selectBtnAction)) -// } -// okButton.do { (v) in -// v.isEnabled = false -// v.yc.addGardiendLayerWith(colors: [.color(.mainBlue),.color(.mainBlue)], frame: CGRect(x: 0, y: 0, width: kScreenWid - 50.fitR, height: 44.fitR), direction: .left2right) -// v.setTitle("下一步", for: .normal) -// v.setTitleColor(.color(.white), for: .normal) -// v.titleLabel?.font = .regular(15) -// v.yc.setCornerRadius(22.fitR) -// v.alpha = 0.5 -// v.addTarget(self, action: #selector(okButtonAction), for: .touchUpInside) -// self.selectBtnAction() -// -// } -// } -// @objc func okButtonAction(){ -//// self.okButtonTap?() -//// hide() -// self.start2LoadData() -// } -// @objc func selectBtnAction(){ -// selectButton.isSelected = !selectButton.isSelected -// if selectButton.isSelected { -// selectButton.yc.setBorder(width: 1.fitR, color: .rgb(0x036AFF), radius: 2.fitR) -// selectButton.setImage(UIImage(named: "agreement_selected"), for: .normal) -// privacyLabel.textColor = .rgb(0x036AFF) -// okButton.alpha = 1 -// } -// else{ -// selectButton.yc.setBorder(width: 1.fitR, color: .rgb(0x999999), radius: 2.fitR) -// selectButton.setImage(nil, for: .normal) -// privacyLabel.textColor = .rgb(0x999999) -// okButton.alpha = 0.5 -// } -// okButton.isEnabled = selectButton.isSelected -// } -// -// func start2LoadData(){ -// SVProgressHUD.showLoading() -// SVProgressHUD.setContainerView(app.window) -// self.vm.fetchClassDetail{[weak self] (model) in -// guard let self = self else {return} -// if model.isSuccess{ -// SVProgressHUD.hidden() -// self.hide() -// let params = PayDetailVCParams(model:model.data) -// let vc = PayDetailVC(data: params) -// UIViewController.yc.currentNav?.pushViewController(vc, animated: true) -// } -// else{ -// SVProgressHUD.showAutoHiden(model.msg) -// } -// } -// } -// } -//} diff --git a/ShenYin/ShenYin/UI/Base/BaseTC.swift b/ShenYin/ShenYin/UI/Base/BaseTC.swift index 0a09a25..8360d5a 100644 --- a/ShenYin/ShenYin/UI/Base/BaseTC.swift +++ b/ShenYin/ShenYin/UI/Base/BaseTC.swift @@ -85,7 +85,7 @@ class BaseTC:UITabBarController{ let appearance = UITabBarAppearance() appearance.configureWithDefaultBackground() - appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.rgb(0x999999)] + appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.secondary)] appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white] self.tabBar.standardAppearance = appearance self.tabBar.backgroundColor = .rgb(0x242424) diff --git a/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift b/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift index fb9bd72..42bda3d 100644 --- a/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift +++ b/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift @@ -21,7 +21,7 @@ class HomeHeadInfoView: BaseColletionSetionHeader { v.textAlignment = .left } deviceLabel.do { (v) in - v.textColor = .color(.tertiary) + v.textColor = .color(.secondary) v.font = .regular(14) v.textAlignment = .left v.text = "共4个智能设备" diff --git a/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift b/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift index 36926a8..fa2de4f 100644 --- a/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift +++ b/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift @@ -14,7 +14,7 @@ class LoginHeaderView: BaseView { tipsLabel.do { v in v.numberOfLines = 0 v.font = .medium(22) - v.textColor = .rgb(0x121212) + v.textColor = .color(.first) let text = "您好, \n欢迎使用DeepChords".l10n let stype = NSMutableParagraphStyle() stype.lineSpacing = 10 diff --git a/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackBottomView.swift b/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackBottomView.swift index 2a6da3a..d2293c1 100644 --- a/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackBottomView.swift +++ b/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackBottomView.swift @@ -21,7 +21,7 @@ class FeedbackBottomView: BaseView { // v.backgroundColor = .green } line.do { v in - v.backgroundColor = .hexString("#999999") + v.backgroundColor = .color(.secondary) } chatItem.do { v in diff --git a/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackHistoryVC.swift b/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackHistoryVC.swift index adc1851..e8b0e44 100644 --- a/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackHistoryVC.swift +++ b/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackHistoryVC.swift @@ -110,7 +110,7 @@ fileprivate class FeedbackHistoryCell: BaseTableViewCell { v.lineBreakMode = .byTruncatingTail } timeLabel.do { v in - v.textColor = .rgb(0x999999) + v.textColor = .color(.secondary) v.font = .regular(14) v.textAlignment = .right } diff --git a/ShenYin/ShenYin/UI/Mine/LoginManager/DeviceLoginDetailVC.swift b/ShenYin/ShenYin/UI/Mine/LoginManager/DeviceLoginDetailVC.swift index 089001c..86a9b50 100644 --- a/ShenYin/ShenYin/UI/Mine/LoginManager/DeviceLoginDetailVC.swift +++ b/ShenYin/ShenYin/UI/Mine/LoginManager/DeviceLoginDetailVC.swift @@ -90,7 +90,7 @@ fileprivate class FooterView: BaseView { v.text = "移除设备后会同步退出账号,在此设备上将无法访问该账号的数据".l10n v.textAlignment = .left v.font = .regular(12) - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.numberOfLines = 0 } } diff --git a/ShenYin/ShenYin/UI/Mode/CustomEqVC.swift b/ShenYin/ShenYin/UI/Mode/CustomEqVC.swift index 06533a6..add321e 100644 --- a/ShenYin/ShenYin/UI/Mode/CustomEqVC.swift +++ b/ShenYin/ShenYin/UI/Mode/CustomEqVC.swift @@ -44,25 +44,25 @@ class CustomEqVC:BaseVC{ } unitLabel.do { v in v.text = "dp" - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.textAlignment = .left v.font = .regular(12) } valueLabel1.do { v in v.text = "+12" - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.textAlignment = .left v.font = .regular(12) } valueLabel2.do { v in v.text = "0" - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.textAlignment = .left v.font = .regular(12) } valueLabel3.do { v in v.text = "-12" - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.textAlignment = .left v.font = .regular(12) } @@ -183,14 +183,14 @@ private class EqSlider: BaseView { } titleLabel.do { v in - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.textAlignment = .center v.font = .regular(12) v.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2) } valueLabel.do { v in v.text = "0" - v.textColor = .hexString("#999999") + v.textColor = .color(.secondary) v.textAlignment = .center v.font = .regular(12) v.transform = CGAffineTransform(rotationAngle: CGFloat.pi / 2) diff --git a/ShenYin/ShenYin/UI/Sleep/SleepVC.swift b/ShenYin/ShenYin/UI/Sleep/SleepVC.swift index 42c0129..618485d 100644 --- a/ShenYin/ShenYin/UI/Sleep/SleepVC.swift +++ b/ShenYin/ShenYin/UI/Sleep/SleepVC.swift @@ -40,7 +40,7 @@ class SleepVC: BaseVC { navBar.title = "白噪音".l10n view.backgroundColor = .color(.bgColor) segmentedView.do { (v) in - segmentedDataSource.titleNormalColor = .hexString("#999999") + segmentedDataSource.titleNormalColor = .color(.secondary) segmentedDataSource.titleSelectedColor = .color(.first) segmentedDataSource.titleNormalFont = .regular(14) segmentedDataSource.titleSelectedFont = .bold(16) diff --git a/ShenYin/ShenYin/UI/Sport/MusicRootView.swift b/ShenYin/ShenYin/UI/Sport/MusicRootView.swift new file mode 100644 index 0000000..fe93653 --- /dev/null +++ b/ShenYin/ShenYin/UI/Sport/MusicRootView.swift @@ -0,0 +1,21 @@ +// +// MusicVC.swift +// ShenYin +// +// Created by liangshi on 2026/1/20. +// + +import UIKit +import JXSegmentedView + +class MusicRootView: BaseView{ + override func setupViews() { + backgroundColor = UIColor.random() + } +} + +extension MusicRootView: JXSegmentedListContainerViewListDelegate { + func listView() -> UIView { + return self + } +} diff --git a/ShenYin/ShenYin/UI/Sport/RecordRootView.swift b/ShenYin/ShenYin/UI/Sport/RecordRootView.swift new file mode 100644 index 0000000..911138e --- /dev/null +++ b/ShenYin/ShenYin/UI/Sport/RecordRootView.swift @@ -0,0 +1,22 @@ +// +// RecordView.swift +// ShenYin +// +// Created by liangshi on 2026/1/20. +// + +import UIKit +import JXSegmentedView + +class RecordRootView: BaseView{ + override func setupViews() { + backgroundColor = UIColor.random() + } +} + +extension RecordRootView: JXSegmentedListContainerViewListDelegate { + func listView() -> UIView { + return self + } +} + diff --git a/ShenYin/ShenYin/UI/Sport/Sport/SportRootView.swift b/ShenYin/ShenYin/UI/Sport/Sport/SportRootView.swift new file mode 100644 index 0000000..515dbe7 --- /dev/null +++ b/ShenYin/ShenYin/UI/Sport/Sport/SportRootView.swift @@ -0,0 +1,21 @@ +// +// SportVC.swift +// ShenYin +// +// Created by liangshi on 2026/1/20. +// + +import UIKit +import JXSegmentedView + +class SportRootView: BaseView{ + override func setupViews() { + backgroundColor = UIColor.random() + } +} + +extension SportRootView: JXSegmentedListContainerViewListDelegate { + func listView() -> UIView { + return self + } +} diff --git a/ShenYin/ShenYin/UI/Sport/Sport/SportTypeView.swift b/ShenYin/ShenYin/UI/Sport/Sport/SportTypeView.swift new file mode 100644 index 0000000..77b6797 --- /dev/null +++ b/ShenYin/ShenYin/UI/Sport/Sport/SportTypeView.swift @@ -0,0 +1,23 @@ +// +// SportTypeView.swift +// ShenYin +// +// Created by liangshi on 2026/1/20. +// +import UIKit + +class SportTypeView: BaseView{ + override func setupViews() { + + } + + + class SportTypeView: BaseView{ + override func setupViews() { + + } + + + + } +} diff --git a/ShenYin/ShenYin/UI/Sport/SportHomeVC.swift b/ShenYin/ShenYin/UI/Sport/SportHomeVC.swift new file mode 100644 index 0000000..6c82a0d --- /dev/null +++ b/ShenYin/ShenYin/UI/Sport/SportHomeVC.swift @@ -0,0 +1,121 @@ +// +// SportHomeVC.swift +// ShenYin +// +// Created by liangshi on 2026/1/20. +// + +import JXSegmentedView + + +enum SportHomeType{ + case sport + case record + case translate + case music + + var name:String{ + switch self { + case .sport: + return "运动" + case .record: + return "录音" + case .translate: + return "翻译" + case .music: + return "音乐" + } + } + static var all:[SportHomeType] = [.sport,.record,.translate,.music] +} + +class SportHomeVC: BaseVC { + private let segmentedDataSource = JXSegmentedTitleDataSource() + private let segmentedView = JXSegmentedView() + private lazy var listContainerView: JXSegmentedListContainerView! = { + let view = JXSegmentedListContainerView(dataSource: self, type: .scrollView) + return view + }() + + var list:[SportHomeType] = SportHomeType.all + override func viewDidLoad() { + super.viewDidLoad() + + // AudioPlayView.shared.show() + self.view.addSubview(AudioPlayView.shared) + } + + override func setupLayout(){ + + segmentedView.snp.makeConstraints { (m) in + m.left.right.equalToSuperview() + m.height.equalTo(44.fitR) + m.top.equalToSuperview().inset(kNavBtm) + } + listContainerView.snp.makeConstraints { (m) in + m.width.left.equalToSuperview() + m.top.equalTo(segmentedView.snp.bottom) + m.bottom.equalToSuperview() + } + } + override func setupViews(){ + view.addSubview(segmentedView) + view.addSubview(listContainerView) + + view.backgroundColor = .color(.bgColor) + segmentedView.do { (v) in + segmentedDataSource.titleNormalColor = .color(.secondary) + segmentedDataSource.titleSelectedColor = .color(.first) + segmentedDataSource.titleNormalFont = .regular(14) + segmentedDataSource.titleSelectedFont = .bold(16) + segmentedDataSource.isTitleZoomEnabled = true + // segmentedDataSource.titleSelectedZoomScale = 1 + segmentedDataSource.isTitleStrokeWidthEnabled = true + segmentedDataSource.isItemSpacingAverageEnabled = true + segmentedDataSource.isTitleColorGradientEnabled = true + segmentedDataSource.titles = list.map{"\($0.name)"} + segmentedView.backgroundColor = .clear + + //配置指示器 + let indicator = JXSegmentedIndicatorLineView() + indicator.indicatorWidth = 20 + indicator.indicatorHeight = 4 + indicator.verticalOffset = 6 + indicator.indicatorColor = .color(.theme) + segmentedView.indicators = [indicator] + + v.dataSource = segmentedDataSource + v.listContainer = listContainerView + } + } +} + +extension SportHomeVC: JXSegmentedListContainerViewListDelegate { + func listView() -> UIView { + return view + } +} + +extension SportHomeVC: JXSegmentedListContainerViewDataSource { + func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int { + if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource { + return titleDataSource.dataSource.count + } + return 0 + } + + func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate { + let type = list[index] + switch type { + case .sport: + return SportRootView() + case .record: + return RecordRootView() + case .translate: + return TranslateRootView() + case .music: + return MusicRootView() + } + + } +} diff --git a/ShenYin/ShenYin/UI/Sport/TranslateRootView.swift b/ShenYin/ShenYin/UI/Sport/TranslateRootView.swift new file mode 100644 index 0000000..a406472 --- /dev/null +++ b/ShenYin/ShenYin/UI/Sport/TranslateRootView.swift @@ -0,0 +1,21 @@ +// +// TranslateVC.swift +// ShenYin +// +// Created by liangshi on 2026/1/20. +// + +import UIKit +import JXSegmentedView + +class TranslateRootView: BaseView{ + override func setupViews() { + backgroundColor = UIColor.random() + } +} + +extension TranslateRootView: JXSegmentedListContainerViewListDelegate { + func listView() -> UIView { + return self + } +} diff --git a/ShenYin/ShenYin/UI/common/pop/AgreeMentPopView.swift b/ShenYin/ShenYin/UI/common/pop/AgreeMentPopView.swift deleted file mode 100644 index 2d97d42..0000000 --- a/ShenYin/ShenYin/UI/common/pop/AgreeMentPopView.swift +++ /dev/null @@ -1,142 +0,0 @@ -// -// AgreeMentPopView.swift -// Magpie -// -// Created by incar on 2024/1/11. -// - -import UIKit - -class AgreeMentPopView: BasePresentView { - private let titleLabel = UILabel() - private let des = UILabel() - private let selectButton = UIButton() - private let privacyLabel = UILabel() - private let okButton = UIButton() - - init() { - super.init(contentHeight: 400.fitR) - } - - required init?(coder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - override func setupSubView() { - super.setupSubView() - contentView.addSubview(titleLabel) - contentView.addSubview(des) - contentView.addSubview(selectButton) - contentView.addSubview(privacyLabel) - contentView.addSubview(okButton) - } - override func setupLayout() { - super.setupLayout() - titleLabel.snp.makeConstraints { (m) in - m.top.equalToSuperview().inset(25.fitR) - m.left.right.equalToSuperview() - m.height.greaterThanOrEqualTo(0) - } - des.snp.makeConstraints { (m) in - m.left.right.equalToSuperview().inset(20.fitR) - m.top.equalToSuperview().inset(67.fitR) - } - selectButton.snp.makeConstraints { (m) in - m.left.equalToSuperview().inset(20.fitR) - m.bottom.equalToSuperview().inset(96.fitR) - m.height.equalTo(15.fitR) - m.width.equalTo(15.fitR) - } - privacyLabel.snp.makeConstraints { (m) in - m.left.equalTo(selectButton.snp.right) - m.centerY.equalTo(selectButton) - } - okButton.snp.makeConstraints { (m) in - m.bottom.equalToSuperview().inset(30.fitR) - m.height.equalTo(44.fitR) - m.left.right.equalToSuperview().inset(25.fitR) - } - } - - override func setupStyle() { - super.setupStyle() - titleLabel.do { (v) in - v.textColor = .rgb(0x333333) - v.font = .semiBold(16) - v.textAlignment = .center - v.text = "诸葛驾到代运营协议说明" - } - des.do { (v) in - v.text = "1.用户通过诸葛驾到寻找到合适的驾校后,委托诸葛驾到负责撮合驾校学车的服务提供方,为用户代报名指定班型的学车服务,在代报名过程中提供驾校信息核验、学车权益守护、学车资金托管、代理结算等服务。具体服务内容由诸葛驾到根据实际情况提供,包括但不限于: (1) 作为用户的学车经纪人代表用户与驾校签约学车报名协议;(2)学车报名资金的托管; (3) 维护用户在驾校学车的约定权益;(4) 服务商收入结算和用户支付费用:具体金额以产生的统计数据为准;(5) 订单查询;2.用户通过诸葛驾到完成的学车报名信息以平台发布的相应信息为准,交易应签署《学车报名服务合同》。具体内容《学车报名服务合同》以约定为准,该合同文本格式由诸葛驾到平台的驾校提供,经诸葛驾到平台撮合,由用户与诸葛驾到平台的驾校直接签约。所有发给用户的通告及其他消息都可通过APP或者用户所提供的联系方式发送 。" - v.textAlignment = .left - v.numberOfLines = 0 - v.font = .regular(12) - v.textColor = .color(.secondary) - } - selectButton.do { (v) in - v.yc.setBorder(width: 1.fitR, color: .rgb(0x999999), radius: 2.fitR) - v.setImage(nil, for: .normal) - v.addTarget(self, action: #selector(selectBtnAction), for: .touchUpInside) - } - privacyLabel.do { (v) in - v.text = " 已阅读同意协议说明" - v.textAlignment = .left - v.numberOfLines = 1 - v.font = .regular(12) - v.textColor = .rgb(0x999999) - privacyLabel.yc.addTap(target: self, action: #selector(selectBtnAction)) - } - okButton.do { (v) in - v.isEnabled = false - v.yc.addGardiendLayerWith(colors: [.red,.blue], frame: CGRect(x: 0, y: 0, width: kScreenWid - 50.fitR, height: 44.fitR), direction: .left2right) - v.setTitle("下一步", for: .normal) - v.setTitleColor(.white, for: .normal) - v.titleLabel?.font = .regular(15) - v.yc.setCornerRadius(22.fitR) - v.alpha = 0.5 - v.addTarget(self, action: #selector(okButtonAction), for: .touchUpInside) - self.selectBtnAction() - - } - } - @objc func okButtonAction(){ - // self.okButtonTap?() - // hide() - self.start2LoadData() - } - @objc func selectBtnAction(){ - selectButton.isSelected = !selectButton.isSelected - if selectButton.isSelected { - selectButton.yc.setBorder(width: 1.fitR, color: .rgb(0x036AFF), radius: 2.fitR) - selectButton.setImage(UIImage(named: "agreement_selected"), for: .normal) - privacyLabel.textColor = .rgb(0x036AFF) - okButton.alpha = 1 - } - else{ - selectButton.yc.setBorder(width: 1.fitR, color: .rgb(0x999999), radius: 2.fitR) - selectButton.setImage(nil, for: .normal) - privacyLabel.textColor = .rgb(0x999999) - okButton.alpha = 0.5 - } - okButton.isEnabled = selectButton.isSelected - } - - func start2LoadData(){ - // SVProgressHUD.showLoading() - // SVProgressHUD.setContainerView(app.window) - // self.vm.fetchClassDetail{[weak self] (model) in - // guard let self = self else {return} - // if model.isSuccess{ - // SVProgressHUD.hidden() - // self.hide() - // let params = PayDetailVCParams(model:model.data) - // let vc = PayDetailVC(data: params) - // UIViewController.yc.currentNav?.pushViewController(vc, animated: true) - // } - // else{ - // SVProgressHUD.showAutoHiden(model.msg) - // } - // } - } -} - diff --git a/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift b/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift index e5777d2..847e778 100644 --- a/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift +++ b/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift @@ -139,7 +139,7 @@ fileprivate extension CustomButton { titleLabel.textColor = .color(.first) } else{ - titleLabel.textColor = .rgb(0x999999) + titleLabel.textColor = .color(.secondary) } } } diff --git a/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift b/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift index d72f852..518431f 100644 --- a/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift +++ b/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift @@ -166,7 +166,7 @@ fileprivate extension LanguagePickerView { titleLabel.textColor = .color(.first) } else{ - titleLabel.textColor = .rgb(0x999999) + titleLabel.textColor = .color(.level3) } } } diff --git a/ShenYin/ShenYin/UI/common/pop/RecordTipsView.swift b/ShenYin/ShenYin/UI/common/pop/RecordTipsView.swift index 91981eb..e94d3cc 100644 --- a/ShenYin/ShenYin/UI/common/pop/RecordTipsView.swift +++ b/ShenYin/ShenYin/UI/common/pop/RecordTipsView.swift @@ -240,7 +240,7 @@ class RecordTipsView: BasePresentView { v.setImage(UIImage(named: "tip_selected"), for: .selected) } agreeTitle.do { (v) in - v.textColor = .color(.tertiary) + v.textColor = .color(.secondary) v.font = .regular(12) v.textAlignment = .left v.text = "下次不再提示".l10n