From: liangzhenying <867174124@qq.com> Date: Fri, 9 Jan 2026 08:45:42 +0000 (+0800) Subject: 眼镜UI调整 X-Git-Tag: mix-v1.0~18 X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=45376f15f22cd3ef2f6167b54d6715e3d4e47302;p=mirrors%2FShenYin.git 眼镜UI调整 --- diff --git a/ShenYin/ShenYin/Api/HttpClient2.swift b/ShenYin/ShenYin/Api/HttpClient.swift similarity index 100% rename from ShenYin/ShenYin/Api/HttpClient2.swift rename to ShenYin/ShenYin/Api/HttpClient.swift diff --git a/ShenYin/ShenYin/Api/LogManager.swift b/ShenYin/ShenYin/Api/LogManager.swift index f61e054..8735333 100644 --- a/ShenYin/ShenYin/Api/LogManager.swift +++ b/ShenYin/ShenYin/Api/LogManager.swift @@ -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? diff --git a/ShenYin/ShenYin/Api/Config.swift b/ShenYin/ShenYin/Sdk/CCConfig.swift similarity index 55% rename from ShenYin/ShenYin/Api/Config.swift rename to ShenYin/ShenYin/Sdk/CCConfig.swift index c2e37a2..13b0642 100644 --- a/ShenYin/ShenYin/Api/Config.swift +++ b/ShenYin/ShenYin/Sdk/CCConfig.swift @@ -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" +// +//} diff --git a/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift b/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift index 4c88bee..fb9bd72 100644 --- a/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift +++ b/ShenYin/ShenYin/UI/Home/Device/HomeHeadInfoView.swift @@ -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 } diff --git a/ShenYin/ShenYin/UI/Home/Scan/BleScanVC.swift b/ShenYin/ShenYin/UI/Home/Scan/BleScanVC.swift index 13a68e2..0db68c9 100644 --- a/ShenYin/ShenYin/UI/Home/Scan/BleScanVC.swift +++ b/ShenYin/ShenYin/UI/Home/Scan/BleScanVC.swift @@ -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 { diff --git a/ShenYin/ShenYin/UI/common/CommonCell.swift b/ShenYin/ShenYin/UI/common/CommonCell.swift index 6e2646b..f813dae 100644 --- a/ShenYin/ShenYin/UI/common/CommonCell.swift +++ b/ShenYin/ShenYin/UI/common/CommonCell.swift @@ -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 index 0000000..56a676d --- /dev/null +++ b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Contents.json @@ -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 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 index 0000000..3242d04 Binary files /dev/null and b/ShenYin/ShenYin/playboy.xcassets/device/radar_icon.imageset/Slice 140@3x.png differ