From: liangzhenying <867174124@qq.com> Date: Mon, 12 Jan 2026 02:09:31 +0000 (+0800) Subject: 眼镜UI调整 X-Git-Tag: mix-v1.0~17 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=f6c4ff920f17c5ae52456f4d6a3bab3a306c7191;p=mirrors%2FShenYin.git 眼镜UI调整 --- diff --git a/ShenYin/ShenYin/Sdk/CCConfig.swift b/ShenYin/ShenYin/Sdk/CCConfig.swift index 13b0642..04bda40 100644 --- a/ShenYin/ShenYin/Sdk/CCConfig.swift +++ b/ShenYin/ShenYin/Sdk/CCConfig.swift @@ -24,8 +24,10 @@ class DCConfig{ /// 用户隐私协议地址 static let yonghuBaseURL = "https://pub-tos.deepchords.com" - } + + + // //class DCConfig{ // static var appLanguage = AppSupportLanguage.english diff --git a/ShenYin/ShenYin/Sdk/DcSdk/OpusTools.swift b/ShenYin/ShenYin/Sdk/DcSdk/OpusTools.swift index 98888c2..8bf323c 100644 --- a/ShenYin/ShenYin/Sdk/DcSdk/OpusTools.swift +++ b/ShenYin/ShenYin/Sdk/DcSdk/OpusTools.swift @@ -35,7 +35,6 @@ class OpusTools:NSObject, JLOpusDecoderDelegate { output?(data) } } - } diff --git a/ShenYin/ShenYin/Sdk/LogManager.swift b/ShenYin/ShenYin/Sdk/LogManager.swift new file mode 100644 index 0000000..8735333 --- /dev/null +++ b/ShenYin/ShenYin/Sdk/LogManager.swift @@ -0,0 +1,63 @@ +// +// Logger.swift +// +// +// Created by Harvey on 2021/4/27. +// + +import Foundation + +/// 日记管理 +class Logger { + static var isDebug: Bool = true + + fileprivate static let shared = Logger() + private var fileHandle:FileHandle? + private init() { + let path = getPath() + fileHandle = FileHandle(forWritingAtPath: path)! + //fileHandle?.seekToEndOfFile() + } + + fileprivate var dateString: String { Date().format(.full) } + + static var logs: [String] = [] + + + private func getPath()->String{ + let foldPath = NSHomeDirectory() + "/Documents/" + let fileManager = FileManager.default + if !fileManager.fileExists(atPath: foldPath) { + do { + try FileManager.default.createDirectory(atPath: foldPath, withIntermediateDirectories: true, attributes: nil) + } catch { + return "" + } + } + let path = foldPath + "\(Date().format(.middle)).log" + if !FileManager.default.fileExists(atPath: path) { + FileManager.default.createFile(atPath: path, contents: nil, attributes: nil) + + } + return path + } +} + +extension Logger { + static func debug(_ logs: Any..., line: Int = #line, separator: String = " ", terminator: String = "\n") { + + if Logger.isDebug { + objc_sync_enter(Logger.shared) + print(Logger.shared.dateString, terminator: " [DeepChords-\(String(format: "%03d", line))]: ") + print(logs, separator: separator, terminator: terminator) + let logString = Logger.shared.dateString + " [DeepChords-\(String(format: "%03d", line))]: " + logs.map({ "\($0)" }).joined(separator: separator) + terminator + Self.logs.append(logString) + Logger.shared.saveLog(log: logString) + objc_sync_exit(Logger.shared) + } + } + + private func saveLog(log:String){ + fileHandle?.write(log.data(using: .utf8)!) + } +} diff --git a/ShenYin/ShenYin/UI/Customer/QaHeaderView.swift b/ShenYin/ShenYin/UI/Customer/QaHeaderView.swift index 2fc7d1e..900ed92 100644 --- a/ShenYin/ShenYin/UI/Customer/QaHeaderView.swift +++ b/ShenYin/ShenYin/UI/Customer/QaHeaderView.swift @@ -13,7 +13,7 @@ class QaHeaderView: BaseView { var didSelected:((_ model:QaModelListModel)->Void)? override func setupViews() { -// backgroundColor = .red + backgroundColor = .color(.bgColor) bgView.do { v in v.backgroundColor = .color(.cellBg) v.yc.setCornerRadius(12) @@ -30,6 +30,7 @@ class QaHeaderView: BaseView { v.separatorStyle = .none v.estimatedRowHeight = 50 v.register(QaHeaderViewCell.self, forCellReuseIdentifier: QaHeaderViewCell.reuseID) + v.backgroundColor = .color(.cellBg) } addSubviews([titleLabel,bgView]) @@ -90,6 +91,7 @@ class QaHeaderViewCell: BaseTableViewCell { fatalError("init(coder:) has not been implemented") } override func setupViews() { + contentView.backgroundColor = .color(.cellBg) contentView.addSubviews([titleLabel]) titleLabel.do { (v) in @@ -97,6 +99,7 @@ class QaHeaderViewCell: BaseTableViewCell { v.font = .regular(14) v.textAlignment = .left v.numberOfLines = 0 + v.backgroundColor = .clear } } diff --git a/ShenYin/ShenYin/UI/Mine/Feedback/Commit/FeedbackContactView.swift b/ShenYin/ShenYin/UI/Mine/Feedback/Commit/FeedbackContactView.swift index 367ef62..981a69d 100644 --- a/ShenYin/ShenYin/UI/Mine/Feedback/Commit/FeedbackContactView.swift +++ b/ShenYin/ShenYin/UI/Mine/Feedback/Commit/FeedbackContactView.swift @@ -30,6 +30,7 @@ class FeedbackContactView: BaseView,UITextFieldDelegate { v.font = .regular(14) v.returnKeyType = .done v.delegate = self + v.textColor = .color(.first) } } diff --git a/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackQaListView.swift b/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackQaListView.swift index 936e0ca..10f581a 100644 --- a/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackQaListView.swift +++ b/ShenYin/ShenYin/UI/Mine/Feedback/FeedbackQaListView.swift @@ -67,7 +67,7 @@ class FeedbackQaListViewCell: BaseTableViewCell { } override func setupViews() { contentView.addSubviews([titleLabel]) - + contentView.backgroundColor = .color(.cellBg) titleLabel.do { (v) in v.textColor = .color(.secondary) v.font = .regular(14) diff --git a/ShenYin/ShenYin/UI/Mine/Instructions/SearchBar.swift b/ShenYin/ShenYin/UI/Mine/Instructions/SearchBar.swift index e00225c..c3f917a 100644 --- a/ShenYin/ShenYin/UI/Mine/Instructions/SearchBar.swift +++ b/ShenYin/ShenYin/UI/Mine/Instructions/SearchBar.swift @@ -31,7 +31,7 @@ class SearchBar:UIView{ v.clearButtonMode = .whileEditing v.backgroundColor = .clear v.attributedPlaceholder = NSAttributedString(string: "请输入型号查询".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)]) - + v.textColor = .color(.first) v.returnKeyType = .done v.delegate = self v.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged) diff --git a/ShenYin/ShenYin/UI/common/SendToolBar.swift b/ShenYin/ShenYin/UI/common/SendToolBar.swift index 800be90..c5b51c9 100644 --- a/ShenYin/ShenYin/UI/common/SendToolBar.swift +++ b/ShenYin/ShenYin/UI/common/SendToolBar.swift @@ -33,6 +33,7 @@ class SendToolBar:UIView{ v.attributedPlaceholder = NSAttributedString(string: "请输入...".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)]) v.returnKeyType = .done v.delegate = self + v.textColor = .color(.first) } addSubview(bgView)