眼镜UI调整
authorliangzhenying <867174124@qq.com>
Mon, 12 Jan 2026 02:09:31 +0000 (10:09 +0800)
committerliangzhenying <867174124@qq.com>
Mon, 12 Jan 2026 02:09:31 +0000 (10:09 +0800)
ShenYin/ShenYin/Sdk/CCConfig.swift
ShenYin/ShenYin/Sdk/DcSdk/OpusTools.swift
ShenYin/ShenYin/Sdk/LogManager.swift [new file with mode: 0644]
ShenYin/ShenYin/UI/Customer/QaHeaderView.swift
ShenYin/ShenYin/UI/Mine/Feedback/Commit/FeedbackContactView.swift
ShenYin/ShenYin/UI/Mine/Feedback/FeedbackQaListView.swift
ShenYin/ShenYin/UI/Mine/Instructions/SearchBar.swift
ShenYin/ShenYin/UI/common/SendToolBar.swift

index 13b0642..04bda40 100644 (file)
@@ -24,8 +24,10 @@ class DCConfig{
     
     /// 用户隐私协议地址
     static let yonghuBaseURL = "https://pub-tos.deepchords.com"
-    
 }
+
+
+
 //
 //class DCConfig{
 //    static var appLanguage = AppSupportLanguage.english
index 98888c2..8bf323c 100644 (file)
@@ -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 (file)
index 0000000..8735333
--- /dev/null
@@ -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)!)
+    }
+}
index 2fc7d1e..900ed92 100644 (file)
@@ -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
         }
     }
     
index 367ef62..981a69d 100644 (file)
@@ -30,6 +30,7 @@ class FeedbackContactView: BaseView,UITextFieldDelegate {
             v.font = .regular(14)
             v.returnKeyType = .done
             v.delegate = self
+            v.textColor = .color(.first)
         }
     }
     
index 936e0ca..10f581a 100644 (file)
@@ -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)
index e00225c..c3f917a 100644 (file)
@@ -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)
index 800be90..c5b51c9 100644 (file)
@@ -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)