眼镜UI调整
authorliangzhenying <867174124@qq.com>
Fri, 9 Jan 2026 08:45:42 +0000 (16:45 +0800)
committerliangzhenying <867174124@qq.com>
Fri, 9 Jan 2026 08:45:42 +0000 (16:45 +0800)
ShenYin/ShenYin/Api/HttpClient.swift [moved from ShenYin/ShenYin/Api/HttpClient2.swift with 100% similarity]
ShenYin/ShenYin/Api/LogManager.swift
ShenYin/ShenYin/Sdk/CCConfig.swift [moved from ShenYin/ShenYin/Api/Config.swift with 55% similarity]
ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift
ShenYin/ShenYin/UI/Home/Scan/BleScanVC.swift
ShenYin/ShenYin/UI/common/CommonCell.swift
ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Contents.json [new file with mode: 0644]
ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@2x.png [new file with mode: 0644]
ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@3x.png [new file with mode: 0644]

index f61e054..8735333 100644 (file)
@@ -9,7 +9,7 @@ import Foundation
 
 /// 日记管理
 class Logger {
-    static var isDebug: Bool = false
+    static var isDebug: Bool = true
     
     fileprivate static let shared = Logger()
     private var fileHandle:FileHandle?
similarity index 55%
rename from ShenYin/ShenYin/Api/Config.swift
rename to ShenYin/ShenYin/Sdk/CCConfig.swift
index c2e37a2..13b0642 100644 (file)
@@ -26,4 +26,22 @@ class DCConfig{
     static let yonghuBaseURL = "https://pub-tos.deepchords.com"
     
 }
-
+//
+//class DCConfig{
+//    static var appLanguage = AppSupportLanguage.english
+//    
+//    static let wxAppID = "wxd9d677e0024caa90"
+//    static let wxUniversalLink = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/app/"
+//    /// 通用链接
+//    //    https://dc-cloud-pub.tos-cn-guangzhou.volces.com/apple-app-site-association
+//    static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8"
+//    /// 版本检测
+//    static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504"
+//    
+//    /// 服务器地址
+//    static let baseURL = "https://app-api.keqianggx.com"
+//    
+//    /// 用户隐私协议地址
+//    static let yonghuBaseURL = "https://pub-tos.deepchords.com"
+//    
+//}
index 4c88bee..fb9bd72 100644 (file)
@@ -8,19 +8,20 @@
 import UIKit
 
 class HomeHeadInfoView: BaseColletionSetionHeader {
+    let icon = UIImageView()
     let titleLabel = UILabel()
     let deviceLabel = UILabel()
     let nameLabel = UILabel()
     override func setupViews() {
-        addSubviews([titleLabel,deviceLabel,nameLabel])
+        addSubviews([icon,titleLabel,deviceLabel,nameLabel])
         
         titleLabel.do { (v) in
             v.textColor = .color(.first)
-            v.font = .regular(32)
+            v.font = .regular(24)
             v.textAlignment = .left
         }
         deviceLabel.do { (v) in
-            v.textColor = .color(.secondary)
+            v.textColor = .color(.tertiary)
             v.font = .regular(14)
             v.textAlignment = .left
             v.text = "共4个智能设备"
@@ -30,19 +31,24 @@ class HomeHeadInfoView: BaseColletionSetionHeader {
             v.font = .medium(22)
             v.textAlignment = .left
             v.text = "设备".l10n
+            v.isHidden = true
         }
     }
     
     override func setupLayout() {
-        
+        icon.snp.makeConstraints { make in
+            make.size.equalTo(50)
+            make.left.equalToSuperview()
+            make.top.equalToSuperview()
+        }
         titleLabel.snp.makeConstraints { (m) in
-            m.top.equalToSuperview().inset(10)
-            m.left.equalToSuperview().inset(14)
+            m.top.equalToSuperview().inset(60)
+            m.left.equalToSuperview().inset(0)
             m.right.equalToSuperview().offset(-20)
         }
         deviceLabel.snp.makeConstraints { (m) in
-            m.top.equalToSuperview().inset(50)
-            m.left.equalToSuperview().inset(14)
+            m.top.equalTo(titleLabel.snp.bottom).offset(0)
+            m.left.equalTo(titleLabel)
             m.height.equalTo(30)
 //            m.width.equalTo(120)
         }
@@ -56,6 +62,7 @@ class HomeHeadInfoView: BaseColletionSetionHeader {
     func updateUI(){
         titleLabel.text = CacheManager.shared.user.info.userName
         deviceLabel.text = "\(DeviceVM.shared.dataList.count) " + "个智能设备".l10n
+        icon.kf.setImage(with:CacheManager.shared.user.info.avatar.yc.asUrl )
     }
     func updateColor(_ model:BackgroundModel?){
         guard let model = model else { return  }
index 13a68e2..0db68c9 100644 (file)
@@ -113,39 +113,56 @@ extension BleScanVC:UITableViewDelegate,UITableViewDataSource {
 
 
 class BleScanHeaderView: BaseView {
-    let rippleView = DGActivityIndicatorView(type: .triplePulse,tintColor: UIColor.color(.theme),size: 250)!
-    var radarImageView = UIImageView()
+     let rippleView = DGActivityIndicatorView(type: .triplePulse,tintColor: UIColor.color(.theme),size: 250)!
+     var radarImageView = UIImageView()
     override func setupViews() {
-//        backgroundColor = .red
-//        rippleView.backgroundColor = .red
-        addSubviews([rippleView,radarImageView])
-        rippleView.startAnimating()
         
-        radarImageView.do { v in
-//            v.image = UIImage(named: "device_logo")
-//            v.backgroundColor = .lightGray
-//            
-//            let animation = CABasicAnimation.init(keyPath: "transform.rotation.z")
-//            animation.beginTime = 0.0
-//            animation.fromValue = 0.0
-//            animation.toValue = 2*Double.pi
-//            animation.duration = 2.5
-//            animation.repeatCount = MAXFLOAT
-//            v.layer.add(animation, forKey: "radar.transform.rotation.x")
-        }
-
-    }
-    override func setupLayout() {
-        radarImageView.snp.makeConstraints { make in
-            make.width.equalTo(58)
-            make.height.equalTo(46)
-            make.center.equalToSuperview()
+        if CCDevice.isJoy {
+            addSubviews([rippleView,radarImageView])
+            rippleView.startAnimating()
+            
+            radarImageView.do { v in
+                v.image = UIImage(named: "device_logo")
+                //
+                //            let animation = CABasicAnimation.init(keyPath: "transform.rotation.z")
+                //            animation.beginTime = 0.0
+                //            animation.fromValue = 0.0
+                //            animation.toValue = 2*Double.pi
+                //            animation.duration = 2.5
+                //            animation.repeatCount = MAXFLOAT
+                //            v.layer.add(animation, forKey: "radar.transform.rotation.x")
+            }
+            radarImageView.snp.makeConstraints { make in
+                make.width.equalTo(58)
+                make.height.equalTo(46)
+                make.center.equalToSuperview()
+            }
+            rippleView.snp.makeConstraints { make in
+                make.size.equalTo(250)
+                make.center.equalToSuperview()
+            }
         }
-        rippleView.snp.makeConstraints { make in
-            make.size.equalTo(250)
-            make.center.equalToSuperview()
+        else{
+            addSubviews([radarImageView])
+            
+            radarImageView.do { v in
+                v.image = UIImage(named: "radar_icon")
+                //
+                let animation = CABasicAnimation.init(keyPath: "transform.rotation.z")
+                animation.beginTime = 0.0
+                animation.fromValue = 0.0
+                animation.toValue = 2*Double.pi
+                animation.duration = 2
+                animation.repeatCount = MAXFLOAT
+                v.layer.add(animation, forKey: "radar.transform.rotation.x")
+            }
+            radarImageView.snp.makeConstraints { make in
+                make.size.equalTo(200)
+                make.center.equalToSuperview()
+            }
         }
     }
+
 }
 
 class ScanStateCell: BaseTableViewCell {
index 6e2646b..f813dae 100644 (file)
@@ -53,6 +53,7 @@ class CommonCell: BaseTableViewCell {
             v.textColor = .color(.secondary)
             v.font = .regular(14)
             v.textAlignment = .right
+            v.adjustsFontSizeToFitWidth = true
         }
     }
     
diff --git a/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Contents.json b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Contents.json
new file mode 100644 (file)
index 0000000..56a676d
--- /dev/null
@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "Slice 140@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "Slice 140@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}
diff --git a/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@2x.png b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@2x.png
new file mode 100644 (file)
index 0000000..43f9da6
Binary files /dev/null and b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@2x.png differ
diff --git a/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@3x.png b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@3x.png
new file mode 100644 (file)
index 0000000..3242d04
Binary files /dev/null and b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@3x.png differ