PODS:
- Alamofire (5.10.2)
- FDFullscreenPopGesture (1.1)
+ - FSPagerView (0.8.3)
- HandyJSON (5.0.2)
- IQKeyboardCore (1.0.5)
- IQKeyboardManagerSwift (8.0.1):
- IQKeyboardCore
- IQTextView (1.0.5):
- IQKeyboardToolbar/Placeholderable
+ - JXPagingView/Paging (2.1.3)
+ - JXSegmentedView (1.4.1)
- Kingfisher (6.3.1)
- MJRefresh (3.7.9)
- Moya (15.0.0):
- SVProgressHUD/Core (2.3.1)
- SwiftDate (7.0.0)
- swiftScan (1.2.1)
+ - TabPageViewController (0.2.8)
- TZImagePickerController (3.8.9):
- TZImagePickerController/Basic (= 3.8.9)
- TZImagePickerController/Location (= 3.8.9)
DEPENDENCIES:
- FDFullscreenPopGesture
+ - FSPagerView
- HandyJSON
- IQKeyboardManagerSwift
+ - JXPagingView/Paging
+ - JXSegmentedView
- Kingfisher (~> 6.0)
- MJRefresh
- Moya
- SVProgressHUD
- SwiftDate
- swiftScan
+ - TabPageViewController
- TZImagePickerController
- TZScrollViewPopGesture
- YYModel
https://gitee.com/mirrors/CocoaPods-Specs.git:
- Alamofire
- FDFullscreenPopGesture
+ - FSPagerView
- HandyJSON
- IQKeyboardCore
- IQKeyboardManagerSwift
- IQKeyboardToolbarManager
- IQTextInputViewNotification
- IQTextView
+ - JXPagingView
+ - JXSegmentedView
- Kingfisher
- MJRefresh
- Moya
- SVProgressHUD
- SwiftDate
- swiftScan
+ - TabPageViewController
- TZImagePickerController
- TZScrollViewPopGesture
- YYModel
SPEC CHECKSUMS:
Alamofire: 7193b3b92c74a07f85569e1a6c4f4237291e7496
FDFullscreenPopGesture: a8a620179e3d9c40e8e00256dcee1c1a27c6d0f0
+ FSPagerView: 670405b2f18e2a87fa37f20b00de783e562c25a8
HandyJSON: 9e4e236f5d2dbefad5155a77417bbea438201c03
IQKeyboardCore: 28c8bf3bcd8ba5aa1570b318cbc4da94b861711e
IQKeyboardManagerSwift: 835fc9c6e4732398113406d84900ad2e8f141218
IQKeyboardToolbarManager: 6c693c8478d6327a7ef2107528d29698b3514dbb
IQTextInputViewNotification: f5e954d8881fd9808b744e49e024cc0d4bcfe572
IQTextView: ae13b4922f22e6f027f62c557d9f4f236b19d5c7
+ JXPagingView: afdd2e9af09c90160dd232b970d603cc6e7ddd0e
+ JXSegmentedView: cd73555ce2134d1656db2cb383ba9c2f36fb5078
Kingfisher: 016c8b653a35add51dd34a3aba36b580041acc74
MJRefresh: ff9e531227924c84ce459338414550a05d2aea78
Moya: 138f0573e53411fb3dc17016add0b748dfbd78ee
SVProgressHUD: 4837c74bdfe2e51e8821c397825996a8d7de6e22
SwiftDate: bbc26e26fc8c0c33fbee8c140c5e8a68293a148a
swiftScan: 0849e7d7c1c641384767a573ee8cb90b88d1ddd9
+ TabPageViewController: 8bd4104909754416b35a98f3b72a5b674ab20dd5
TZImagePickerController: 456f470b5dea97b37226ec7a694994a8663340b2
TZScrollViewPopGesture: d36355038259e89372a1f4a2db7e9ca675de2278
YYModel: 2a7fdd96aaa4b86a824e26d0c517de8928c04b30
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
-PODFILE CHECKSUM: 19acd02c42e46af89301b38f52a902320319418e
+PODFILE CHECKSUM: 1a65ab16135db79404233b4f7274d8bc175702fd
COCOAPODS: 1.16.2
let provider = MoyaProvider<CommomApi>()
func request<T: HandyJSON>(_ target: CommomApi,completionHandler:@escaping ((T, String) -> Void)){
+
provider.request(target){ (response) in
+ Logger.debug("url = \(target.baseURL.absoluteString + target.path)")
+ Logger.debug("param = \(response)")
+
+
switch response {
case .success(let value):
let data = value.data
if let str = String(data: data, encoding: .utf8) {
responseStr = str
}
- print("reponse text=>",responseStr)
+ Logger.debug("reponse text=>",responseStr)
if let res = T.deserialize(from: responseStr){
completionHandler(res,responseStr)
return
break
case .failure(let error):
completionHandler(ResponseBaseModel() as! T,"请求失败")
- print("***************\n网络连接失败!\n\(error)\n********************")
+ Logger.debug("***************\n网络连接失败!\n\(error)\n********************")
}
}
}
//
// Created by liangshi on 2025/7/29.
//
-
+//git push --set-upstream origin dev
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "bg_splash.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "dialog_bg.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "dialog_bg_2.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_ai_config.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_break.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_check.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_connect_link.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_connect_log.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_connect_log1.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_connect_product.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_connect_product1.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_device_set.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_dui.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_edit.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_false.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_finger.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_add.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_home.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_home_sel.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_mine.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_mine_sel.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_nodevice.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_scan.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_home_tv.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_link.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_linked.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_logo.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_mac.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_man.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_mine_1.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_mine_2.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_mine_3.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_more.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_more2.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_msg_recoder.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_nopub.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_power.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_product.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_remainber.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_role.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_scam.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_seach.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_speak.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_speek.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_sure.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_tip.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_unlink.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_user.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_vip_year.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_voice.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_voice_jia.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_voice_jian.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_wifi1.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_wifi2.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_wifi3.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_wifi4.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_woman.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_yinse.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "loading.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "splash_tv.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
--- /dev/null
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame (3).png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame (4).png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "081_发现.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "081_发现@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "081_发现@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Frame 134.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Frame 134@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Frame 134@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Frame 220.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Frame 220@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Frame 220@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Group 347.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Group 347@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Group 347@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Group 352.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Group 352@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Group 352@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2191@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2191@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Vector@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Vector@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame_2216@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame_2216@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame_2216@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame_2216@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame_2244@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame_2244@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2255-5 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2255-5.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Group 2401.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Group 2400.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2255-1 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2255-1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2255-2 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2255-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2256.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2255.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Rectangle 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Rectangle.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "icon_录音历史 2.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "icon_录音历史 1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2255-3 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2255-3.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2255-4 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2255-4.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Slice 7@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Slice 7@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame_2243@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame_2243@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "081_主页.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "081_主页@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "081_主页@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "081_主页.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "081_主页@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "081_主页@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "081_我的.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "081_我的@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "081_我的@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "081_我的.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "081_我的@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "081_我的@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
{
"images" : [
{
- "filename" : "bg_base.png",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Vector@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Vector@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "空内容.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "空内容@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "空内容@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Frame 1453.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Frame 1453@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Frame 1453@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Frame(1).png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Frame@2x(1).png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Frame@3x(1).png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Frame(2).png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Frame@2x(2).png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Frame@3x(2).png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
{
"images" : [
{
- "filename" : "ic_back.png",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "Frame 1985.png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "Frame 1985 (1).png",
"idiom" : "universal",
"scale" : "3x"
}
"scale" : "1x"
},
{
- "filename" : "个人中心-进入 1@2x.png",
+ "filename" : "Group 1024.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "个人中心-进入 1@3x.png",
+ "filename" : "Group 1024 (1).png",
"idiom" : "universal",
"scale" : "3x"
}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Frame 134.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Frame 134@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Frame 134@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Group 281.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Group 281@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Group 281@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
{
"images" : [
{
- "filename" : "bg_mine_order.png",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "Frame-7 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "Frame-7.png",
"idiom" : "universal",
"scale" : "3x"
}
{
"images" : [
{
- "filename" : "Frame.png",
"idiom" : "universal",
"scale" : "1x"
},
{
- "filename" : "Frame@2x.png",
+ "filename" : "Frame-1 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
- "filename" : "Frame@3x.png",
+ "filename" : "Frame-1.png",
"idiom" : "universal",
"scale" : "3x"
}
{
"images" : [
{
- "filename" : "bg_login.png",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "Frame-5 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "Frame-5.png",
"idiom" : "universal",
"scale" : "3x"
}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame-4 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame-4.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame-3 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame-3.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "信息.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "信息@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "信息@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "转账.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "转账@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "转账@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame-6 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame-6.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
{
"images" : [
{
- "filename" : "bg_mine_order2.png",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "Frame 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "Frame.png",
"idiom" : "universal",
"scale" : "3x"
}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame-2 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame-2.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "ic_msg.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Rectangle 268.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Rectangle 268@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Rectangle 268@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
+++ /dev/null
-{
- "images" : [
- {
- "filename" : "Rectangle 273.png",
- "idiom" : "universal",
- "scale" : "1x"
- },
- {
- "filename" : "Rectangle 273@2x.png",
- "idiom" : "universal",
- "scale" : "2x"
- },
- {
- "filename" : "Rectangle 273@3x.png",
- "idiom" : "universal",
- "scale" : "3x"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
{
"images" : [
{
- "filename" : "ic_set.png",
"idiom" : "universal",
"scale" : "1x"
},
{
+ "filename" : "Frame (1).png",
"idiom" : "universal",
"scale" : "2x"
},
{
+ "filename" : "Frame (2).png",
"idiom" : "universal",
"scale" : "3x"
}
--- /dev/null
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2254.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2254 (1).png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2250-1 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2250-1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "filename" : "Frame 2249-1.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2251.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2250.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2249-1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2249-1 1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2250.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2249.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2251-1 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2251-1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2251.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2252.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2252-1 1.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2252-1.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2253.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2252.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2253.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2253 (1).png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
--- /dev/null
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "Frame 2254.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "Frame 2253.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
bluetooth.discoverDeviceBlock = discoverDevice(peripheral:data:rssi:)
// 连接设备成功
bluetooth.didConnectBlock = {[weak self] (device) in
- LogManager.instance.add("已连接")
+ Logger.debug("已连接")
self?.selectedPeripheral = device
// self?.didConnect?(device)
}
// 连接设备失败
bluetooth.FailConnectBlock = { (device) in
- LogManager.instance.add("连接失败")
+ Logger.debug("连接失败")
}
// 设备断开连接
bluetooth.disConnectBlock = {[weak self](device) in
- LogManager.instance.add("断开连接")
+ Logger.debug("断开连接")
// SVProgressHUD.showAutoHiden("disconnect")
// self?.retryConnect()
}
// 发现服务
bluetooth.discoverServiceBlock = { (services) in
- LogManager.instance.add("发现服务 \(services)")
+ Logger.debug("发现服务 \(services)")
}
// 发现特征
bluetooth.discoverPeripheralBlock = {[weak self] (characteristics) in
guard let self = self else {return}
- LogManager.instance.add("发现特征 \(characteristics)")
+ Logger.debug("发现特征 \(characteristics)")
for cha in characteristics{
if cha.uuid.uuidString == "FED7" {
self.writeCha = cha
}
// 写入数据(发送指令)成功
bluetooth.didWriteDataBlock = { (peripheral,characteristic,error) in
- LogManager.instance.add("发送指令,错误 = \(error)");
+ Logger.debug("发送指令,错误 = \(error)");
}
}
func discoverDevice(peripheral:CBPeripheral, data:[String : Any],rssi: NSNumber){
func didUpdateStats(_ states:CBManagerState){
switch states{
case .poweredOn:
- LogManager.instance.add("poweredOn")
+ Logger.debug("poweredOn")
@unknown default:
break
}
}
func sendToDevice(_ data:Data){
- LogManager.instance.add("[send] = \(data.hexEncodedString())")
+ Logger.debug("[send] = \(data.hexEncodedString())")
guard let p = selectedPeripheral,let c = writeCha else{
- LogManager.instance.add("请先连接设备!!! ")
+ Logger.debug("请先连接设备!!! ")
return
}
bluetooth.sendTo(peripheral:p , characteristic: c, data: data)
extension BlueToothViewModel{
func receiveData(_ data:Data){
- LogManager.instance.add("[recevice] = \(data.hexEncodedString())")
+ Logger.debug("[recevice] = \(data.hexEncodedString())")
}
public var rgbValue: Int {
switch self {
case .bgColor:
- return 0x11131E
+ return 0xF7F7F7
case .theme:
- return 0x286DE8
+ return 0x0092E1
case .subTheme:
return 0xF4FAFF
case .first:
getRed(&red, green: &green, blue: &blue, alpha: &alpha)
return UIColor(red: red, green: green, blue: blue, alpha: alpha * 0.5)
}
+ static func hexString(_ text: String)->UIColor {
+ var hex = text.trimmingCharacters(in:.whitespacesAndNewlines).uppercased()
+
+ if hex.hasPrefix("#") {
+ hex.removeFirst()
+ }
+
+ var rgbValue: UInt64 = 0
+ Scanner(string: hex).scanHexInt64(&rgbValue)
+
+ let red = CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0
+ let green = CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0
+ let blue = CGFloat(rgbValue & 0x0000FF) / 255.0
+
+ return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
+ }
}
App.shared.window = window
setConfig()
-// window?.rootViewController = LoginVC()
+// window?.rootViewController = UINavigationController(rootViewController: HistoryRecordShareVC())
window?.rootViewController = BaseTC()
-
}
func sceneDidDisconnect(_ scene: UIScene) {
IQKeyboardManager.shared.isEnabled = true
IQKeyboardManager.shared.resignOnTouchOutside = true
}
-}
-class App{
- static let shared = App()
- var window:UIWindow?
- func topVC()->UIViewController!{
- guard let vc = window?.rootViewController else{
- print("页面异常!!!")
- return UIViewController()
- }
- return getTopViewController(from: vc)
- }
-
- private func getTopViewController(from vc: UIViewController) -> UIViewController {
- if let navVC = vc as? UINavigationController {
- return getTopViewController(from: navVC.visibleViewController ?? navVC)
- } else if let tabVC = vc as? UITabBarController {
- return getTopViewController(from: tabVC.selectedViewController ?? tabVC)
- } else if let presentedVC = vc.presentedViewController {
- return getTopViewController(from: presentedVC)
- } else {
- return vc
- }
- }
}
+
+
return String(timeStr.prefix(20))
}
-public func k_logViewControllerDeinit(_ vc: UIViewController) {
- #if DEBUG
- guard let viewDesc = "\(vc.self)".split(separator: ".").last
- else { return }
- print("Deinit: ---> ViewController:\t\(String(viewDesc))")
- #endif
-}
-
public func k_logViewDeinit(_ view: UIView) {
#if DEBUG
guard let desc = "\(view.self)".split(separator: ";").first,
--- /dev/null
+//
+// Date.swift
+// MyBase
+//
+// Created by Harvey on 2021/5/18.
+//
+
+import Foundation
+
+// MARK: - Extension Date
+extension Date {
+
+ static let formatter = DateFormatter()
+
+ struct Format {
+
+ let rawValue: String
+ init(_ rawValue: String) {
+ self.rawValue = rawValue
+ }
+
+ /// e.g. 01:01:01
+ static let time: Format = .init("HH:mm:ss")
+
+ /// e.g. 01:01
+ static let shortTime: Format = .init("HH:mm")
+
+ /// e.g. 01-01
+ static let date: Format = .init("MM-dd")
+
+ /// e.g. 01月01日
+ static let date1: Format = .init("MM月dd日")
+
+ /// e.g. 2020-01-01
+ static let short: Format = .init("yyyy-MM-dd")
+
+ /// e.g. 2020年01月01日
+ static let short1: Format = .init("yyy年MM月dd日")
+
+ /// e.g. 2020-01-01 01:01
+ static let middle: Format = .init("yyyy-MM-dd HH:mm")
+
+ /// e.g. 2020年01月01日 01:01
+ static let middle1: Format = .init("yyy年MM月dd日 HH:mm")
+
+ /// e.g. 2020-01-01 01:01:01
+ static let long: Format = .init("yyyy-MM-dd HH:mm:ss")
+
+ /// e.g. 2020年01月01日 01:01:01
+ static let long1: Format = .init("yyyy年MM月dd日 HH:mm:ss")
+
+ /// e.g. 2020-01-01 01:01:01.088
+ static let full: Format = .init("yyyy-MM-dd HH:mm:ss.SSS")
+
+ /// e.g. 2020年01月01日 01:01:01.088
+ static let full1: Format = .init("yyyy年MM月dd日 HH:mm:ss.SSS")
+ }
+
+ /// 格式化成本地时间
+ func format(_ format: Date.Format = .middle) -> String {
+ Self.formatter.dateFormat = format.rawValue
+ return Self.formatter.string(from: self)
+ }
+
+ enum Unit {
+ case minute(Int)
+ case hour(Int)
+ case day(Int)
+
+ /// 转换成秒
+ var second: TimeInterval {
+ switch self {
+ case .minute(let minute): return 60.0 * Double(minute)
+ case .hour(let hour): return 60.0 * 60.0 * Double(hour)
+ case .day(let day): return 60.0 * 60.0 * 24.0 * Double(day)
+ }
+ }
+ }
+}
+
+let today: Date = .init()
+
+/// 本地化
+extension Date {
+ /// 星期几
+ enum Week: Int {
+ /// 星期日
+ case sun = 1
+ /// 星期一
+ case mon
+ /// 星期二
+ case tue
+ /// 星期三
+ case wed
+ /// 星期四
+ case thur
+ /// 星期五
+ case fri
+ /// 星期六
+ case sat
+ }
+
+// /// 当天的第一秒
+// var fromTimeInterval: TimeInterval {
+// let today = format(.short)
+// return today.timeIntervalSince1970(.short)
+// }
+//
+// /// 当天最后一秒
+// var toTimeInterval: TimeInterval { fromTimeInterval + Unit.day(1).second }
+
+ /// 哪一年
+ var year: Int { component(.year) }
+
+ /// 哪个月
+ var month: Int { component(.month) }
+
+ /// 当月的第几天
+ var day: Int { component(.day) }
+
+ /// 当月的第几天
+ var hour: Int { component(.hour)}
+
+ /// 当月的第几天
+ var minute: Int { component(.minute)}
+
+ /// 当月的第几天
+ var second: Int { component(.second)}
+
+ /// 当月的第几周
+ var weekOfMonth: Int { component(.weekOfMonth) }
+
+ /// 今年的第几周
+ var weekOfYear: Int { component(.weekOfYear) }
+
+ /// 星期几
+ var weekDay: Week { Week(rawValue: component(.weekday))! }
+
+ /// 假设当天是周五,表示本月的第几个周五
+ var weekdayOrdinal: Int { component(.weekdayOrdinal) }
+
+ private func component(_ component: Calendar.Component) -> Int {
+ return Calendar.autoupdatingCurrent.component(component, from: self)
+ }
+}
//
-// LogManager.swift
-// Magpie
+// Logger.swift
//
-// Created by incar on 2024/1/3.
+//
+// Created by Harvey on 2021/4/27.
//
import Foundation
-import UIKit
-class LogManager:NSObject{
+/// 日记管理
+class Logger {
+ static var isDebug: Bool = true
- static let instance = LogManager()
+ fileprivate static let shared = Logger()
+ private var fileHandle:FileHandle?
+ private init() {
+ let path = getPath()
+ fileHandle = FileHandle(forWritingAtPath: path)!
+ // fileHandle?.seekToEndOfFile()
+ }
- var log = "start..."
+ fileprivate var dateString: String { Date().format(.full) }
+ static var logs: [String] = []
- func add(_ text:String){
- let conent = currentTime() + " ~ " + text
- print(conent)
- log += conent + "\n"
- }
- func saveToFile(){
- let document = NSHomeDirectory() + "/Documents/"
- let fileName = currentTime() + ".txt"
- let path = document + fileName
- let urlPath = URL(fileURLWithPath: path)
-
- do{
- try log.write(to: urlPath, atomically: true, encoding: .utf8)
- print("保存成功")
- saveFile(filePath: path)
- }catch{
- print("保存失败!!!!!!!")
+ private func getPath()->String{
+ let foldPath = NSHomeDirectory() + "/Documents/MixSdk/"
+ let fileManager = FileManager.default
+ if !fileManager.fileExists(atPath: foldPath) {
+ do {
+ try FileManager.default.createDirectory(atPath: foldPath, withIntermediateDirectories: true, attributes: nil)
+ } catch {
+ return ""
+ }
}
- }
-
- func currentTime()->String{
- let dateformatter = DateFormatter()
- dateformatter.dateFormat = "YYYY-MM-dd HH:mm:ss S"// 自定义时间格式
- let time = dateformatter.string(from: Date())
- return time
+ 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 LogManager:UIDocumentPickerDelegate{
- //保存文件到手机文件指定目录
- func saveFile(filePath:String) {
- let fUrl = NSURL(fileURLWithPath: filePath)
- let vc = UIDocumentPickerViewController(url: fUrl as URL, in: .exportToService);
- vc.delegate = self
- vc.modalPresentationStyle = .overFullScreen
- UIApplication.shared.keyWindow?.rootViewController?.present(vc, animated: true)
+extension Logger {
+ static func debug(_ logs: Any..., line: Int = #line, separator: String = " ", terminator: String = "\n") {
+ objc_sync_enter(Logger.shared)
+ if Logger.isDebug {
+ print(Logger.shared.dateString, terminator: " [MixSdk-\(String(format: "%03d", line))]: ")
+ print(logs, separator: separator, terminator: terminator)
+ let logString = Logger.shared.dateString + " [MixSdk-\(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)
+
+
}
- public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
- controller.dismiss(animated: true)
+
+ private func saveLog(log:String){
+ fileHandle?.write(log.data(using: .utf8)!)
}
}
+++ /dev/null
-//
-// Logs.swift
-// Syntax-SNSwfitPackage
-//
-// Created by zyt on 2018/12/20.
-// Copyright © 2018 zsh. All rights reserved.
-//
-
-import Foundation
-
-
-public func SNLog<T>(_ message: T, file: String = #file, function: String = #function, line: Int = #line) {
- #if DEBUG
- var fileName = file as NSString
-
- fileName = fileName.lastPathComponent as NSString
- print("[\(Date().timeIntervalSince1970) \(fileName)--\(function)--\(line) : \(message)]")
- #endif
-}
--- /dev/null
+//
+// AppManager.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+class App{
+ static let shared = App()
+ var window:UIWindow?
+ func topVC()->UIViewController!{
+ guard let vc = window?.rootViewController else{
+ print("页面异常!!!")
+ return UIViewController()
+ }
+ return getTopViewController(from: vc)
+ }
+
+ func goToPage(_ viewController: UIViewController,animated:Bool = true){
+ viewController.hidesBottomBarWhenPushed = true
+ topVC().navigationController?.pushViewController(viewController, animated: animated)
+ }
+
+
+}
+extension App{
+ private func getTopViewController(from vc: UIViewController) -> UIViewController {
+ if let navVC = vc as? UINavigationController {
+ return getTopViewController(from: navVC.visibleViewController ?? navVC)
+ } else if let tabVC = vc as? UITabBarController {
+ return getTopViewController(from: tabVC.selectedViewController ?? tabVC)
+ } else if let presentedVC = vc.presentedViewController {
+ return getTopViewController(from: presentedVC)
+ } else {
+ return vc
+ }
+ }
+}
case image(UIImage?)
}
-public enum BaseNavigationRightStyle {
- case share
- case title(String, norColor: UIColor, disColor: UIColor)
- case image(UIImage?)
-}
-
public enum BaseNavigationTitleStyle {
case `default`
case custom(titleColor: UIColor, bgColor: UIColor)
func navRightViewTapped()
}
+class NavigationRightItem{
+ var title:String?
+ var image:UIImage?
+ var target:Any?
+ var action:Selector?
+ public init(title: String?, target:Any?,action: Selector) {
+ self.title = title
+ self.action = action
+ self.target = target
+ }
+ public init(image: UIImage?,target:Any?, action: Selector) {
+ self.image = image
+ self.action = action
+ self.target = target
+ }
+}
+
public class BaseNavigationBar: UIView {
public weak var delegate: BaseNavigationBarDelegate?
public let leftView = UIButton()
public let titleLabel = UILabel()
public let separatorLine = UIView()
- public lazy var rightView: UIButton = {
- return setupRightView()
- }()
+ public lazy var rightView = setupRightView()
private var navTitle: String
public init(title: String = "", delegate: BaseNavigationBarDelegate? = nil) {
leftView.setImage(image, for: .normal)
}
}
-
- func setRightStyle(_ style: BaseNavigationRightStyle) -> UIButton {
- switch style {
- case .share:
- let img = UIImage.init(named: "card_detail_share_black")?.withRenderingMode(.alwaysOriginal)
- rightView.setImage(img, for: .normal)
- case .image(let image):
- rightView.setImage(image, for: .normal)
- case .title(let title, let norColor, let disColor):
- rightView.setTitle(title, for: .normal)
- rightView.setTitleColor(norColor, for: .normal)
- rightView.setTitleColor(disColor, for: .disabled)
- }
- return rightView
- }
+
func setTitleStyle(_ style: BaseNavigationTitleStyle) {
switch style {
case .default:
- titleLabel.textColor = .white
+ titleLabel.textColor = .rgb(0x232323)
self.backgroundColor = .white
case .custom(let titleColor,let bgColor):
titleLabel.textColor = titleColor
}
func setupStyle() {
- backgroundColor = .rgb(0x11131E)
+ backgroundColor = .color(.bgColor)
alphaBgView.backgroundColor = UIColor.white
alphaBgView.alpha = 0
- separatorLine.backgroundColor = .white.withAlphaComponent(0.1)
+ separatorLine.backgroundColor = .black.withAlphaComponent(0.1)
separatorLine.isHidden = true
titleLabel.do { (v) in
- v.textColor = .white
- v.font = .medium(16)
+ v.textColor = .rgb(0x121212)
+ v.font = .medium(20)
v.textAlignment = .center
v.lineBreakMode = .byTruncatingTail
v.text = navTitle
}
return rightBtn
}
+
+ @discardableResult
+ func setupRightViews(_ list:[NavigationRightItem])->[UIButton]{
+ var views = [UIButton]()
+ var x = 0
+ let w = 40
+ for item in list {
+ let rightBtn = UIButton()
+// rightBtn.backgroundColor = .red
+ addSubview(rightBtn)
+ rightBtn.snp.makeConstraints { (m) in
+ m.top.equalTo(kNavTop)
+ m.bottom.equalToSuperview()
+ m.width.greaterThanOrEqualTo(w)
+ m.right.equalToSuperview().inset(x)
+ }
+ rightBtn.do { (v) in
+ v.setTitleColor(.rgb(0x222222), for: .normal)
+ v.contentEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 10)
+ v.imageView?.contentMode = .right
+ if let img = item.image {
+ v.setImage(img, for: .normal)
+ }
+ else{
+ v.setTitle(item.title!, for: .normal)
+ }
+ v.addTarget(self, action: item.action!, for: .touchUpInside)
+ }
+ views.append(rightBtn)
+ x = x + w
+ }
+ return views
+ }
}
}
}
func show(animate:Bool = true) -> Void {
-// app.window?.addSubview(self)
+ App.shared.window?.addSubview(self)
if(animate){
self.contentView.transform = CGAffineTransform.init(translationX: 0, y: self.contentH)
class BaseTC:UITabBarController{
let homeVC = HomeVC()
- let mine = MineVC()
+ let modeVC = ModeVC()
+ let sleepVC = SleepVC()
+ let customerVC = CustomerVC()
+ let mineVC = MineVC()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
- view.backgroundColor = .color(.bgColor)
setupUI()
}
func setupUI(){
- self.tabBar.backgroundColor = .rgb(0x212935)
- let item0 = UITabBarItem(title: "home", image: UIImage(named: "tab_0_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_0_selected")?.withRenderingMode(.alwaysOriginal))
+
+ let item0 = UITabBarItem(title: "AI智能", image: UIImage(named: "tab_0_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_0_selected")?.withRenderingMode(.alwaysOriginal))
let nc0 = BaseNC(rootViewController: homeVC)
nc0.tabBarItem = item0
- let item1 = UITabBarItem(title: "set", image: UIImage(named: "tab_1_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_1_selected")?.withRenderingMode(.alwaysOriginal))
- let nc1 = BaseNC(rootViewController: mine)
+ let item1 = UITabBarItem(title: "模式", image: UIImage(named: "tab_1_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_1_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc1 = BaseNC(rootViewController: modeVC)
nc1.tabBarItem = item1
- self.viewControllers = [nc0,nc1]
+
+ let item2 = UITabBarItem(title: "睡眠", image: UIImage(named: "tab_2_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_2_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc2 = BaseNC(rootViewController: sleepVC)
+ nc2.tabBarItem = item2
+
+ let item3 = UITabBarItem(title: "客服", image: UIImage(named: "tab_3_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_3_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc3 = BaseNC(rootViewController: customerVC)
+ nc3.tabBarItem = item3
+
+ let item4 = UITabBarItem(title: "我的", image: UIImage(named: "tab_4_normal")?.withRenderingMode(.alwaysOriginal), selectedImage: UIImage(named: "tab_4_selected")?.withRenderingMode(.alwaysOriginal))
+ let nc4 = BaseNC(rootViewController: mineVC)
+ nc4.tabBarItem = item4
+
+ self.viewControllers = [nc0,nc1,nc2,nc3,nc4]
+
let appearance = UITabBarAppearance()
appearance.configureWithDefaultBackground()
- appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white.withAlphaComponent(0.5)]
- appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.theme)]
+ appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.rgb(0x121212)]
+ appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.rgb(0x8D8D8D)]
self.tabBar.standardAppearance = appearance
-
- self.selectedIndex = 1
+ self.tabBar.backgroundColor = .white
+ view.backgroundColor = .color(.bgColor)
+
+ self.selectedIndex = 0
}
}
open class BaseVC:UIViewController, UIGestureRecognizerDelegate {
-
+ let logBtn = UIButton(type: .custom)
let navBar = BaseNavigationBar()
public init() {
override open func viewDidLoad() {
super.viewDidLoad()
navBar.delegate = self
- view.backgroundColor = .rgb(0x11131E)
+ view.backgroundColor = .color(.bgColor)
view.addSubview(navBar)
// self.automaticallyAdjustsScrollViewInsets = false
navigationController?.navigationBar.isHidden = true
- hidesBottomBarWhenPushed = true
-
+ if self.isKind(of: HomeVC.self) ||
+ self.isKind(of: ModeVC.self) ||
+ self.isKind(of: SleepVC.self) ||
+ self.isKind(of: CustomerVC.self) ||
+ self.isKind(of: MineVC.self){
+// hidesBottomBarWhenPushed = true
+ navBar.leftView.isHidden = true
+ }
setupViews()
setupLayout()
+ addLog()
+ }
+ open override func viewWillAppear(_ animated: Bool) {
+ super.viewWillAppear(animated)
+ self.view.bringSubviewToFront(logBtn)
}
open override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
deinit {
- k_logViewControllerDeinit(self)
+ Logger.debug("deinit \(Self.self)")
}
override open func didReceiveMemoryWarning() {
func setupLayout(){
}
+
+ func addLog(){
+ logBtn.frame = CGRect(x: UIScreen.main.bounds.size.width - 80, y: 200, width:60, height: 60)
+ logBtn.backgroundColor = .blue
+ logBtn.layer.cornerRadius = 30
+ logBtn.layer.masksToBounds = true
+ logBtn.setTitle("log", for: .normal)
+ logBtn.addTarget(self, action: #selector(logAction), for: .touchUpInside)
+ view.addSubview(logBtn)
+ }
+ @objc func logAction(){
+ App.shared.goToPage(LogVC())
+ }
}
extension BaseVC: BaseNavigationBarDelegate {
navBar.leftView.setTitle(title, for: .normal)
return navBar.leftView
}
-
- @discardableResult
- public func setNavRight(icon: UIImage?) -> UIButton {
- navBar.rightView.setImage(icon, for: .normal)
- return navBar.rightView
- }
-
- @discardableResult
- public func setNavRight(title: String,
- norColor: UIColor = .black,
- disColor: UIColor = .gray,
- titleFont: UIFont = .regular(14, isFit: false)) -> UIButton {
- navBar.rightView.setTitleColor(norColor, for: .normal)
- navBar.rightView.setTitleColor(disColor, for: .disabled)
- navBar.rightView.titleLabel?.font = titleFont
- navBar.rightView.setTitle(title, for: .normal)
- return navBar.rightView
- }
+
}
--- /dev/null
+//
+// LogVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+class LogVC: BaseVC {
+
+ var textView = UITextView()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ }
+
+ override func setupViews() {
+ navBar.title = "log"
+ view.backgroundColor = .white
+ navBar.title = "log"
+ navBar.rightView.setTitle("保存", for: .normal)
+
+ textView.isEditable = false
+ view.addSubview(textView)
+ textView.snp.makeConstraints { make in
+ make.top.equalTo(kNavBtm)
+ make.left.right.bottom.equalToSuperview()
+ }
+ }
+
+ override func viewDidAppear(_ animated: Bool) {
+ super.viewDidAppear(animated)
+
+ textView.text = Logger.logs.joined()
+ let range = NSMakeRange(textView.text.count - 1, 1)
+ textView.scrollRangeToVisible(range)
+ }
+
+ override func navRightViewTapped() {
+ shareAction()
+ }
+
+ @objc func shareAction() {
+ let formatter = DateFormatter()
+ formatter.dateFormat = "yyyyMMddHHmmss"
+ let name = formatter.string(from: Date())
+
+ let filePath = "\(NSHomeDirectory())/Documents/ShenYin_\(name).txt"
+ let url = URL(fileURLWithPath: filePath)
+ let data = self.textView.text.data(using:.utf8)
+ do {
+ try data?.write(to: url, options:.atomic)
+ print(filePath)
+ self.saveFile(withFilePath: filePath)
+ } catch {
+ print(error)
+ }
+ }
+
+ func saveFile(withFilePath filePath: String) {
+ let fUrl = URL(fileURLWithPath: filePath)
+ let vc = UIDocumentPickerViewController(url: fUrl, in:.exportToService)
+ vc.delegate = self
+ vc.modalPresentationStyle = .overFullScreen
+ self.present(vc, animated: true, completion: nil)
+ }
+}
+
+extension LogVC:UIDocumentPickerDelegate{
+ func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
+ controller.dismiss(animated: true, completion: nil)
+ }
+}
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/5.
+//
+
+import UIKit
+
+class CustomerVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ self.navBar.title = "客服"
+
+ }
+ override func setupViews() {
+ navBar.rightView.setImage(UIImage(named: "help_icon"), for: .normal)
+ }
+ override func setupLayout() {
+
+ }
+ override func navRightViewTapped() {
+
+ }
+}
--- /dev/null
+//
+// CallingRecordVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class CallingRecordVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "通话录音"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// ChatVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class ChatVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "对话"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// Chinese2EnglishVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+
+import UIKit
+
+class Chinese2EnglishVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "中英互译"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// DialogTranlateVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class DialogTranlateVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "对话翻译"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// FieldRecordingVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class FieldRecordingVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "现场录音"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// HistoryBottonView.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+class HistoryBottonView: BaseView {
+ let titleLabel = UILabel()
+ var type = ModeEffectsType.fashion{
+ didSet{
+ titleLabel.text = type.title
+ }
+ }
+
+ override func setupViews() {
+ addSubviews([titleLabel])
+ titleLabel.do { (v) in
+ v.textColor = .hexString("#666666")
+ v.font = .regular(14)
+ v.numberOfLines = 0
+
+ let attachment = NSTextAttachment()
+ attachment.image = UIImage(named: "tips_icon2")
+ attachment.bounds = CGRect(x: 0, y: 0, width: 12, height: 12)
+ let attachmentString = NSAttributedString(attachment: attachment)
+
+ let text = " 由于录音文件存储在手机本地,因此软件卸载后,您的录音数据将全部丢失。耳机内置存储的录音文件可以通过APP下载到手机中,并支持备注和重命名等操作。"
+ let textString = NSAttributedString(string: text)
+
+ let mutableAttributedString = NSMutableAttributedString()
+ mutableAttributedString.append(attachmentString)
+ mutableAttributedString.append(textString)
+ v.attributedText = mutableAttributedString
+ }
+ }
+
+ override func setupLayout() {
+ titleLabel.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(18)
+ make.top.equalToSuperview().inset(20)
+ make.bottom.equalToSuperview().inset(33)
+ }
+ }
+}
--- /dev/null
+//
+// HistoryFontVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/13.
+//
+
+import UIKit
+class HistoryFontVC: BaseVC{
+ let tableView = UITableView(frame: .zero, style: .plain)
+ var list:[FontType] = [.min,.stand,.big]
+ var currentType = FontType.stand
+ let btn = CustomButton()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ }
+ override func setupViews() {
+ self.navBar.title = "调整字号"
+ tableView.do { v in
+ v.backgroundColor = .rgb(0xF7F7F7)
+ v.delegate = self
+ v.dataSource = self
+ v.rowHeight = 52
+ v.separatorStyle = .none
+ v.register(SelectCell.self, forCellReuseIdentifier: SelectCell.reuseID)
+ }
+ view.addSubviews([tableView,btn])
+
+ btn.set(title: "设置", target: self, action: #selector(btnAction))
+ }
+ override func setupLayout() {
+ tableView.snp.makeConstraints { make in
+ make.left.right.bottom.equalToSuperview()
+ make.top.equalTo(kNavBtm)
+ }
+ btn.snp.makeConstraints { make in
+ make.width.equalTo(272)
+ make.height.equalTo(46)
+ make.centerX.equalToSuperview()
+ make.bottom.equalToSuperview().inset(82)
+ }
+ }
+ @objc func btnAction(){
+
+ }
+}
+
+extension HistoryFontVC:UITableViewDelegate,UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return list.count
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = SelectCell.cell(withTableView: tableView, indexPath: indexPath)
+ cell.fontType = list[indexPath.row]
+ let rect = CGRect(x: 0, y: 0, width: kScreenWid - 36, height: 52)
+ if indexPath.row == 0 {
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 8, height: 8))
+ }
+ else if indexPath.row == list.count - 1{
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: 8, height: 8))
+ }
+ else{
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.allCorners], cornerRadii: CGSize(width: 0, height: 0))
+ }
+ cell.selectedIcon.isHidden = cell.fontType != currentType
+ return cell
+ }
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ let data = list[indexPath.row]
+ currentType = data
+ tableView.reloadData()
+ }
+}
+
+
--- /dev/null
+//
+// HistoryRecordCell.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+
+class HistoryRecordCell: BaseTableViewCell {
+ let bgView = UIView()
+ let playIcon = UIImageView()
+ let titleLabel = UILabel()
+ let collectionIcon = UIImageView()
+ let durationLabel = UILabel()
+ let dateLabel = UILabel()
+ let typeLabel = UILabel()
+
+ var type:MineCellType = .user{
+ didSet{
+ titleLabel.text = type.title
+ }
+ }
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+ override func setupViews() {
+ contentView.addSubview(bgView)
+ bgView.addSubviews([playIcon,titleLabel,durationLabel,collectionIcon,typeLabel,dateLabel])
+
+ backgroundColor = .rgb(0xF7F7F7)
+ contentView.backgroundColor = .clear
+ selectionStyle = .none
+ bgView.do { v in
+ v.backgroundColor = UIColor.white
+ v.layer.cornerRadius = 12
+ v.layer.masksToBounds = true
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(16)
+ v.textAlignment = .left
+ v.text = "周一会议总结"
+ }
+ durationLabel.do { (v) in
+ v.textColor = .rgb(0x666666)
+ v.font = .regular(12)
+ v.textAlignment = .left
+ v.text = "00:32:27"
+ }
+ typeLabel.do { (v) in
+ v.textColor = .rgb(0x666666)
+ v.font = .regular(12)
+ v.textAlignment = .left
+ v.text = "现场录音"
+ }
+ dateLabel.do { (v) in
+ v.textColor = .rgb(0x666666)
+ v.font = .regular(12)
+ v.textAlignment = .left
+ v.text = "2025-06-02 10:28"
+ }
+ collectionIcon.image = UIImage(named: "collection_selected")
+ playIcon.do { v in
+ v.backgroundColor = .lightGray
+ }
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview().inset(15)
+ m.top.equalToSuperview().inset(5)
+ m.bottom.equalToSuperview().inset(5)
+ m.height.equalTo(74)
+ }
+
+ playIcon.snp.makeConstraints { (m) in
+ m.width.equalTo(30)
+ m.height.equalTo(30)
+ m.left.equalToSuperview().inset(14)
+ m.centerY.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.top.equalTo(16)
+ m.left.equalToSuperview().offset(52)
+ }
+ collectionIcon.snp.makeConstraints { (m) in
+ m.size.equalTo(16)
+ m.left.equalTo(titleLabel.snp.right).offset(8)
+ m.centerY.equalTo(titleLabel)
+ }
+
+ durationLabel.snp.makeConstraints { (m) in
+ m.bottom.equalToSuperview().inset(16)
+ m.left.equalTo(titleLabel)
+ }
+ typeLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview().inset(16)
+ m.right.equalToSuperview().inset(14)
+ }
+ dateLabel.snp.makeConstraints { (m) in
+ m.bottom.equalToSuperview().inset(16)
+ m.right.equalTo(typeLabel)
+ }
+ }
+}
--- /dev/null
+//
+// HistoryRecordShareVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/13.
+//
+
+import UIKit
+class HistoryRecordShareVC: BaseVC{
+ let tableView = UITableView(frame: .zero, style: .plain)
+ var list:[ShareType] = [.audio_document,.audio,.document]
+ var currentType = ShareType.audio_document
+ let btn = CustomButton()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ }
+ override func setupViews() {
+ self.navBar.title = "分享"
+ tableView.do { v in
+ v.backgroundColor = .rgb(0xF7F7F7)
+ v.delegate = self
+ v.dataSource = self
+ v.rowHeight = 52
+ v.separatorStyle = .none
+ v.register(SelectCell.self, forCellReuseIdentifier: SelectCell.reuseID)
+ v.tableHeaderView = ShareHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWid, height: 70))
+ }
+ view.addSubviews([tableView,btn])
+
+ btn.set(title: "设置", target: self, action: #selector(btnAction))
+ }
+ override func setupLayout() {
+ tableView.snp.makeConstraints { make in
+ make.left.right.bottom.equalToSuperview()
+ make.top.equalTo(kNavBtm)
+ }
+ btn.snp.makeConstraints { make in
+ make.width.equalTo(272)
+ make.height.equalTo(46)
+ make.centerX.equalToSuperview()
+ make.bottom.equalToSuperview().inset(82)
+ }
+ }
+ @objc func btnAction(){
+
+ }
+}
+
+extension HistoryRecordShareVC:UITableViewDelegate,UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return list.count
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = SelectCell.cell(withTableView: tableView, indexPath: indexPath)
+ cell.shareType = list[indexPath.row]
+ let rect = CGRect(x: 0, y: 0, width: kScreenWid - 36, height: 52)
+ if indexPath.row == 0 {
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 8, height: 8))
+ }
+ else if indexPath.row == list.count - 1{
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: 8, height: 8))
+ }
+ else{
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.allCorners], cornerRadii: CGSize(width: 0, height: 0))
+ }
+ cell.selectedIcon.isHidden = cell.shareType != currentType
+ return cell
+ }
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ let data = list[indexPath.row]
+ currentType = data
+ tableView.reloadData()
+ }
+}
+
+class ShareHeaderView: BaseView {
+ let titleLabel = UILabel()
+
+ override func setupViews() {
+ addSubviews([titleLabel])
+ titleLabel.do { (v) in
+ v.textColor = .hexString("#666666")
+ v.font = .regular(14)
+ v.numberOfLines = 0
+
+ let text = "多个文件将压缩成一个.zip的文件以便于分享。请选择您需要导出的文件类型:"
+ let textString = NSAttributedString(string: text)
+ let mutableAttributedString = NSMutableAttributedString()
+ mutableAttributedString.append(textString)
+ v.attributedText = mutableAttributedString
+ }
+ }
+
+ override func setupLayout() {
+ titleLabel.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(18)
+ make.top.equalToSuperview()
+ make.bottom.equalToSuperview()
+ }
+ }
+}
--- /dev/null
+//
+// HistoryRecordVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+
+import UIKit
+class HistoryRecordVC: BaseVC{
+ let tableView = UITableView(frame: .zero, style: .plain)
+ let bottomView = HistoryBottonView()
+ var list:[MineCellType] = [.user,.device,.userAgreement,.privacyPolicy,.language,.update,.feeback,.about]
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ }
+ override func setupViews() {
+ navBar.do { v in
+ v.title = "历史录音"
+ let items = [NavigationRightItem(image: UIImage(named: "filter"),target: self, action: #selector(searchAction)),NavigationRightItem(image: UIImage(named: "search"), target: self,action: #selector(searchAction))]
+ v.setupRightViews(items)
+ }
+
+ tableView.do { v in
+ v.backgroundColor = .rgb(0xF7F7F7)
+ v.delegate = self
+ v.dataSource = self
+ v.estimatedRowHeight = 84
+ v.separatorStyle = .none
+ v.register(HistoryRecordCell.self, forCellReuseIdentifier: HistoryRecordCell.reuseID)
+ }
+ view.addSubviews([tableView,bottomView])
+ }
+ override func setupLayout() {
+ bottomView.snp.makeConstraints { make in
+ make.left.right.bottom.equalToSuperview()
+ }
+ tableView.snp.makeConstraints { make in
+ make.left.right.equalToSuperview()
+ make.top.equalTo(kNavBtm)
+ make.bottom.equalTo(bottomView.snp.top)
+ }
+ }
+ @objc func searchAction(){
+
+ }
+ @objc func filterAction(){
+
+ }
+}
+
+extension HistoryRecordVC:UITableViewDelegate,UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return list.count
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = HistoryRecordCell.cell(withTableView: tableView, indexPath: indexPath)
+ cell.type = list[indexPath.row]
+ return cell
+ }
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ let data = list[indexPath.row]
+
+ }
+ // 实现滑动删除功能
+ func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
+ if editingStyle == .delete {
+ // 从数据源中移除对应数据
+ list.remove(at: indexPath.row)
+ // 从表格中删除对应行
+ tableView.deleteRows(at: [indexPath], with:.fade)
+ }
+ }
+
+ // 允许编辑
+ func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
+ return true
+ }
+}
--- /dev/null
+//
+// SelecteCell.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/13.
+//
+
+
+enum FontType:Int{
+ case min
+ case stand
+ case big
+ var title:String{
+ switch self {
+ case .min:
+ return "小"
+ case .stand:
+ return "标准"
+ case .big:
+ return "大"
+ }
+ }
+}
+
+enum ShareType:Int{
+ case audio
+ case document
+ case audio_document
+ var title:String{
+ switch self {
+ case .audio:
+ return "仅音频文件"
+ case .document:
+ return "仅文档"
+ case .audio_document:
+ return "音频文件+文档"
+ }
+ }
+}
+
+
+
+class SelectCell: BaseTableViewCell {
+ let bgView = UIView()
+ let titleLabel = UILabel()
+ let selectedIcon = UIImageView()
+ let line = UIView()
+
+ var fontType:FontType = .min{
+ didSet{
+ titleLabel.text = fontType.title
+ }
+ }
+
+ var shareType:ShareType = .document{
+ didSet{
+ titleLabel.text = shareType.title
+ }
+ }
+
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+ override func setupViews() {
+ contentView.addSubview(bgView)
+ bgView.addSubviews([titleLabel,selectedIcon,line])
+
+ backgroundColor = .rgb(0xF7F7F7)
+ contentView.backgroundColor = .clear
+ selectionStyle = .none
+ bgView.do { v in
+ v.backgroundColor = UIColor.white
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(14)
+ v.textAlignment = .left
+ }
+
+ selectedIcon.image = UIImage(named: "cell_selected")
+ line.do { v in
+ v.backgroundColor = .hexString("#F2F2F2")
+ }
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview().inset(18)
+ m.top.equalToSuperview()
+ m.bottom.equalToSuperview()
+ }
+ selectedIcon.snp.makeConstraints { (m) in
+ m.width.equalTo(21)
+ m.height.equalTo(16)
+ m.right.equalToSuperview().inset(22)
+ m.centerY.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.centerY.equalToSuperview()
+ m.left.equalToSuperview().offset(16)
+ m.height.equalToSuperview()
+ }
+ line.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(18)
+ make.bottom.equalToSuperview()
+ make.height.equalTo(0.4)
+ }
+ }
+}
+++ /dev/null
-//
-// HomeVC.swift
-// Magpie
-//
-// Created by incar on 2024/1/3.
-//
-
-import UIKit
-
-class HomeVC:BaseVC{
-
- override func viewDidLoad() {
- super.viewDidLoad()
- self.navBar.title = "首页"
-
- self.navBar.rightView.setTitle("more", for: .normal)
- }
-
- override func navRightViewTapped() {
- let v = BasePickerView()
- v.setupData(["2","3","4","5","6","7","8"])
- v.selectedIndex(4)
- v.show(animate: true)
- return
- }
-
- @objc func addDeviceAction(){
- let vc = ScanDeviceVC()
- self.navigationController?.pushViewController(vc, animated: true)
- }
- @objc func saveAction(){
-// LogManager.instance.add("保存")
-// LogManager.instance.saveToFile()
-
-// SVProgressHUD.showLoading()
-// HttpClient.instance.request(CommomApi.login(userName: "")) { (model:ResponseBaseModel, res) in
-// if model.isSuccess{
-//// SVProgressHUD.show(withStatus: "请求成功")
-// }
-// else{
-//// SVProgressHUD.show(withStatus: "请求失败")
-// }
-// }
- }
-}
-
--- /dev/null
+//
+// RecordTranslateVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+
+import UIKit
+
+class RecordTranslateVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "同声传译"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// RoleListVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+class RoleListVC: BaseVC{
+ let tableView = UITableView(frame: .zero, style: .plain)
+ var list:[MineCellType] = [.user,.device,.userAgreement,.privacyPolicy,.language,.update,.feeback,.about]
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ }
+ override func setupViews() {
+ self.navBar.title = "角色切换"
+ tableView.do { v in
+ v.backgroundColor = .rgb(0xF7F7F7)
+ v.delegate = self
+ v.dataSource = self
+ v.rowHeight = 52
+ v.separatorStyle = .none
+ v.register(RoleListCell.self, forCellReuseIdentifier: RoleListCell.reuseID)
+ }
+ view.addSubview(tableView)
+ }
+ override func setupLayout() {
+ tableView.snp.makeConstraints { make in
+ make.left.right.bottom.equalToSuperview()
+ make.top.equalTo(kNavBtm)
+ }
+ }
+}
+
+extension RoleListVC:UITableViewDelegate,UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return list.count
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = RoleListCell.cell(withTableView: tableView, indexPath: indexPath)
+// cell.type = list[indexPath.row]
+ let rect = CGRect(x: 0, y: 0, width: kScreenWid - 36, height: 52)
+ if indexPath.row == 0 {
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 8, height: 8))
+ }
+ else if indexPath.row == list.count - 1{
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: 8, height: 8))
+ }
+ else{
+ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.allCorners], cornerRadii: CGSize(width: 0, height: 0))
+ }
+ return cell
+ }
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ let data = list[indexPath.row]
+ }
+}
+
+
+class RoleListCell: BaseTableViewCell {
+ let bgView = UIView()
+ let icon = UIImageView()
+ let titleLabel = UILabel()
+ let selectedIcon = UIImageView()
+ let line = UIView()
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+ override func setupViews() {
+ contentView.addSubview(bgView)
+ bgView.addSubviews([titleLabel,icon,selectedIcon,line])
+
+ backgroundColor = .rgb(0xF7F7F7)
+ contentView.backgroundColor = .clear
+ selectionStyle = .none
+ bgView.do { v in
+ v.backgroundColor = UIColor.white
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(14)
+ v.textAlignment = .left
+ v.text = "阳光大男孩"
+ }
+ icon.do { v in
+ v.backgroundColor = .lightGray
+ v.yc.setCornerRadius(18)
+ }
+ selectedIcon.image = UIImage(named: "cell_selected")
+ line.do { v in
+ v.backgroundColor = .hexString("#F2F2F2")
+ }
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview().inset(18)
+ m.top.equalToSuperview()
+ m.bottom.equalToSuperview()
+ }
+ selectedIcon.snp.makeConstraints { (m) in
+ m.width.equalTo(21)
+ m.height.equalTo(16)
+ m.right.equalToSuperview().inset(22)
+ m.centerY.equalToSuperview()
+ }
+ icon.snp.makeConstraints { (m) in
+ m.width.equalTo(36)
+ m.height.equalTo(36)
+ m.left.equalToSuperview().inset(18)
+ m.centerY.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.centerY.equalTo(icon)
+ m.left.equalTo(icon.snp.right).offset(8)
+ m.height.equalToSuperview()
+ }
+ line.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(18)
+ make.bottom.equalToSuperview()
+ make.height.equalTo(0.4)
+ }
+ }
+}
--- /dev/null
+//
+// CurrentDeviceView.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+class CurrentDeviceView: BaseView {
+ let icon = UIImageView()
+ override func setupViews() {
+// backgroundColor = .blue
+ addSubviews([icon])
+ icon.do { v in
+ //v.backgroundColor = .lightGray
+ v.image = UIImage(named: "home_header")
+ }
+ }
+
+ override func setupLayout() {
+ icon.snp.makeConstraints { make in
+ make.width.equalTo(168)
+ make.height.equalTo(138)
+ make.centerX.equalToSuperview()
+ make.top.equalToSuperview().inset(20)
+ make.bottom.equalToSuperview()
+ }
+ }
+}
+
+
--- /dev/null
+//
+// HomeBottomView.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+class HomeBottomView: BaseView {
+ let bottonView = UIView()
+ let tipsIcon = UIImageView()
+ let titleLabel = UILabel()
+ let valueLabel = UILabel()
+
+ override func setupViews() {
+ addSubviews([bottonView])
+ bottonView.addSubviews([titleLabel,valueLabel,tipsIcon])
+// backgroundColor = .red
+ bottonView.do { v in
+ v.backgroundColor = .rgb(0xFAFAFA)
+ v.yc.setCornerRadius(30)
+ }
+ tipsIcon.do { v in
+// v.backgroundColor = .lightGray
+ v.image = UIImage(named: "home_recordHistory")
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x313230)
+ v.font = .bold(18)
+ v.text = "历史录音"
+ }
+ valueLabel.do { (v) in
+ v.textColor = .rgb(0x8d8d8d)
+ v.font = .regular(14)
+ v.text = "随时随地 一键开录"
+ }
+
+ yc.addTap(target: self, action: #selector(tapAction))
+ }
+
+ override func setupLayout() {
+ bottonView.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(15)
+ make.top.equalToSuperview()
+ make.bottom.equalToSuperview()
+ make.height.equalTo(116)
+ }
+ titleLabel.snp.makeConstraints { make in
+ make.left.equalToSuperview().inset(15)
+ make.top.equalTo(35)
+ }
+ valueLabel.snp.makeConstraints { make in
+ make.left.equalTo(titleLabel)
+ make.top.equalTo(65)
+ }
+ tipsIcon.snp.makeConstraints { make in
+ make.size.equalTo(50)
+ make.right.equalToSuperview().inset(15)
+ make.centerY.equalToSuperview()
+ }
+ }
+ @objc func tapAction(){
+ App.shared.goToPage(HistoryRecordVC())
+ }
+}
+
--- /dev/null
+//
+// Home.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+public enum HomeCellType: Int {
+ case fileRecord
+ case callRecord
+ case chinese2English
+ case recordTranslate
+ case dialogTranslate
+ case textTranslate
+
+
+ var title:String{
+ switch self {
+ case .fileRecord:
+ return "现场录音"
+ case .callRecord:
+ return "通话录音"
+ case .chinese2English:
+ return "中英互译"
+ case .recordTranslate:
+ return "同声传译"
+ case .dialogTranslate:
+ return "对话翻译"
+ case .textTranslate:
+ return "文本翻译"
+ }
+ }
+ var subTitle:String{
+ switch self {
+ case .fileRecord:
+ return "随时随地 一键开录"
+ case .callRecord:
+ return "随时随地 一键开录"
+ case .chinese2English:
+ return "随时随地 一键开录"
+ case .recordTranslate:
+ return "随时随地 一键开录"
+ case .dialogTranslate:
+ return "随时随地 一键开录"
+ case .textTranslate:
+ return "随时随地 一键开录"
+ }
+ }
+ var icon:String{
+ switch self {
+ case .fileRecord:
+ return "home_fileRecord"
+ case .callRecord:
+ return "home_callRecord"
+ case .chinese2English:
+ return "home_chinese2English"
+ case .recordTranslate:
+ return "home_recordTranslate"
+ case .dialogTranslate:
+ return "home_dialogTranslate"
+ case .textTranslate:
+ return "home_textTranslate"
+ }
+ }
+}
+
+
+class HomeFunctionView: BaseView {
+ let list:[HomeCellType] = [.fileRecord,.callRecord,.chinese2English,.recordTranslate,.dialogTranslate,.textTranslate]
+ override func setupViews() {
+// backgroundColor = .yellow
+
+ let w = (kScreenWid - 45)/2.0
+ let h = 128.0
+ var x = 15.0
+ var y = 0.0
+ for (index, value) in list.enumerated() {
+ let view = HomeCell()
+ addSubview(view)
+
+ view.type = value
+ x = Double(index%2)*w + Double(index%2 + 1)*15.0
+ y = Double(index/2)*h + Double(index/2)*15.0
+ view.snp.makeConstraints { make in
+ make.width.equalTo(w)
+ make.height.equalTo(h)
+ make.left.equalToSuperview().inset(x)
+ make.top.equalToSuperview().inset(y)
+ if index == list.count - 1 {
+ make.bottom.equalToSuperview()
+ }
+ }
+ }
+ }
+
+ override func setupLayout() {
+
+ }
+}
+class HomeCell: BaseView {
+ let bgView = UIView()
+ let icon = UIImageView()
+ let titleLabel = UILabel()
+ let valueLabel = UILabel()
+ var type = HomeCellType.callRecord{
+ didSet{
+ titleLabel.text = type.title
+ valueLabel.text = type.subTitle
+ icon.image = UIImage(named: type.icon)
+ }
+ }
+
+ override func setupViews() {
+ addSubview(bgView)
+ bgView.addSubviews([titleLabel,icon,valueLabel])
+ bgView.do { v in
+ v.backgroundColor = .rgb(0xFAFAFA)
+ v.yc.setCornerRadius(30)
+ }
+ icon.do { v in
+// v.backgroundColor = .lightGray
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x313230)
+ v.font = .bold(14)
+ v.text = "AI智能对话"
+ }
+ valueLabel.do { (v) in
+ v.textColor = .rgb(0x8d8d8d)
+ v.font = .regular(10)
+ v.text = "随时随地 一键开录"
+ }
+ yc.addTap(target: self, action: #selector(tapAction))
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { make in
+ make.left.right.top.bottom.equalToSuperview()
+ }
+ icon.snp.makeConstraints { (m) in
+ m.width.equalTo(32)
+ m.height.equalTo(32)
+ m.left.equalToSuperview().inset(15)
+ m.top.equalToSuperview().inset(15)
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview().inset(50)
+ m.left.equalToSuperview().offset(15)
+ }
+ valueLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview().inset(70)
+ m.left.equalTo(titleLabel)
+ }
+ }
+ @objc func tapAction(){
+ switch type {
+ case .fileRecord:
+ App.shared.goToPage(FieldRecordingVC())
+ case .callRecord:
+ App.shared.goToPage(CallingRecordVC())
+ case .chinese2English:
+ App.shared.goToPage(Chinese2EnglishVC())
+ case .recordTranslate:
+ App.shared.goToPage(RecordTranslateVC())
+ case .dialogTranslate:
+ App.shared.goToPage(ChatVC())
+ case .textTranslate:
+ App.shared.goToPage(TextTranlateVC())
+ }
+ }
+}
--- /dev/null
+//
+// HomeheadView.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+
+
+class HomeHeadView: BaseView {
+ let icon = CurrentDeviceView()
+ let bottonView = UIView()
+ let tipsIcon = UIImageView()
+ let titleLabel = UILabel()
+ let valueLabel = UILabel()
+
+ override func setupViews() {
+ addSubviews([icon,bottonView])
+ bottonView.addSubviews([titleLabel,valueLabel,tipsIcon])
+// backgroundColor = .blue
+ icon.do { v in
+// v.backgroundColor = .lightGray
+ }
+ bottonView.do { v in
+ v.backgroundColor = .rgb(0xFAFAFA)
+ v.yc.setCornerRadius(30)
+ }
+ tipsIcon.do { v in
+ v.image = UIImage(named: "home_chat")
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x313230)
+ v.font = .bold(18)
+ v.text = "AI智能对话"
+ }
+ valueLabel.do { (v) in
+ v.textColor = .rgb(0x8d8d8d)
+ v.font = .regular(14)
+ v.text = "随时随地 一键开录"
+ }
+ }
+
+ override func setupLayout() {
+ icon.snp.makeConstraints { make in
+ make.top.width.left.equalToSuperview()
+ }
+ bottonView.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(15)
+ make.top.equalTo(icon.snp.bottom).offset(20)
+ make.bottom.equalToSuperview()
+ make.height.equalTo(116)
+ }
+ titleLabel.snp.makeConstraints { make in
+ make.left.equalToSuperview().inset(15)
+ make.top.equalTo(35)
+ }
+ valueLabel.snp.makeConstraints { make in
+ make.left.equalTo(titleLabel)
+ make.top.equalTo(65)
+ }
+ tipsIcon.snp.makeConstraints { make in
+ make.size.equalTo(50)
+ make.right.equalToSuperview().inset(15)
+ make.centerY.equalToSuperview()
+ }
+ }
+}
+
+
--- /dev/null
+//
+// HomeVC.swift
+// Magpie
+//
+// Created by incar on 2024/1/3.
+//
+
+import UIKit
+
+class HomeVC:BaseVC{
+ let bgView = UIScrollView()
+ let headerView = HomeHeadView()
+ let functionView = HomeFunctionView()
+ let bottomView = HomeBottomView()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ }
+
+ override func setupViews() {
+ self.navBar.title = "AI智能"
+ navBar.backgroundColor = .white
+ view.backgroundColor = .white
+ navBar.rightView.setImage(UIImage(named: "add_icon"), for: .normal)
+ view.addSubview(bgView)
+ bgView.addSubviews([headerView,functionView,bottomView])
+ }
+ override func setupLayout() {
+ bgView.snp.makeConstraints { make in
+ make.top.equalTo(kNavBtm)
+ make.left.right.bottom.equalToSuperview()
+ }
+ headerView.snp.makeConstraints { make in
+ make.top.equalToSuperview()
+ make.left.equalToSuperview()
+ make.width.equalTo(kScreenWid)
+ }
+ functionView.snp.makeConstraints { make in
+ make.top.equalTo(headerView.snp.bottom).offset(10)
+ make.left.equalToSuperview()
+ make.width.equalTo(kScreenWid)
+ }
+ bottomView.snp.makeConstraints { make in
+ make.top.equalTo(functionView.snp.bottom).offset(10)
+ make.left.equalToSuperview()
+ make.width.equalTo(kScreenWid)
+ make.bottom.equalToSuperview()
+ }
+ }
+
+ override func navRightViewTapped() {
+// App.shared.goToPage(AddDeviceVC())
+// let v = BasePickerView()
+// v.setupData(["2","3","4","5","6","7","8"])
+// v.selectedIndex(4)
+// v.show(animate: true)
+
+ let v = CustomPicker(title: "tishi", list: ["2","3","4","5","6","7","8"])
+ v.selectedIndex = 2
+ v.show()
+ v.didSelected = { (index,value) in
+ print(index,value)
+ }
+ return
+ }
+
+ @objc func addDeviceAction(){
+ let vc = ScanDeviceVC()
+ self.navigationController?.pushViewController(vc, animated: true)
+ }
+ @objc func saveAction(){
+// LogManager.instance.add("保存")
+// LogManager.instance.saveToFile()
+
+// SVProgressHUD.showLoading()
+// HttpClient.instance.request(CommomApi.login(userName: "")) { (model:ResponseBaseModel, res) in
+// if model.isSuccess{
+//// SVProgressHUD.show(withStatus: "请求成功")
+// }
+// else{
+//// SVProgressHUD.show(withStatus: "请求失败")
+// }
+// }
+ }
+}
+
--- /dev/null
+//
+// TextTranlateVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class TextTranlateVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "文本翻译"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// AboutVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class AboutVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "关于我们"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// DeviceInfoVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class DeviceInfoVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "设备详情"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// FeekbackVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class FeekbackVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "意见反馈"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// LanguageVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+
+import UIKit
+
+class LanguageVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "语言"
+ }
+ override func setupLayout() {
+
+ }
+
+}
v.addTarget(self, action: #selector(agreeBtnAction), for: .touchUpInside)
}
agreeTitle.do { (v) in
- v.textColor = .white.withAlphaComponent(0.8)
+ v.textColor = .black.withAlphaComponent(0.8)
v.font = .medium(14)
v.textAlignment = .left
v.text = "登录即代表同意"
label.do { v in
v.text = "验证码"
v.font = .medium(12)
- v.textColor = .white.withAlphaComponent(0.8)
+ v.textColor = .black.withAlphaComponent(0.8)
}
textField.do { v in
- v.textColor = .white
+ v.textColor = .black
v.keyboardType = .phonePad
}
codeButton.do { (v) in
v.maxCount = 20
v.label.textColor = .color(.theme)
- v.backgroundColor = UIColor.white.withAlphaComponent(0.04)
+ v.backgroundColor = UIColor.black.withAlphaComponent(0.04)
v.layer.cornerRadius = 8
v.layer.masksToBounds = true
}
- inputBgView.backgroundColor = UIColor.white.withAlphaComponent(0.04)
- inputBgView.layer.borderColor = UIColor.white.withAlphaComponent(0.1).cgColor
- inputBgView.layer.borderWidth = 0.5
+ inputBgView.backgroundColor = .rgb(0xF3F4F8)
inputBgView.layer.cornerRadius = 12
inputBgView.layer.masksToBounds = true
--- /dev/null
+//
+// ForgetVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/11.
+//
+
+import UIKit
+
+class ForgetVC:BaseVC{
+ let bgView = UIImageView()
+ let logoView = UIImageView()
+ let phoneView = PhoneView()
+ let codeView = CodeView()
+ let btn = CustomButton()
+ let agreeView = AgreeView()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ }
+ override func setupViews(){
+ self.navBar.title = "账号登录"
+ // view.backgroundColor = .rgb(0x11131E)
+ bgView.image = UIImage(named: "login_cover")
+ logoView.image = UIImage(named: "login_logo")
+
+ phoneView.do { v in
+ v.textField.text = "13480939445"
+ }
+ codeView.do { v in
+ v.codeButton.addTarget(self, action: #selector(codeButtonAction), for: .touchUpInside)
+ }
+
+ btn.set(title: "登录", target: self, action: #selector(loginAction))
+
+ view.addSubviews([bgView,logoView,phoneView,codeView,btn,agreeView])
+ navBar.backgroundColor = .clear
+ view.bringSubviewToFront(navBar)
+ }
+ override func setupLayout(){
+ bgView.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ }
+ logoView.snp.makeConstraints { make in
+ make.width.equalTo(203)
+ make.height.equalTo(86)
+ make.top.equalTo(kNavBtm + 40)
+ make.centerX.equalToSuperview()
+ }
+ phoneView.snp.makeConstraints { make in
+ make.top.equalTo(logoView.snp.bottom).offset(60)
+ make.left.right.equalToSuperview().inset(15)
+ }
+ codeView.snp.makeConstraints { make in
+ make.top.equalTo(phoneView.snp.bottom).offset(10)
+ make.left.right.equalToSuperview().inset(15)
+ }
+ btn.snp.makeConstraints { make in
+ make.top.equalTo(codeView.snp.bottom).offset(30)
+ make.left.right.equalToSuperview().inset(15)
+ make.height.equalTo(52)
+ }
+ agreeView.snp.makeConstraints { make in
+ make.bottom.equalToSuperview().inset(62)
+ make.centerX.equalToSuperview()
+ make.height.equalTo(30)
+ }
+ }
+
+}
+
+extension ForgetVC{
+ @objc func codeButtonAction(){
+ guard let text = phoneView.textField.text else{
+ YLprogressHUD.showAutoHiden("请输入正确的手机号码")
+ return
+ }
+ YLprogressHUD.showLoading()
+ LoginVM.sendCode(phone: text) { [weak self] (model) in
+ if model.isSuccess{
+ self?.codeView.codeButton.start()
+ }
+ YLprogressHUD.showAutoHiden(model.msg)
+ }
+ }
+ @objc func loginAction(){
+ guard let pohne = phoneView.textField.text else{
+ YLprogressHUD.showAutoHiden("请输入正确的手机号码")
+ return
+ }
+ guard let code = codeView.textField.text else{
+ YLprogressHUD.showAutoHiden("请输入正确的验证码")
+ return
+ }
+ YLprogressHUD.showLoading()
+ LoginVM.login(phone: pohne, code: code) {[weak self] result in
+ if result.isSuccess{
+ YLprogressHUD.showSuccess {
+ self?.view.window?.rootViewController = BaseTC()
+ }
+ }
+ YLprogressHUD.showAutoHiden(result.msg)
+ }
+ }
+}
class LoginVC:BaseVC{
let bgView = UIImageView()
- let logoView = UIImageView()
+ let tipsLabel = UILabel()
let phoneView = PhoneView()
let codeView = CodeView()
- let btn = CustomButton()
+ let loginBtn = CustomButton()
+ let registerBtn = CustomButton()
let agreeView = AgreeView()
override func viewDidLoad() {
}
override func setupViews(){
self.navBar.title = "账号登录"
- view.backgroundColor = .rgb(0x11131E)
+// view.backgroundColor = .rgb(0x11131E)
bgView.image = UIImage(named: "login_cover")
- logoView.image = UIImage(named: "login_logo")
+ tipsLabel.do { v in
+ v.numberOfLines = 0
+ v.font = .bold(18)
+ v.textColor = .rgb(0x121212)
+ let text = "您好,\n欢迎使用Joy Audio"
+ let stype = NSMutableParagraphStyle()
+ stype.lineSpacing = 10
+ let attrString = NSMutableAttributedString(string: text)
+ let attr: [NSAttributedString.Key : Any] = [.font: UIFont.medium(22),.paragraphStyle:stype]
+ attrString.addAttributes(attr, range: NSRange(location: 0, length: attrString.length))
+ v.attributedText = attrString
+ }
phoneView.do { v in
v.textField.text = "13480939445"
v.codeButton.addTarget(self, action: #selector(codeButtonAction), for: .touchUpInside)
}
- btn.set(title: "登录", target: self, action: #selector(loginAction))
+ loginBtn.set(title: "登录",style: .theme1, target: self, action: #selector(loginAction))
+ registerBtn.set(title: "注册", style: .theme2,target: self, action: #selector(registerAction))
- view.addSubviews([bgView,logoView,phoneView,codeView,btn,agreeView])
+ view.addSubviews([bgView,tipsLabel,phoneView,codeView,loginBtn,registerBtn,agreeView])
navBar.backgroundColor = .clear
view.bringSubviewToFront(navBar)
}
bgView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
- logoView.snp.makeConstraints { make in
- make.width.equalTo(203)
- make.height.equalTo(86)
+ tipsLabel.snp.makeConstraints { make in
+ make.left.equalToSuperview().inset(20)
make.top.equalTo(kNavBtm + 40)
make.centerX.equalToSuperview()
}
phoneView.snp.makeConstraints { make in
- make.top.equalTo(logoView.snp.bottom).offset(60)
- make.left.right.equalToSuperview().inset(15)
+ make.top.equalTo(tipsLabel.snp.bottom).offset(60)
+ make.left.right.equalToSuperview().inset(36)
}
codeView.snp.makeConstraints { make in
make.top.equalTo(phoneView.snp.bottom).offset(10)
- make.left.right.equalToSuperview().inset(15)
+ make.left.right.equalToSuperview().inset(36)
+ }
+ loginBtn.snp.makeConstraints { make in
+ make.top.equalTo(codeView.snp.bottom).offset(54)
+ make.left.right.equalToSuperview().inset(51)
+ make.height.equalTo(55)
}
- btn.snp.makeConstraints { make in
- make.top.equalTo(codeView.snp.bottom).offset(30)
- make.left.right.equalToSuperview().inset(15)
- make.height.equalTo(52)
+ registerBtn.snp.makeConstraints { make in
+ make.top.equalTo(loginBtn.snp.bottom).offset(20)
+ make.left.right.equalToSuperview().inset(51)
+ make.height.equalTo(55)
}
agreeView.snp.makeConstraints { make in
make.bottom.equalToSuperview().inset(62)
}
YLprogressHUD.showAutoHiden(model.msg)
}
+ }
+ @objc func registerAction(){
+
}
@objc func loginAction(){
guard let pohne = phoneView.textField.text else{
label.do { v in
v.text = "手机号"
v.font = .medium(12)
- v.textColor = .white.withAlphaComponent(0.8)
+ v.textColor = .black.withAlphaComponent(0.8)
}
textField.do { v in
- v.textColor = .white
+ v.textColor = .black
v.keyboardType = .phonePad
}
- inputBgView.backgroundColor = UIColor.white.withAlphaComponent(0.04)
- inputBgView.layer.borderColor = UIColor.white.withAlphaComponent(0.1).cgColor
- inputBgView.layer.borderWidth = 0.5
- inputBgView.layer.cornerRadius = 12
+ inputBgView.backgroundColor = .rgb(0xF3F4F8)
+ inputBgView.layer.cornerRadius = 10
inputBgView.layer.masksToBounds = true
addSubviews([label,inputBgView])
--- /dev/null
+//
+// RegisterVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/11.
+//
+
+import UIKit
+
+class RegisterVC:BaseVC{
+ let bgView = UIImageView()
+ let logoView = UIImageView()
+ let phoneView = PhoneView()
+ let codeView = CodeView()
+ let btn = CustomButton()
+ let agreeView = AgreeView()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ }
+ override func setupViews(){
+ self.navBar.title = "账号登录"
+ // view.backgroundColor = .rgb(0x11131E)
+ bgView.image = UIImage(named: "login_cover")
+ logoView.image = UIImage(named: "login_logo")
+
+ phoneView.do { v in
+ v.textField.text = "13480939445"
+ }
+ codeView.do { v in
+ v.codeButton.addTarget(self, action: #selector(codeButtonAction), for: .touchUpInside)
+ }
+
+ btn.set(title: "登录", target: self, action: #selector(loginAction))
+
+ view.addSubviews([bgView,logoView,phoneView,codeView,btn,agreeView])
+ navBar.backgroundColor = .clear
+ view.bringSubviewToFront(navBar)
+ }
+ override func setupLayout(){
+ bgView.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ }
+ logoView.snp.makeConstraints { make in
+ make.width.equalTo(203)
+ make.height.equalTo(86)
+ make.top.equalTo(kNavBtm + 40)
+ make.centerX.equalToSuperview()
+ }
+ phoneView.snp.makeConstraints { make in
+ make.top.equalTo(logoView.snp.bottom).offset(60)
+ make.left.right.equalToSuperview().inset(15)
+ }
+ codeView.snp.makeConstraints { make in
+ make.top.equalTo(phoneView.snp.bottom).offset(10)
+ make.left.right.equalToSuperview().inset(15)
+ }
+ btn.snp.makeConstraints { make in
+ make.top.equalTo(codeView.snp.bottom).offset(30)
+ make.left.right.equalToSuperview().inset(15)
+ make.height.equalTo(52)
+ }
+ agreeView.snp.makeConstraints { make in
+ make.bottom.equalToSuperview().inset(62)
+ make.centerX.equalToSuperview()
+ make.height.equalTo(30)
+ }
+ }
+
+}
+
+extension RegisterVC{
+ @objc func codeButtonAction(){
+ guard let text = phoneView.textField.text else{
+ YLprogressHUD.showAutoHiden("请输入正确的手机号码")
+ return
+ }
+ YLprogressHUD.showLoading()
+ LoginVM.sendCode(phone: text) { [weak self] (model) in
+ if model.isSuccess{
+ self?.codeView.codeButton.start()
+ }
+ YLprogressHUD.showAutoHiden(model.msg)
+ }
+ }
+ @objc func loginAction(){
+ guard let pohne = phoneView.textField.text else{
+ YLprogressHUD.showAutoHiden("请输入正确的手机号码")
+ return
+ }
+ guard let code = codeView.textField.text else{
+ YLprogressHUD.showAutoHiden("请输入正确的验证码")
+ return
+ }
+ YLprogressHUD.showLoading()
+ LoginVM.login(phone: pohne, code: code) {[weak self] result in
+ if result.isSuccess{
+ YLprogressHUD.showSuccess {
+ self?.view.window?.rootViewController = BaseTC()
+ }
+ }
+ YLprogressHUD.showAutoHiden(result.msg)
+ }
+ }
+}
import UIKit
public enum MineCellType: Int {
- case deviceList
- case service
- case product
+ case user
+ case device
+ case userAgreement
+ case privacyPolicy
+ case language
+ case update
+ case feeback
+ case about
var title:String{
switch self {
- case .deviceList:
- return "设备列表"
- case .service:
- return "配额服务"
- case .product:
- return "产品说明"
-
+ case .user:
+ return "用户管理"
+ case .device:
+ return "设备详情"
+ case .userAgreement:
+ return "用户协议"
+ case .privacyPolicy:
+ return "隐私政策"
+ case .language:
+ return "语言设置"
+ case .update:
+ return "固件升级"
+ case .feeback:
+ return "意见反馈"
+ case .about:
+ return "关于"
}
}
- var icon:UIImage?{
+ var icon:String{
switch self {
- case .deviceList:
- return UIImage(named: "mine_cell_device")
- case .service:
- return UIImage(named: "mine_cell_service")
- case .product:
- return UIImage(named: "mine_cell_product")
+ case .user:
+ return "mine_cell_user"
+ case .device:
+ return "mine_cell_device"
+ case .userAgreement:
+ return "mine_cell_userAgreement"
+ case .privacyPolicy:
+ return "mine_cell_privacy"
+ case .language:
+ return "mine_cell_language"
+ case .update:
+ return "mine_cell_update"
+ case .feeback:
+ return "mine_cell_feedback"
+ case .about:
+ return "mine_cell_about"
}
}
}
class MineCell: BaseTableViewCell {
+ let bgView = UIView()
let icon = UIImageView()
let titleLabel = UILabel()
let nextIcon = UIImageView()
- let line = UIView()
- var type:MineCellType = .deviceList{
+ var type:MineCellType = .user{
didSet{
- icon.image = type.icon
+ icon.image = UIImage(named: type.icon)
titleLabel.text = type.title
-// if type == .order {
-// bgView.yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid - 24.fitR, height: 48.fitR), roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 4.fitR, height: 4.fitR))
-// }
-// else if type == .set {
-// bgView.yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid - 24.fitR, height: 48.fitR), roundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: 4.fitR, height: 4.fitR))
-// }
-// else{
-// bgView.layer.cornerRadius = 0
-// }
}
}
fatalError("init(coder:) has not been implemented")
}
override func setupViews() {
- contentView.addSubviews([icon,titleLabel,nextIcon,line])
- backgroundColor = .clear
+ contentView.addSubview(bgView)
+ bgView.addSubviews([titleLabel,icon,nextIcon])
+
+ backgroundColor = .rgb(0xF7F7F7)
contentView.backgroundColor = .clear
selectionStyle = .none
- line.do { (v) in
- v.backgroundColor = .white.withAlphaComponent(0.1)
+ bgView.do { v in
+ v.backgroundColor = UIColor.white
+ v.layer.cornerRadius = 12
+ v.layer.masksToBounds = true
}
titleLabel.do { (v) in
- v.textColor = .white
- v.font = .medium(16)
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(12)
v.textAlignment = .left
}
nextIcon.image = UIImage(named: "arrow_next")
}
-
+
override func setupLayout() {
- icon.snp.makeConstraints { (m) in
- m.width.equalTo(24.fitR)
- m.height.equalTo(24.fitR)
- m.left.equalToSuperview().inset(15.fitR)
- m.centerY.equalToSuperview()
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview().inset(15)
+ m.top.equalToSuperview().inset(6)
+ m.bottom.equalToSuperview().inset(6)
+ m.height.equalTo(48)
}
nextIcon.snp.makeConstraints { (m) in
- m.width.equalTo(20)
- m.height.equalTo(20)
+ m.width.equalTo(8)
+ m.height.equalTo(12)
m.right.equalToSuperview().inset(15)
m.centerY.equalToSuperview()
}
+ icon.snp.makeConstraints { (m) in
+ m.width.equalTo(24)
+ m.height.equalTo(24)
+ m.left.equalToSuperview().inset(15)
+ m.centerY.equalToSuperview()
+ }
titleLabel.snp.makeConstraints { (m) in
m.centerY.equalTo(icon)
- m.left.equalTo(icon.snp.right).offset(6)
+ m.left.equalTo(icon.snp.right).offset(15)
m.height.equalToSuperview()
}
- line.snp.makeConstraints { (m) in
- m.left.right.equalToSuperview().inset(15)
- m.bottom.equalToSuperview()
- m.height.equalTo(0.5)
- }
+
}
}
-
import UIKit
class MineHeaderView: BaseView {
let userView = MineUserInfoView()
- let orderView = MineOrderView()
override func setupViews() {
backgroundColor = .clear
- addSubviews([userView,orderView])
+ addSubviews([userView])
}
override func setupLayout() {
userView.snp.makeConstraints { make in
make.left.right.equalToSuperview().inset(15)
make.top.equalToSuperview().inset(30)
}
- orderView.snp.makeConstraints { make in
- make.left.right.equalToSuperview().inset(15)
- make.top.equalTo(userView.snp.bottom).offset(20)
- make.height.equalTo(140)
- }
}
}
addSubviews([titleLabel,messageBtn,setBtn])
titleLabel.do { v in
- v.text = "我的"
- v.font = .medium(18)
+// v.text = "我的"
+ v.font = .bold(16)
v.textColor = .white
}
setBtn.do { v in
v.setImage(UIImage(named: "mine_set"), for: .normal)
v.addTarget(self, action: #selector(setAction), for: .touchUpInside)
}
- messageBtn.do { v in
- v.setImage(UIImage(named: "mine_msg"), for: .normal)
- v.addTarget(self, action: #selector(messageAction), for: .touchUpInside)
- }
}
override func setupLayout() {
titleLabel.snp.makeConstraints { make in
make.right.equalToSuperview().inset(15)
make.size.equalTo(30)
}
- messageBtn.snp.makeConstraints { make in
- make.centerY.equalTo(titleLabel)
- make.right.equalTo(setBtn.snp.left).offset(-15)
- make.size.equalTo(30)
- }
}
@objc func messageAction(){
icon.do { v in
v.image = UIImage(named: "head")
v.yc.setCornerRadius(27)
- v.backgroundColor = .white.withAlphaComponent(0.1)
+ v.backgroundColor = .black.withAlphaComponent(0.1)
}
titleLabel.do { (v) in
v.textColor = .white
v.text = "用户未登录"
}
valueLabel.do { (v) in
- v.textColor = .white.withAlphaComponent(0.6)
+ v.textColor = .black.withAlphaComponent(0.6)
v.font = .medium(14)
v.textAlignment = .right
v.text = "登录帐号后可查看ID"
icon.do { v in
v.image = UIImage(named: "head")
v.yc.setCornerRadius(27)
- v.backgroundColor = .white.withAlphaComponent(0.1)
+ v.backgroundColor = .black.withAlphaComponent(0.1)
}
titleLabel.do { (v) in
- v.textColor = .white
+ v.textColor = .rgb(0x121212)
v.font = .bold(16)
v.textAlignment = .left
v.text = "用户未登录"
}
valueLabel.do { (v) in
- v.textColor = .white.withAlphaComponent(0.6)
+ v.textColor = .rgb(0x999999)
v.font = .medium(14)
v.textAlignment = .right
v.text = "登录帐号后可查看ID"
import UIKit
class MineVC: BaseVC{
let tableView = UITableView(frame: .zero, style: .plain)
- let list:[MineCellType] = [.deviceList,.service,.product,]
+ let list:[MineCellType] = [.user,.device,.userAgreement,.privacyPolicy,.language,.update,.feeback,.about]
override func viewDidLoad() {
super.viewDidLoad()
override func setupViews() {
self.navBar.title = "我的"
tableView.do { v in
- v.backgroundColor = .color(.bgColor)
+ v.backgroundColor = .rgb(0xF7F7F7)
v.delegate = self
v.dataSource = self
v.rowHeight = 68
+ v.separatorStyle = .none
v.register(MineCell.self, forCellReuseIdentifier: MineCell.reuseID)
- v.tableHeaderView = MineHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWid, height: 280))
+ v.tableHeaderView = MineHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWid, height: 150))
}
view.addSubview(tableView)
let bar = MineNavBar(frame: navBar.frame)
navBar.addSubview(bar)
+
+// let data = Data([0x48, 0x65, 0x6C, 0x6C, 0x6F])
+// let hexString = data.map { String(format: "%02hhx", $0) }.joined()
+// print(hexString)
}
override func setupLayout() {
tableView.snp.makeConstraints { make in
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let data = list[indexPath.row]
-
+ switch data {
+ case .user:
+ App.shared.goToPage(AboutVC())
+ case .device:
+ App.shared.goToPage(DeviceInfoVC())
+ case .userAgreement:
+ App.shared.goToPage(AboutVC())
+ case .privacyPolicy:
+ App.shared.goToPage(AboutVC())
+ case .language:
+ App.shared.goToPage(LanguageVC())
+ case .update:
+ App.shared.goToPage(UpdateVC())
+ case .feeback:
+ App.shared.goToPage(FeekbackVC())
+ case .about:
+ App.shared.goToPage(AboutVC())
+ }
}
}
--- /dev/null
+//
+// UpdateVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class UpdateVC:BaseVC{
+ let versionLabel = UILabel()
+ let btn = UIButton(type: .custom)
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ view.addSubviews([versionLabel,btn])
+ self.navBar.title = "固件升级"
+ versionLabel.do { v in
+ v.text = "当前版本\n" + "v1.0.6"
+ v.textAlignment = .center
+ v.font = .regular(16)
+ v.textColor = .hexString("#232323")
+ v.numberOfLines = 0
+ }
+ btn.do { v in
+ v.setTitle("检查更新", for: .normal)
+ v.titleLabel?.font = .regular(12)
+ v.setTitleColor(.color(.theme), for: .normal)
+ v.addTarget(self, action: #selector(tapAction), for: .touchUpInside)
+ v.backgroundColor = .hexString("#EDEDED")
+ v.yc.setCornerRadius(12)
+ }
+ }
+ override func setupLayout() {
+ versionLabel.snp.makeConstraints { make in
+ make.centerX.equalToSuperview()
+ make.centerY.equalToSuperview()
+ }
+ btn.snp.makeConstraints { make in
+ make.bottom.equalToSuperview().inset(82)
+ make.width.equalTo(240)
+ make.height.equalTo(48)
+ make.centerX.equalToSuperview()
+ }
+ }
+ @objc func tapAction(){
+
+ }
+}
contentView.backgroundColor = .clear
selectionStyle = .none
bgView.do { v in
- v.backgroundColor = UIColor.white.withAlphaComponent(0.04)
- v.layer.borderColor = UIColor.white.withAlphaComponent(0.1).cgColor
+ v.backgroundColor = UIColor.black.withAlphaComponent(0.04)
+ v.layer.borderColor = UIColor.black.withAlphaComponent(0.1).cgColor
v.layer.borderWidth = 0.5
v.layer.cornerRadius = 12
v.layer.masksToBounds = true
v.textAlignment = .left
}
valueLabel.do { (v) in
- v.textColor = .white.withAlphaComponent(0.8)
+ v.textColor = .black.withAlphaComponent(0.8)
v.font = .medium(14)
v.textAlignment = .right
}
contentView.backgroundColor = .clear
selectionStyle = .none
bgView.do { v in
- v.backgroundColor = UIColor.white.withAlphaComponent(0.04)
- v.layer.borderColor = UIColor.white.withAlphaComponent(0.1).cgColor
+ v.backgroundColor = UIColor.black.withAlphaComponent(0.04)
+ v.layer.borderColor = UIColor.black.withAlphaComponent(0.1).cgColor
v.layer.borderWidth = 0.5
v.layer.cornerRadius = 12
v.layer.masksToBounds = true
}
icon.do { v in
v.yc.setCornerRadius(23)
- v.backgroundColor = .white.withAlphaComponent(0.5)
+ v.backgroundColor = .black.withAlphaComponent(0.5)
}
nextIcon.image = UIImage(named: "arrow_next")
}
contentView.backgroundColor = .color(.bgColor)
contentView.addSubview(titleLabel)
titleLabel.do { (v) in
- v.textColor = .white.withAlphaComponent(0.8)
+ v.textColor = .black.withAlphaComponent(0.8)
v.font = .medium(16)
v.textAlignment = .left
}
let footView = UIView(frame: CGRect(x: 0, y: 0, width: kScreenWid, height: 200))
let btn = CustomButton(frame: CGRect(x: 15, y: 80, width: kScreenWid - 30, height: 52))
- btn.set(title: "退出登录", bgColor: .white.withAlphaComponent(0.04), target: self, action: #selector(logoutAction))
+ btn.set(title: "退出登录", target: self, action: #selector(logoutAction))
footView.addSubview(btn)
tableView.tableFooterView = footView
--- /dev/null
+//
+// UserManagerVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+
+class UserManagerVC:BaseVC{
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+
+ }
+ override func setupViews() {
+ self.navBar.title = "用户管理"
+ }
+ override func setupLayout() {
+
+ }
+
+}
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+enum ModeContolType:Int{
+ case anc
+ case environment
+ case free
+
+ var title:String{
+ switch self {
+ case .anc:
+ return "降噪"
+ case .environment:
+ return "环境感知"
+ case .free:
+ return "自由通话"
+ }
+ }
+}
+
+class ModeControView: BaseView {
+ let titleLabel = UILabel()
+ var list:[ModeContolType] = [.anc,.environment,.free]
+ var itemViews = [ItemView]()
+
+ override func setupViews() {
+ backgroundColor = .white
+
+ yc.setCornerRadius(12)
+
+ addSubviews([titleLabel])
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(14)
+ v.text = "环境声音控制"
+ }
+
+ let w = 80
+ let h = 80
+ let x = 14.0
+ let y = 47.0
+ for (index, value) in list.enumerated() {
+ let view = ItemView()
+ addSubview(view)
+ itemViews.append(view)
+ view.yc.addTap(target: self, action: #selector(tapAction))
+
+ view.type = value
+ view.snp.makeConstraints { make in
+ make.width.equalTo(w)
+ make.height.equalTo(h)
+ make.top.equalToSuperview().inset(y)
+ if index == list.count - 1 {
+ make.right.equalToSuperview().inset(x)
+ }
+ else if( index == 0){
+ view.isSelected = true
+ make.left.equalToSuperview().inset(x)
+ }
+ else{
+ make.centerX.equalToSuperview()
+ }
+ }
+ }
+ }
+
+ override func setupLayout() {
+ titleLabel.snp.makeConstraints { make in
+ make.top.left.equalToSuperview().inset(14)
+ }
+ }
+
+ @objc func tapAction(_ tap:UITapGestureRecognizer){
+ let view = tap.view as! ItemView
+ for item in itemViews {
+ if item === view{
+ item.isSelected = true
+ }
+ else{
+ item.isSelected = false
+ }
+ }
+ }
+
+ class ItemView: BaseView {
+ let icon = UIImageView()
+ let titleLabel = UILabel()
+ var type = ModeContolType.anc{
+ didSet{
+ titleLabel.text = type.title
+ }
+ }
+ var isSelected:Bool = false{
+ didSet{
+ if isSelected {
+ titleLabel.textColor = .color(.theme)
+ }
+ else{
+ titleLabel.textColor = .rgb(0x666666)
+ }
+ }
+ }
+
+ override func setupViews() {
+ addSubviews([icon,titleLabel])
+ icon.do { v in
+ v.backgroundColor = .rgb(0xF7F7F7)
+ v.yc.setCornerRadius(8)
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x666666)
+ v.font = .regular(12)
+ v.text = "降噪"
+ }
+ }
+
+ override func setupLayout() {
+ icon.snp.makeConstraints { make in
+ make.width.equalTo(80)
+ make.height.equalTo(43)
+ make.left.top.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { make in
+ make.centerX.equalToSuperview()
+ make.top.equalTo(icon.snp.bottom).offset(10)
+ }
+ }
+ }
+
+}
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+enum ModeEffectsType:Int{
+ case normal
+ case fashion
+ case classic
+ case rock
+ case jazz
+ case eq
+
+ var title:String{
+ switch self {
+ case .normal:
+ return "正常"
+ case .fashion:
+ return "流行"
+ case .classic:
+ return "经典"
+ case .rock:
+ return "爵士"
+ case .jazz:
+ return "摇滚"
+ case .eq:
+ return "EQ调音"
+ }
+ }
+}
+
+class ModeEffectsView: BaseView {
+ let titleLabel = UILabel()
+ var list:[ModeEffectsType] = [.normal,.fashion,.classic,.rock,.jazz,.eq]
+ var itemViews = [ItemView]()
+
+ override func setupViews() {
+ backgroundColor = .white
+
+ yc.setCornerRadius(12)
+
+ addSubviews([titleLabel])
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(14)
+ v.text = "个性化音效"
+ }
+
+ let s = 11.0
+ let w = (kScreenWid - 64 - s)/2.0
+ let h = 80.0
+ var x = 14.0
+ var y = 47.0
+ for (index, value) in list.enumerated() {
+ let view = ItemView()
+ addSubview(view)
+
+ view.type = value
+ x = Double(index%2)*w + Double(index%2 + 1)*13
+ y = Double(index/2)*h
+ y = y + Double(index/2)*15.0 + 47
+ view.snp.makeConstraints { make in
+ make.width.equalTo(w)
+ make.height.equalTo(h)
+ make.left.equalToSuperview().inset(x)
+ make.top.equalToSuperview().inset(y)
+ if index == list.count - 1 {
+ make.bottom.equalToSuperview()
+ }
+ }
+ }
+ }
+
+ override func setupLayout() {
+ titleLabel.snp.makeConstraints { make in
+ make.top.left.equalToSuperview().inset(14)
+ }
+ }
+
+ @objc func tapAction(_ tap:UITapGestureRecognizer){
+ let view = tap.view as! ItemView
+
+ }
+
+ class ItemView: BaseView {
+ let icon = UIImageView()
+ let titleLabel = UILabel()
+ var type = ModeEffectsType.fashion{
+ didSet{
+ titleLabel.text = type.title
+ }
+ }
+
+ override func setupViews() {
+ addSubviews([icon,titleLabel])
+ icon.do { v in
+ v.backgroundColor = .black
+ v.yc.setCornerRadius(8)
+ }
+ titleLabel.do { (v) in
+ v.textColor = .white
+ v.font = .regular(14)
+ }
+ }
+
+ override func setupLayout() {
+ icon.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { make in
+ make.center.equalToSuperview()
+ }
+ }
+ }
+
+}
--- /dev/null
+//
+// FindView.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+
+
+enum ModeFindType:Int{
+ case left
+ case right
+
+ var title:String{
+ switch self {
+ case .left:
+ return "L"
+ case .right:
+ return "R"
+ }
+ }
+}
+
+class ModeFindView: BaseView {
+ let titleLabel = UILabel()
+ var list:[ModeFindType] = [.left,.right]
+ var itemViews = [ItemView]()
+
+ override func setupViews() {
+ backgroundColor = .white
+
+ yc.setCornerRadius(12)
+
+ addSubviews([titleLabel])
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(14)
+ v.text = "查找耳机"
+ }
+
+ let w = 66.0
+ let h = 66
+ let y = 38
+ for (index, value) in list.enumerated() {
+ let view = ItemView()
+ view.yc.setCornerRadius(w/2)
+ addSubview(view)
+ itemViews.append(view)
+ view.yc.addTap(target: self, action: #selector(tapAction))
+
+ view.type = value
+ view.snp.makeConstraints { make in
+ make.width.equalTo(w)
+ make.height.equalTo(h)
+ make.top.equalToSuperview().inset(y)
+ if index == list.count - 1 {
+ make.right.equalToSuperview().inset(68)
+ }
+ else if( index == 0){
+ view.isSelected = true
+ make.left.equalToSuperview().inset(68)
+ }
+ else{
+ make.centerX.equalToSuperview()
+ }
+ }
+ }
+ }
+
+ override func setupLayout() {
+ titleLabel.snp.makeConstraints { make in
+ make.top.left.equalToSuperview().inset(14)
+ }
+ }
+
+ @objc func tapAction(_ tap:UITapGestureRecognizer){
+ let view = tap.view as! ItemView
+ }
+
+ class ItemView: BaseView {
+ let icon = UIImageView()
+ let titleLabel = UILabel()
+ var type = ModeFindType.left{
+ didSet{
+ titleLabel.text = type.title
+ }
+ }
+ var isSelected:Bool = false{
+ didSet{
+ if isSelected {
+ titleLabel.textColor = .color(.theme)
+ }
+ else{
+ titleLabel.textColor = .rgb(0x666666)
+ }
+ }
+ }
+
+ override func setupViews() {
+ addSubviews([icon,titleLabel])
+ icon.do { v in
+ v.backgroundColor = .gray
+ v.yc.setCornerRadius(8)
+ }
+ titleLabel.do { (v) in
+ v.textColor = .color(.theme)
+ v.font = .regular(12)
+ }
+ }
+
+ override func setupLayout() {
+ icon.snp.makeConstraints { make in
+ make.edges.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { make in
+ make.center.equalToSuperview()
+ }
+ }
+ }
+
+}
--- /dev/null
+//
+// ModeListView.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+class ModeListView: BaseView {
+ let bottonView = UIView()
+ let tipsIcon = UIImageView()
+ let titleLabel = UILabel()
+ let valueLabel = UILabel()
+
+ override func setupViews() {
+ addSubviews([bottonView])
+ bottonView.addSubviews([titleLabel,valueLabel,tipsIcon])
+ // backgroundColor = .red
+ bottonView.do { v in
+ v.backgroundColor = .rgb(0xFAFAFA)
+ v.yc.setCornerRadius(30)
+ }
+ tipsIcon.do { v in
+ // v.backgroundColor = .lightGray
+ v.image = UIImage(named: "home_recordHistory")
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x313230)
+ v.font = .bold(18)
+ v.text = "历史录音"
+ }
+ valueLabel.do { (v) in
+ v.textColor = .rgb(0x8d8d8d)
+ v.font = .regular(14)
+ v.text = "随时随地 一键开录"
+ }
+
+ yc.addTap(target: self, action: #selector(tapAction))
+ }
+
+ override func setupLayout() {
+ bottonView.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(15)
+ make.top.equalToSuperview()
+ make.bottom.equalToSuperview()
+ make.height.equalTo(116)
+ }
+ titleLabel.snp.makeConstraints { make in
+ make.left.equalToSuperview().inset(15)
+ make.top.equalTo(35)
+ }
+ valueLabel.snp.makeConstraints { make in
+ make.left.equalTo(titleLabel)
+ make.top.equalTo(65)
+ }
+ tipsIcon.snp.makeConstraints { make in
+ make.size.equalTo(50)
+ make.right.equalToSuperview().inset(15)
+ make.centerY.equalToSuperview()
+ }
+ }
+ @objc func tapAction(){
+ App.shared.goToPage(HistoryRecordVC())
+ }
+}
+
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/5.
+//
+import UIKit
+
+class ModeVC:BaseVC{
+ let bgView = UIScrollView()
+ let headerView = CurrentDeviceView()
+ let controlView = ModeControView()
+ let effectsView = ModeEffectsView()
+ let findView = ModeFindView()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ }
+
+ override func setupViews() {
+ self.navBar.title = "模式"
+ navBar.backgroundColor = .white
+ view.backgroundColor = .color(.bgColor)
+ navBar.rightView.setImage(UIImage(named: "add_icon"), for: .normal)
+ view.addSubview(bgView)
+ bgView.addSubviews([headerView,controlView,effectsView,findView])
+ }
+ override func setupLayout() {
+ bgView.snp.makeConstraints { make in
+ make.top.equalTo(kNavBtm)
+ make.left.right.bottom.equalToSuperview()
+ }
+ headerView.snp.makeConstraints { make in
+ make.top.equalToSuperview()
+ make.left.equalToSuperview()
+ make.width.equalTo(kScreenWid)
+ }
+ controlView.snp.makeConstraints { make in
+ make.top.equalTo(headerView.snp.bottom).offset(10)
+ make.centerX.equalToSuperview()
+ make.width.equalTo(kScreenWid - 36)
+ make.height.equalTo(128)
+ }
+ effectsView.snp.makeConstraints { make in
+ make.top.equalTo(controlView.snp.bottom).offset(10)
+ make.centerX.equalToSuperview()
+ make.width.equalTo(controlView)
+ }
+ findView.snp.makeConstraints { make in
+ make.top.equalTo(effectsView.snp.bottom).offset(10)
+ make.centerX.equalToSuperview()
+ make.width.equalTo(effectsView)
+ make.height.equalTo(115)
+ make.bottom.equalToSuperview().inset(20)
+ }
+ }
+
+ override func navRightViewTapped() {
+
+ }
+}
+
--- /dev/null
+//
+// AddDeviceVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/11.
+//
+
+import UIKit
+
+class AddDeviceVC:BaseVC{
+
+ let titleLabel = UILabel()
+ let addView = AddDeviceSectionView()
+ let scanView = AddDeviceSectionView()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ }
+
+ override func setupViews() {
+ self.navBar.title = ""
+ navBar.rightView.setImage(UIImage(named: "tips_cion"), for: .normal)
+ view.addSubviews([titleLabel,addView,scanView])
+ titleLabel.do { v in
+ v.text = "从这里选择一项用来添加设备"
+ v.textColor = .rgb(0x121212)
+ v.font = .medium(14)
+ v.textAlignment = .center
+ }
+ addView.do { v in
+ v.yc.setCornerRadius(20)
+ v.btn.set(title: "添加设备",font: .regular(14),style: .theme1, target: self, action: #selector(addAction))
+ }
+ scanView.do { v in
+ v.yc.setCornerRadius(20)
+ v.btn.set(title: "扫码连接",font: .regular(14),style: .theme1, target: self, action: #selector(scanAction))
+ }
+ }
+ override func setupLayout() {
+ titleLabel.snp.makeConstraints { make in
+ make.top.equalTo(kNavBtm + 10)
+ make.left.equalToSuperview()
+ make.width.equalTo(kScreenWid)
+ }
+ addView.snp.makeConstraints { make in
+ make.top.equalTo(titleLabel.snp.bottom).offset(30)
+ make.left.right.equalToSuperview().inset(18)
+ make.height.equalTo(228)
+ }
+ scanView.snp.makeConstraints { make in
+ make.top.equalTo(addView.snp.bottom).offset(20)
+ make.left.right.height.equalTo(addView)
+ }
+ }
+
+ override func navRightViewTapped() {
+
+ }
+ @objc func addAction(){
+ App.shared.goToPage(BleScanVC())
+ }
+ @objc func scanAction(){
+
+ }
+}
+class AddDeviceSectionView: BaseView {
+ let icon = UIImageView()
+ let btn = CustomButton()
+
+ override func setupViews() {
+ backgroundColor = .white
+ addSubviews([icon,btn])
+ icon.do { v in
+ v.backgroundColor = .lightGray
+ }
+ }
+
+ override func setupLayout() {
+ icon.snp.makeConstraints { make in
+ make.width.equalTo(106)
+ make.height.equalTo(104)
+ make.centerX.equalToSuperview()
+ make.top.equalToSuperview().inset(38)
+ }
+ btn.snp.makeConstraints { make in
+ make.top.equalToSuperview().inset(166)
+ make.left.right.equalToSuperview().inset(49)
+ make.height.equalTo(49)
+ }
+ }
+}
+
--- /dev/null
+//
+// BleScanVC.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/12.
+//
+
+import UIKit
+class BleScanVC: BaseVC{
+ let tableView = UITableView(frame: .zero, style: .plain)
+ let list:[MineCellType] = [.user,.device,.userAgreement,.privacyPolicy,.language,.update,.feeback,.about]
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+ // Do any additional setup after loading the view.
+ }
+ override func setupViews() {
+ tableView.do { v in
+ v.backgroundColor = .rgb(0xF7F7F7)
+ v.delegate = self
+ v.dataSource = self
+ v.estimatedRowHeight = 76
+ v.separatorStyle = .none
+ v.register(BleScanCell.self, forCellReuseIdentifier: BleScanCell.reuseID)
+ v.tableHeaderView = BleScanHeaderView(frame: CGRect(x: 0, y: 0, width: kScreenWid, height: 150))
+ }
+ view.addSubview(tableView)
+ }
+ override func setupLayout() {
+ tableView.snp.makeConstraints { make in
+ make.left.right.bottom.equalToSuperview()
+ make.top.equalTo(kNavBtm)
+ }
+ }
+}
+
+extension BleScanVC:UITableViewDelegate,UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return list.count
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = BleScanCell.cell(withTableView: tableView, indexPath: indexPath)
+ cell.type = list[indexPath.row]
+ return cell
+ }
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ let data = list[indexPath.row]
+
+ }
+}
+
+
+class BleScanHeaderView: BaseView {
+ var radarImageView = UIImageView()
+ override func setupViews() {
+ backgroundColor = .clear
+ addSubviews([radarImageView])
+
+ radarImageView.do { v in
+// v.image = UIImage(named: "radar")
+ 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.size.equalTo(100)
+ make.center.equalToSuperview().inset(30)
+ }
+ }
+}
+
+class BleScanCell: BaseTableViewCell {
+ let bgView = UIView()
+ let icon = UIImageView()
+ let titleLabel = UILabel()
+
+ var type:MineCellType = .user{
+ didSet{
+ titleLabel.text = type.title
+ }
+ }
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+ override func setupViews() {
+ contentView.addSubview(bgView)
+ bgView.addSubviews([titleLabel,icon])
+
+ backgroundColor = .rgb(0xF7F7F7)
+ contentView.backgroundColor = .clear
+ selectionStyle = .none
+ bgView.do { v in
+ v.backgroundColor = UIColor.white
+ v.layer.cornerRadius = 8
+ v.layer.masksToBounds = true
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(16)
+ v.textAlignment = .left
+ v.text = "Deep Gen2 Max"
+ }
+ icon.image = UIImage(named: "scan_device")
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview().inset(15)
+ m.top.equalToSuperview().inset(5)
+ m.bottom.equalToSuperview().inset(5)
+ m.height.equalTo(66)
+ }
+ icon.snp.makeConstraints { (m) in
+ m.width.equalTo(24)
+ m.height.equalTo(24)
+ m.left.equalToSuperview().inset(15)
+ m.centerY.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.centerY.equalTo(icon)
+ m.left.equalTo(icon.snp.right).offset(15)
+ m.height.equalToSuperview()
+ }
+
+ }
+}
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/6.
+//
+
+import UIKit
+import JXSegmentedView
+import MJRefresh
+
+public enum MessageListType:Int {
+ case all = 0
+ case school = 1
+ case studycar = 2
+ case exam = 3
+ case system = 4
+
+ var name:String{
+ switch self {
+ case .all:
+ return "全部"
+ case .studycar:
+ return "学车提醒"
+ case .school:
+ return "驾校通知"
+ case .system:
+ return "系统提醒"
+ case .exam:
+ return "考试通知"
+ }
+ }
+ var icon: UIImage? {
+ switch self {
+ case .all: return UIImage(named: "message_exam")
+ case .studycar: return UIImage(named: "message_oclock")
+ case .school: return UIImage(named: "message_notice")
+ case .system: return UIImage(named: "message_exam")
+ case .exam: return UIImage(named: "message_exam")
+ }
+ }
+}
+
+
+final class MessageListView: BaseView {
+ private let tableView = UITableView(frame: .zero, style: .plain)
+ init(selectType type:MessageListType){
+ super.init(frame: .zero)
+// setupLayout()
+// setupStyle()
+ // tableView.mj_header?.beginRefreshing()
+ }
+
+ override init(frame: CGRect) {
+ super.init(frame: frame)
+ }
+ override func setupViews() {
+
+ }
+ override func setupLayout() {
+
+ }
+
+ @MainActor required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+}
+
+extension MessageListView: JXSegmentedListContainerViewListDelegate {
+ func listView() -> UIView {
+ return self
+ }
+}
+extension UIColor {
+ static func random() -> UIColor {
+ let red = CGFloat.random(in: 0...1)
+ let green = CGFloat.random(in: 0...1)
+ let blue = CGFloat.random(in: 0...1)
+ return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
+ }
+}
--- /dev/null
+////
+//// SleepPageVC.swift
+//// ShenYin
+////
+//// Created by liangshi on 2025/8/6.
+////
+//
+//import UIKit
+//
+//class SleepPageVC:UIViewController{
+//
+// override func viewDidLoad() {
+// super.viewDidLoad()
+// view.backgroundColor = UIColor.random()
+// }
+//
+//}
+//extension UIColor {
+// static func random() -> UIColor {
+// let red = CGFloat.random(in: 0...1)
+// let green = CGFloat.random(in: 0...1)
+// let blue = CGFloat.random(in: 0...1)
+// return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
+// }
+//}
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/5.
+//
+
+//import UIKit
+//import TabPageViewController
+//
+//class SleepVC:TabPageViewController{
+// override init() {
+// super.init()
+// tabItems = [(SleepPageVC(), "First"),
+// (SleepPageVC(), "Second1"),
+// (SleepPageVC(), "Second2"),
+// (SleepPageVC(), "Second3"),
+// (SleepPageVC(), "Second411111111"),
+// (SleepPageVC(), "Second5"),
+// (SleepPageVC(), "Second6"),
+// ]
+//
+//
+// // 初始化配置
+// var option = TabPageOption()
+//// option.tabWidth = view.frame.width / CGFloat(tabItems.count)
+// option.currentColor = .red
+// option.currentBarHeight = 5
+// // 标签文字大小
+// option.fontSize = 16
+//
+// // 当前选中标签的颜色
+// option.currentColor = .systemBlue
+//
+// // 未选中标签的颜色
+// option.defaultColor = .darkGray
+//
+// // 标签栏高度
+// option.tabHeight = 44
+//
+// // 标签项间距
+// option.tabMargin = 16
+//
+// // 标签栏背景色
+// option.tabBackgroundColor = .white
+//
+// // 页面背景色
+// option.pageBackgoundColor = .yellow
+//
+// // 是否透明(影响导航栏)
+// option.isTranslucent = true
+//
+//
+// // 滑动时是否隐藏标签栏
+// option.hidesTopViewOnSwipeType = .all // .none / .tabBar / .navigationBar / .all
+//
+// // 应用配置
+// self.option = option
+// }
+//
+// @MainActor required init?(coder aDecoder: NSCoder) {
+// fatalError("init(coder:) has not been implemented")
+// }
+//
+// override func viewDidLoad() {
+// super.viewDidLoad()
+//// self.navBar.title = "睡眠"
+// view.backgroundColor = .color(.bgColor)
+//
+//
+//
+// }
+//// override func setupViews() {
+////
+//// }
+//// override func setupLayout() {
+////
+//// }
+//}
+import Foundation
+import JXSegmentedView
+
+class SleepVC: BaseVC {
+ private var titles = [MessageListType.all,MessageListType.school,MessageListType.studycar,MessageListType.exam]
+ private let segmentedDataSource = JXSegmentedTitleDataSource()
+ private let segmentedView = JXSegmentedView()
+ private lazy var listContainerView: JXSegmentedListContainerView! = {
+ let view = JXSegmentedListContainerView(dataSource: self, type: .scrollView)
+ return view
+ }()
+
+ override func viewDidLoad() {
+ super.viewDidLoad()
+
+ }
+
+ 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)
+
+ navBar.title = "消息"
+ view.backgroundColor = .color(.bgColor)
+ segmentedView.do { (v) in
+ segmentedDataSource.titleNormalColor = .rgb(0xB3B3B3)
+ segmentedDataSource.titleSelectedColor = .color(.primary)
+ segmentedDataSource.titleNormalFont = .regular(14)
+ segmentedDataSource.titleSelectedFont = .medium(14)
+ segmentedDataSource.isTitleZoomEnabled = true
+ segmentedDataSource.titleSelectedZoomScale = 1
+ segmentedDataSource.isTitleStrokeWidthEnabled = true
+ segmentedDataSource.isItemSpacingAverageEnabled = true
+ segmentedDataSource.isTitleColorGradientEnabled = true
+ segmentedDataSource.titles = titles.map{"\($0.name)"}
+ segmentedView.backgroundColor = .white
+
+ //配置指示器
+ let indicator = JXSegmentedIndicatorLineView()
+ indicator.indicatorWidth = 30.fitR
+ indicator.height = 4.fitR
+ indicator.indicatorColor = .color(.theme)
+ segmentedView.indicators = [indicator]
+
+ v.dataSource = segmentedDataSource
+ v.listContainer = listContainerView
+ }
+// self.tz_addPopGesture(to: listContainerView.scrollView)
+ }
+}
+
+extension SleepVC: JXSegmentedListContainerViewListDelegate {
+ func listView() -> UIView {
+ return view
+ }
+}
+
+extension SleepVC: 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 dele = MessageListView(selectType: titles[index])
+// dele.popToRoot = { [unowned self] in
+// navigationController?.popToRootViewController(animated: true)
+// }
+ return dele
+ }
+}
//
import UIKit
+
+enum CustomButtonStyle:Int{
+ case theme1
+ case theme2
+ case custom
+}
+
class CustomButton: UIButton {
- func set(title:String,bgColor:UIColor = .rgb(0x0245BC), target: Any?, action: Selector) {
+ func set(title:String,font:UIFont = .bold(18),style:CustomButtonStyle = .theme1, target: Any?, action: Selector) {
setTitle(title, for: .normal)
- setTitleColor(.white, for: .normal)
addTarget(target, action: action, for: .touchUpInside)
layer.cornerRadius = 12
layer.masksToBounds = true
- titleLabel?.font = .systemFont(ofSize: 16)
- backgroundColor = bgColor
+ titleLabel?.font = font
+
+ if style == .theme1 {
+ setTitleColor(.white, for: .normal)
+ backgroundColor = UIColor.color(.theme)
+ }
+ else{
+ setTitleColor(.color(.theme), for: .normal)
+ backgroundColor = .clear
+ layer.borderWidth = 1.4
+ layer.borderColor = UIColor.color(.theme).cgColor
+ }
}
}
--- /dev/null
+//
+// CustomPicker.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/13.
+//
+
+import UIKit
+class CustomPicker: BasePresentView {
+ private let titleLabel = UILabel()
+ private let btn = UIButton(type: .custom)
+ private let tableView = UITableView(frame: .zero, style: .plain)
+ var list:[String] = []
+ var selectedIndex = 0{
+ didSet{
+ tableView.reloadData()
+ }
+ }
+ var didSelected: ((Int,String)->Void)?
+ private var title:String = ""
+
+ init(title:String,list:[String]) {
+ self.title = title
+ self.list = list
+ let h = CGFloat(50 + list.count*52) + kSafeBtm
+ super.init(contentHeight:h)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+ override func setupSubView() {
+ super.setupSubView()
+ contentView.addSubviews([titleLabel,btn,tableView])
+ }
+ override func setupLayout() {
+ super.setupLayout()
+ titleLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview()
+ m.left.right.equalToSuperview().inset(60)
+ m.height.equalTo(50)
+ }
+ btn.snp.makeConstraints { (m) in
+ m.centerY.equalTo(titleLabel)
+ m.right.equalToSuperview()
+ m.size.equalTo(60)
+ }
+ tableView.snp.makeConstraints { make in
+ make.left.right.bottom.equalToSuperview()
+ make.top.equalToSuperview().inset(50)
+ make.bottom.equalToSuperview()
+ }
+ }
+
+ override func setupStyle() {
+ super.setupStyle()
+ contentView.backgroundColor = .white
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x333333)
+ v.font = .semiBold(16)
+ v.textAlignment = .center
+ v.text = "标题"
+ }
+ btn.do { v in
+ v.setImage(UIImage(named: "close_icon"), for: .normal)
+ v.addTarget(self, action: #selector(closeAction), for: .touchUpInside)
+ }
+ tableView.do { v in
+ v.isScrollEnabled = false
+ v.backgroundColor = .white
+ v.delegate = self
+ v.dataSource = self
+ v.rowHeight = 52
+ v.separatorStyle = .none
+ v.register(CustomButton.SelectCell.self, forCellReuseIdentifier: CustomButton.SelectCell.reuseID)
+ }
+ }
+ @objc func closeAction(){
+ hide()
+ }
+}
+extension CustomPicker:UITableViewDelegate,UITableViewDataSource {
+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+ return list.count
+ }
+
+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+ let cell = CustomButton.SelectCell.cell(withTableView: tableView, indexPath: indexPath)
+ cell.titleLabel.text = list[indexPath.row]
+ cell.selectedIcon.isHidden = selectedIndex != indexPath.row
+ return cell
+ }
+ func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+ selectedIndex = indexPath.row
+ tableView.reloadData()
+ didSelected?(selectedIndex,list[selectedIndex])
+ hide()
+ }
+}
+
+extension CustomButton {
+ class SelectCell: BaseTableViewCell {
+ let bgView = UIView()
+ let titleLabel = UILabel()
+ let selectedIcon = UIImageView()
+ let line = UIView()
+
+ var fontType:FontType = .min{
+ didSet{
+ titleLabel.text = fontType.title
+ }
+ }
+
+ var shareType:ShareType = .document{
+ didSet{
+ titleLabel.text = shareType.title
+ }
+ }
+
+
+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+ super.init(style: style, reuseIdentifier: reuseIdentifier)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+ override func setupViews() {
+ contentView.addSubview(bgView)
+ bgView.addSubviews([titleLabel,selectedIcon,line])
+
+ backgroundColor = .rgb(0xF7F7F7)
+ contentView.backgroundColor = .clear
+ selectionStyle = .none
+ bgView.do { v in
+ v.backgroundColor = UIColor.white
+ }
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x121212)
+ v.font = .bold(14)
+ v.textAlignment = .left
+ }
+
+ selectedIcon.image = UIImage(named: "cell_selected")
+ line.do { v in
+ v.backgroundColor = .hexString("#F2F2F2")
+ }
+ }
+
+ override func setupLayout() {
+ bgView.snp.makeConstraints { (m) in
+ m.left.right.equalToSuperview()
+ m.top.equalToSuperview()
+ m.bottom.equalToSuperview()
+ }
+ selectedIcon.snp.makeConstraints { (m) in
+ m.width.equalTo(21)
+ m.height.equalTo(16)
+ m.right.equalToSuperview().inset(21)
+ m.centerY.equalToSuperview()
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.centerY.equalToSuperview()
+ m.left.equalToSuperview().offset(24)
+ m.height.equalToSuperview()
+ }
+ line.snp.makeConstraints { make in
+ make.left.right.equalToSuperview().inset(18)
+ make.bottom.equalToSuperview()
+ make.height.equalTo(0.4)
+ }
+ }
+ }
+
+}
+
--- /dev/null
+//
+// Untitled.swift
+// ShenYin
+//
+// Created by liangshi on 2025/8/14.
+//
+
+import UIKit
+class RecordTranslateTipsView: BasePresentView {
+ let titleLabel = UILabel()
+ let btn = UIButton(type: .custom)
+ let tipsIcon = UIImageView()
+ let desLabel1 = UILabel()
+ let desLabel2 = UILabel()
+ let actionbtn = UIButton(type: .custom)
+ var didSelected: ((Int,String)->Void)?
+
+ init() {
+ let h = 595.0
+ super.init(contentHeight:h)
+ }
+
+ required init?(coder: NSCoder) {
+ fatalError("init(coder:) has not been implemented")
+ }
+
+ override func setupSubView() {
+ super.setupSubView()
+ contentView.addSubviews([titleLabel,btn,tipsIcon,desLabel1,desLabel2,actionbtn])
+ }
+ override func setupLayout() {
+ super.setupLayout()
+ titleLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview()
+ m.left.right.equalToSuperview().inset(60)
+ m.height.equalTo(50)
+ }
+ btn.snp.makeConstraints { (m) in
+ m.centerY.equalTo(titleLabel)
+ m.right.equalToSuperview()
+ m.size.equalTo(60)
+ }
+ tipsIcon.snp.makeConstraints { make in
+ make.left.right.equalTo(18)
+ make.top.equalToSuperview().inset(64)
+ make.height.equalTo(234)
+ }
+ titleLabel.snp.makeConstraints { (m) in
+ m.top.equalToSuperview()
+ m.left.right.equalToSuperview().inset(60)
+ m.height.equalTo(50)
+ }
+ }
+
+ override func setupStyle() {
+ super.setupStyle()
+ contentView.backgroundColor = .white
+ titleLabel.do { (v) in
+ v.textColor = .rgb(0x333333)
+ v.font = .semiBold(16)
+ v.textAlignment = .center
+ v.text = "同传听译模式使用介绍"
+ }
+ btn.do { v in
+ v.setImage(UIImage(named: "close_icon"), for: .normal)
+ v.addTarget(self, action: #selector(closeAction), for: .touchUpInside)
+ }
+ tipsIcon.do { v in
+ v.image = UIImage(named: "")
+ }
+
+ }
+ @objc func closeAction(){
+ hide()
+ }
+}
pod 'RealmSwift'#数据库
pod 'SwiftDate'#时间转换
pod 'SVProgressHUD'#蒙版
- pod 'Kingfisher', '~> 6.0'#图片下载
-# pod 'FSPagerView'
+ pod 'Kingfisher', '~> 6.0'#图片下载K
+ pod 'FSPagerView'
+ pod "TabPageViewController" #tabpage
+ pod 'JXSegmentedView'
+ pod 'JXPagingView/Paging'
## pod 'Alamofire'
pod 'Moya'#网络
pod 'swiftScan'#二维码