mix兼容完成UI调试
authorliangzhenying <867174124@qq.com>
Sat, 17 Jan 2026 10:41:22 +0000 (18:41 +0800)
committerliangzhenying <867174124@qq.com>
Sat, 17 Jan 2026 10:41:22 +0000 (18:41 +0800)
53 files changed:
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Frameworks/StarburstSdk.framework/StarburstSdk
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeDirectory
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeResources
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeSignature
DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/tools/DcSdkManager.swift
DeepChordsSdk_iOS/document/豆包APP自定义协议.txt [deleted file]
ShenYin/DeepChordsSdk/DCLogger.swift
ShenYin/ShenYin.xcodeproj/project.pbxproj
ShenYin/ShenYin/Resource/colors/Colors+YL.swift
ShenYin/ShenYin/Resource/record_start_joy.gif [new file with mode: 0644]
ShenYin/ShenYin/Sdk/DcSdk/ModeVC.swift [moved from ShenYin/ShenYin/UI/Mode/ModeVC.swift with 100% similarity]
ShenYin/ShenYin/Sdk/JoySdk/CCBleManager.swift
ShenYin/ShenYin/Sdk/JoySdk/HomeDeviceVC.swift [new file with mode: 0644]
ShenYin/ShenYin/Sdk/JoySdk/ModeVC.swift [new file with mode: 0644]
ShenYin/ShenYin/UI/Base/BaseTC.swift
ShenYin/ShenYin/UI/Customer/CustomerHeaderView.swift
ShenYin/ShenYin/UI/Home/Chinese2English/Chinese2EnglishCell.swift
ShenYin/ShenYin/UI/Home/Dialog/DialogTranslateCell.swift
ShenYin/ShenYin/UI/Home/FieldRecording/RhythView.swift
ShenYin/ShenYin/UI/Home/HistoryRecord/RecordSearchBar.swift
ShenYin/ShenYin/UI/Home/HistoryRecord/SelecteCell.swift
ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CloudSearchVC.swift
ShenYin/ShenYin/UI/Home/HistoryRecord/VC/HistorySearchVC.swift
ShenYin/ShenYin/UI/Home/RecordDetail/RecordDetailBar.swift
ShenYin/ShenYin/UI/Home/Root/CurrentDeviceView.swift
ShenYin/ShenYin/UI/Home/Root/HomeVC.swift
ShenYin/ShenYin/UI/Home/TextTranslate/TranslateCell.swift
ShenYin/ShenYin/UI/Login/Controller/Binding/VarifyBindingVC.swift
ShenYin/ShenYin/UI/Login/Controller/ForgetVC.swift
ShenYin/ShenYin/UI/Login/Controller/LoginVC.swift
ShenYin/ShenYin/UI/Login/Controller/RegisterVC.swift
ShenYin/ShenYin/UI/Login/Controller/SetPasswordVC.swift [deleted file]
ShenYin/ShenYin/UI/Login/Controller/SmsLoginVC.swift
ShenYin/ShenYin/UI/Login/Controller/VerifyCodeVC.swift
ShenYin/ShenYin/UI/Login/Controller/VerifyEmailVC.swift
ShenYin/ShenYin/UI/Login/Controller/VerifyPhoneVC.swift
ShenYin/ShenYin/UI/Login/View/CodeView.swift
ShenYin/ShenYin/UI/Login/View/CustomInputView.swift
ShenYin/ShenYin/UI/Login/View/LoginBgView.swift [new file with mode: 0644]
ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift [new file with mode: 0644]
ShenYin/ShenYin/UI/Login/View/PasswordView.swift
ShenYin/ShenYin/UI/Login/View/RegionView.swift
ShenYin/ShenYin/UI/Mine/RevokeCodeVC.swift
ShenYin/ShenYin/UI/Mode/FindVC.swift
ShenYin/ShenYin/UI/Mode/ModeEffectsView.swift
ShenYin/ShenYin/UI/Mode/ModeFindView.swift
ShenYin/ShenYin/UI/common/BrokenLineView.swift
ShenYin/ShenYin/UI/common/CustomButton.swift
ShenYin/ShenYin/UI/common/pop/CustomPicker.swift
ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift

index 69ecb70..cade777 100644 (file)
Binary files a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk and b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk differ
index 5b81461..bd35b7f 100755 (executable)
Binary files a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Frameworks/StarburstSdk.framework/StarburstSdk and b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Frameworks/StarburstSdk.framework/StarburstSdk differ
index 64a8f92..1eefd0d 100644 (file)
Binary files a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo and b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo differ
index 1c4aa47..7f2690b 100644 (file)
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "StringLiteral",
-      "offset": 311,
+      "offset": 559,
       "length": 7,
       "value": "\"zh-CN\""
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "StringLiteral",
-      "offset": 430,
+      "offset": 678,
       "length": 7,
       "value": "\"en-US\""
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "BooleanLiteral",
-      "offset": 572,
+      "offset": 820,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "BooleanLiteral",
-      "offset": 639,
+      "offset": 887,
       "length": 5,
       "value": "false"
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "StringLiteral",
-      "offset": 717,
+      "offset": 965,
       "length": 5,
       "value": "\"pcm\""
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "Array",
-      "offset": 1340,
+      "offset": 1588,
       "length": 2,
       "value": "[]"
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "StringLiteral",
-      "offset": 1361,
+      "offset": 1609,
       "length": 2,
       "value": "\"\""
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "Array",
-      "offset": 1410,
+      "offset": 1658,
       "length": 2,
       "value": "[]"
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCBleRecord.swift",
       "kind": "StringLiteral",
-      "offset": 1437,
+      "offset": 1685,
       "length": 2,
       "value": "\"\""
     },
       "length": 2,
       "value": "[]"
     },
+    {
+      "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCLogger.swift",
+      "kind": "StringLiteral",
+      "offset": 509,
+      "length": 49,
+      "value": "\"***********DeepChordsSdk_v2026111501***********\""
+    },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCLogger.swift",
       "kind": "BooleanLiteral",
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCLogger.swift",
       "kind": "StringLiteral",
-      "offset": 1578,
+      "offset": 1712,
       "length": 3,
       "value": "\" \""
     },
     {
       "filePath": "\/Users\/yaozuopan\/Documents\/code\/ShenYin\/ShenYin\/DeepChordsSdk\/DCLogger.swift",
       "kind": "StringLiteral",
-      "offset": 1604,
+      "offset": 1738,
       "length": 4,
       "value": "\"\n\""
     },
index 08a83a2..c5d3298 100644 (file)
Binary files a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeDirectory and b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeDirectory differ
index 0e22ab3..a744bc3 100644 (file)
@@ -14,7 +14,7 @@
                </data>
                <key>Frameworks/StarburstSdk.framework/StarburstSdk</key>
                <data>
-               MkQukbCj7SCh2eyrtZPo6Bqdf4A=
+               8Gs4sXssvRCJN21rU30a67r7N6o=
                </data>
                <key>Frameworks/StarburstSdk.framework/_CodeSignature/CodeResources</key>
                <data>
                </data>
                <key>Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo</key>
                <data>
-               O1x9BrZy7upg08bZqGU/Uc5etPM=
+               mEqZfVrzB53tawxpt2dNXLwsZqU=
                </data>
                <key>Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json</key>
                <data>
-               aUGMYXcXkccmHGwFIdGWAK/ssp4=
+               CsItm5OKF9/+ftWZEp8o3WqdIBg=
                </data>
                <key>Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
                <data>
@@ -69,7 +69,7 @@
                <dict>
                        <key>hash2</key>
                        <data>
-                       xmw2ssE4+Oy+Ou293pFF8Wzmr6D0q15g35a8lDBSEbY=
+                       8ljyW9uNaE17fq+8E2zGO93awpOcEB3qVTJrxo/5UGU=
                        </data>
                </dict>
                <key>Frameworks/StarburstSdk.framework/_CodeSignature/CodeResources</key>
                <dict>
                        <key>hash2</key>
                        <data>
-                       jY0Vz9dnHqg9VkabsBTOyHmRQCzHAQpzx8qEVoDsZWI=
+                       9kBR1SZb+wEMizfVxGSYHNFLnjf1D03QrkLGHSHZUAc=
                        </data>
                </dict>
                <key>Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json</key>
                <dict>
                        <key>hash2</key>
                        <data>
-                       7UkzEof8Cs5MlhqxmmMbpwo8Czj4WWOkV/I2+hOGnPw=
+                       doBqFM+cZXnCY+J03piPHrTI6lqW1V89sbEslZp6zPg=
                        </data>
                </dict>
                <key>Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.private.swiftinterface</key>
index 1e463c2..1158743 100644 (file)
Binary files a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeSignature and b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeSignature differ
index fb0471b..c79057f 100644 (file)
@@ -40,7 +40,7 @@ class DcSdkManager{
                 break
             case 0x03:
                 if App.shared.topVC() is BleRecordVC {
-                    //                    vc.startRecord()
+                    //vc.startRecord()
                 }else{
                     App.shared.goToPage(BleRecordVC())
                 }
diff --git a/DeepChordsSdk_iOS/document/豆包APP自定义协议.txt b/DeepChordsSdk_iOS/document/豆包APP自定义协议.txt
deleted file mode 100644 (file)
index c0f0508..0000000
+++ /dev/null
@@ -1,165 +0,0 @@
-\r
-UUID/AE30     AE03/WRITE_WITHOUT_RESPONSE   AE04/NOTIFY \r
-\r
-\r
-\r
-BYTE0 :0xBA\r
-BYTE1 :CMD\r
-BYTE2 :DATA\r
-BYTE3:DATA_LEN\r
-BYTE4:CRC\r
-\r
-CRC:\r
-static u8 chargestore_crc8(u8 *ptr, u8 len)\r
-{\r
-    u8 i, crc;\r
-    crc = 0;\r
-    while (len--) {\r
-        crc ^= *ptr++;\r
-        for (i = 0; i < 8; i++) {\r
-            if (crc & 0x01) {\r
-                crc = (crc >> 1) ^ 0x8c;\r
-            } else {\r
-                crc >>= 1;\r
-            }\r
-        }\r
-    }\r
-    return crc;\r
-}\r
-\r
-\r
-CMD:\r
-0x01 代表设置多点连接  DATA:0x00表示关闭多点连接 0x01表示打开多点连接\r
- (例:APP下发 0xBA 0x01 0x01 0x01 CRC  耳机开启空间音频的功能回复 0xBA 0x01 0x01 0x01 CRC)\r
-0x02 代表获取多点连接  DATA:0x00表示关闭多点连接 0x01表示打开多点连接\r
-(例:APP下发 0xBA 0x02 0x00 0x00 CRC  耳机多点连接功能开启的话回复 0xBA 0x02 0x01 0x01 CRC)\r
-0x03 代表设置空间音频  DATA:0x00表示关闭空间音频 0x01表示打开空间音频\r
- (例:APP下发 0xBA 0x03 0x01 0x01 CRC  耳机开启空间音频的功能回复 0xBA 0x03 0x01 0x01 CRC)\r
-0x04 代表获取空间音频  DATA:0x00表示关闭空间音频 0x01表示打开空间音频\r
- (例:APP下发 0xBA 0x04 0x00 0x00 CRC  耳机空间音频功能开启的话回复 0xBA 0x04 0x01 0x01 CRC)\r
-\r
-0x05 代表获取设备ID  DATA:0x00 注:TWS有连接记录返回左右耳 TWS未连接过只返回单耳另一个信息都为0XFF\r
- (例:APP下发 0xBA 0x05 0x00 0x00 CRC  耳机回复设备ID: 0xBA 0x05           \r
-0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF(左耳16字节) 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF(右耳16字节)0x20 CRC)\r
-\r
-0x06 开MIC(OPUS传输)  DATA:0x01(预留定义豆包AI)\r
- (例:APP下发 0xBA 0x06 0x01 0x01 CRC  耳机回复设备0xBA 0x06       0x01 0x01 CRC)\r
-\r
-\r
-0x07 关MIC(OPUS传输)  DATA:0x01(预留定义豆包AI)\r
- (例:APP下发 0xBA 0x07 0x01 0x01 CRC  耳机回复设备0xBA 0x07       0x01 0x01 CRC)\r
-0x08  获取设备名称(UTF-8)\r
-       例:APP下发 0xBA 0x08 0x00 0x00 CRC  耳机回复:假设蓝牙名EARPHONE 0xBA 0x08 0x​​45(E) 0x41(A) 0x52(R) 0x50(P) 0x48(H) 0x4F(O) 0x4E(N) 0x45(E)  0x08(数据长度) CRC \r
-\r
-0x09  获取电量(左耳/右耳)\r
-例:APP下发 0xBA 0x09 0x00 0x00 CRC  耳机回复: 0xBA 0x09 0x00(左耳) 0x64(100电量) 0x01(右耳) 0x64(100电量) 0x04(数据长度) CRC\r
-\r
-0x0A  获取软件版本,硬件版本\r
-例:APP下发 0xBA 0x0A 0x00(软件版本) 0x01 CRC  耳机回复:假设软件版本(1.0.1) 0xBA 0x0A 0x49(1) 0x46(.) 0x48(0) 0x46(.) 0x49(1) 0x05(数据长度) CRC\r
-例:APP下发 0xBA 0x0A 0x01(硬件版本) 0x01 CRC  耳机回复:假设硬件版本(1.0.0) 0xBA 0x0A 0x49(1) 0x46(.) 0x48(0) 0x46(.) 0x48(0) 0x05(数据长度) CRC\r
-0x0B  查找耳机(耳机声音播放/停止)\r
-例:APP下发 0xBA 0x0A 0x00(关闭查找音) 0x01 CRC  耳机回复:0xBA 0x0A 0x00(关闭查找音) 0x01 CRC\r
-例:APP下发 0xBA 0x0A 0x01(打开查找音) 0x01 CRC  耳机回复:0xBA 0x0A 0x01(打开查找音) 0x01 CRC \r
-0x0C 设置EQ\r
-\r
-\r
-用户在APP设置耳机按键自定义功能\r
-BYTE0 :0x05\r
-BYTE1:DATA1\r
-BYTE2:DATA2\r
-BYTE3:DATA3\r
-BYTE1 :CMD\r
-BYTE4:CRC\r
-\r
-CRC:\r
-static u8 chargestore_crc8(u8 *ptr, u8 len)\r
-{\r
-    u8 i, crc;\r
-    crc = 0;\r
-    while (len--) {\r
-        crc ^= *ptr++;\r
-        for (i = 0; i < 8; i++) {\r
-            if (crc & 0x01) {\r
-                crc = (crc >> 1) ^ 0x8c;\r
-            } else {\r
-                crc >>= 1;\r
-            }\r
-        }\r
-    }\r
-    return crc;\r
-}\r
-\r
-\r
-DATA1:\r
-   Lift = 0x00\r
-   Right = 0x01\r
-\r
-DATA2:\r
-   butten0 = 0x00\r
-   butten1 = 0x01\r
-   butten2 = 0x02\r
-   butten3 = 0x03\r
-   butten4 = 0x04\r
-   \r
-\r
-DATA3:\r
-按键操作类型定义:\r
-    KEY_ACTION_SINGLE_CLICK = 0x01  // 单击\r
-    KEY_ACTION_LONG_PRESS = 0x02    // 长按\r
-    KEY_ACTION_DOUBLE_CLICK = 0x03  // 双击  \r
-    KEY_ACTION_TRIPLE_CLICK = 0x04  // 三击\r
-\r
-CMD:\r
-按键功能类型定义:\r
-    KEY_TYPE_NONE = 0x00       // 无功能\r
-    KEY_TYPE_PREV = 0x03       // 上一曲\r
-    KEY_TYPE_NEXT = 0x04       // 下一曲  \r
-    TYPE_PP = 0x05         // 播放/暂停\r
-    TYPE_ANSWER_CALL = 0x06 // 接听电话\r
-    KEY_TYPE_HANG_UP = 0x07    // 挂断电话\r
-    KEY_TYPE_CALL_BACK = 0x08  // 回拨\r
-    KEY_TYPE_INC_VOICE = 0x09  // 音量增加\r
-    KEY_TYPE_DESC_VOICE = 0x0A // 音量减少\r
-    KEY_TYPE_TAKE_PHOTO = 0x0B // 拍照\r
-    KEY_TYPE_SIRI = 0x0C       // 语音助手\r
-    KEY_TYPE_ANC_VOICE = 0xFF  // ANC/通透\r
-\r
-(例:设置左耳的按键1为单击是播放功能\r
-           APP下发 0x05 0x00 0x01 0x01 0x05 CRC        耳机设置成功后回复0x05 0x00 0x01 0x01 0x05 CRC)\r
-\r
-\r
-\r
-按键按下后上报通知给到APP\r
-Button Notifications \r
-Notification ID: 0x7B \r
-Payload: \r
-Byte 0: JieLi button ID \r
-0: Earbuds power left or headset button #0 \r
-1: Earbuds power right or headset button #1 \r
-2:headset button #2\r
-3:headset button #3 \r
-4:headset button #4 \r
-5:headset button #5 \r
-Byte 1: JieLi gesture ID \r
-0: Click \r
-1: Hold Up \r
-2: Double click \r
-3: Triple click \r
-Byte 2: JieLi command ID \r
-0: No action \r
-3: Previous \r
-4: Next \r
-5: Play/pause \r
-6: Take call \r
-7: End call \r
-9: Volume up \r
-10: Volume down\r
-11: Remote up \r
-12: Assistant toggle \r
-0xFF: ANC toggle\r
-\r
-\r
-\r
-\r
-\r
-\r
index 84ddb6b..b609102 100644 (file)
@@ -19,6 +19,9 @@ public class DCLogger {
     public static var isDebug:Bool = false{
         didSet{
 //            StarburstConfig.shared().isDebug = false
+            if isDebug {
+                DCLogger.debug("***********DeepChordsSdk_v2026111501***********")
+            }
         }
     }
     
index f192505..1125f27 100644 (file)
                                Sdk/DcSdk/DcThly.swift,
                                Sdk/DcSdk/DcXcly.swift,
                                Sdk/DcSdk/HomeDeviceVC.swift,
+                               Sdk/DcSdk/ModeVC.swift,
                                Sdk/DcSdk/OpusTools.swift,
                                Sdk/DcSdk/VC/DcCallingRecordVC.swift,
                                Sdk/DcSdk/VC/DcChatVC.swift,
                                Sdk/JoySdk/CCBleManager.swift,
                                Sdk/JoySdk/CCDevice.swift,
                                Sdk/JoySdk/CCPage.swift,
+                               Sdk/JoySdk/HomeDeviceVC.swift,
                                Sdk/JoySdk/JoyCallRecord.swift,
                                Sdk/JoySdk/JoyChat.swift,
                                Sdk/JoySdk/JoyChinse2English.swift,
                                Sdk/JoySdk/JoyRecord.swift,
                                Sdk/JoySdk/JoySdkManager.swift,
                                Sdk/JoySdk/JoyTcty.swift,
+                               Sdk/JoySdk/ModeVC.swift,
                                Sdk/JoySdk/VC/JoyCallingRecordVC.swift,
                                Sdk/JoySdk/VC/JoyChatVC.swift,
                                Sdk/JoySdk/VC/JoyChinese2EnglishVC.swift,
index d0dd774..514d988 100644 (file)
@@ -41,7 +41,7 @@ extension YLColor: ColorRGBProviderProtocol {
             case .subTheme:
                 return 0xF4FAFF
             case .first:
-                return 0x222222
+                return 0x121212
             case .primary:
                 return 0x333333
             case .secondary:
@@ -51,7 +51,7 @@ extension YLColor: ColorRGBProviderProtocol {
             case .placeholder:
                 return 0xcccccc
             case .separateLine:
-                return 0xffffff
+                return 0xF2F2F2
             case .cellBg:
                 return 0xffffff
             }
diff --git a/ShenYin/ShenYin/Resource/record_start_joy.gif b/ShenYin/ShenYin/Resource/record_start_joy.gif
new file mode 100644 (file)
index 0000000..89700a2
Binary files /dev/null and b/ShenYin/ShenYin/Resource/record_start_joy.gif differ
index a58e431..5bf1aa8 100644 (file)
@@ -217,12 +217,12 @@ extension CCBleManager{
     
     func connectPeripheral(_ peripheral: DCPeripheral) {
         connectPeripheral = peripheral
-        if let name = peripheral.device.name,name.hasPrefix("AI") {
-            CCDevice.isJoy = false
-        }
-        else{
-            CCDevice.isJoy = true
-        }
+//        if let name = peripheral.device.name,name.hasPrefix("AI") {
+//            CCDevice.isJoy = false
+//        }
+//        else{
+//            CCDevice.isJoy = true
+//        }
         CCDevice.initSdk()
         Logger.debug(peripheral.device.name ?? "","连接中...")
         centralManager.connect(peripheral.device, options: [CBConnectPeripheralOptionEnableTransportBridgingKey:true])
diff --git a/ShenYin/ShenYin/Sdk/JoySdk/HomeDeviceVC.swift b/ShenYin/ShenYin/Sdk/JoySdk/HomeDeviceVC.swift
new file mode 100644 (file)
index 0000000..9e9fd95
--- /dev/null
@@ -0,0 +1,189 @@
+//
+//  HomeDeviceVC.swift
+//  ShenYin
+//
+//  Created by liangshi on 2025/10/20.
+//
+
+import UIKit
+
+class HomeDeviceVC:BaseVC{
+    private var collectionView:UICollectionView!
+    let imgView = UIImageView()
+    let edtLabel = UILabel()
+    var currentBg:BackgroundModel?
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        NotificationManager.add(self, selector: #selector(deviceChange(_:)), forName: .deviceValidChange)
+    }
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        reloadData()
+    }
+    
+    override func setupViews() {
+        navBar.do { v in
+            v.leftView.isHidden = true
+            v.rightView.isHidden = false
+            v.rightView.setImage(UIImage(named: "add_icon"), for: .normal)
+            v.backgroundColor = .clear
+        }
+
+        let layout = UICollectionViewFlowLayout()
+        //layout.minimumInteritemSpacing = 10.fitR
+        layout.minimumLineSpacing = 18
+        layout.itemSize = CGSize(width: (kScreenWid-54)/2, height: 128)
+        collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
+        view.addSubviews([imgView,collectionView,edtLabel])
+        self.view.bringSubviewToFront(navBar)
+        
+        collectionView.do { (v) in
+            v.dataSource = self
+            v.delegate = self
+            v.backgroundColor = .clear
+            v.bounces = true
+            v.contentInset = UIEdgeInsets(top: 0, left: 18, bottom: 0, right: 18)
+            v.register(HomeDeviceCell.self, forCellWithReuseIdentifier: HomeDeviceCell.reuseID)
+            v.register(HomeHeadInfoView.self, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier:HomeHeadInfoView.reuseID )
+        }
+        imgView.do { v in
+//            v.backgroundColor = .red
+        }
+        edtLabel.do { v in
+            v.text = "设置壁纸".l10n
+            v.font = .regular(12)
+            v.backgroundColor = .hexString("#FAFAFA")
+            v.textColor = .hexString("#4E4E4E")
+            v.textAlignment = .center
+            v.yc.setCornerRadius(13)
+            v.yc.addTap(target: self, action: #selector(editAction))
+        }
+        
+        currentBg = BackgroundCache.get()
+        if (currentBg != nil) {
+            imgView.kf.setImage(with: currentBg?.bgPath.yc.asUrl)
+            navBar.rightView.setImage(UIImage(named: "add_icon")?.tinted(with: UIColor.hexString(currentBg!.themeColor)), for: .normal)
+        }
+        else{
+            imgView.image = UIImage(named: "home_bg")
+        }
+    }
+    override func setupLayout() {
+        collectionView.snp.makeConstraints { (m) in
+            m.top.equalTo(kNavBtm)
+            m.left.right.bottom.equalToSuperview()
+        }
+        imgView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+        edtLabel.snp.makeConstraints { make in
+            make.width.equalTo(120)
+            make.height.equalTo(26)
+            make.centerX.equalToSuperview()
+            make.bottom.equalToSuperview().inset(120)
+        }
+    }
+     func reloadData() {
+        DeviceVM.shared.refresh {[weak self] result in
+            self?.collectionView.reloadData()
+            if CCBleManager.shared.isConnetd{
+                return
+            }
+            var  autoConnetced = false
+            if let lastMac = DeviceCache.getLastConnected(){
+                for item in DeviceVM.shared.dataList {
+                    if item.mac ==  lastMac{
+                        self?.startConectBle(item)
+                        autoConnetced = true
+                    }
+                }
+            }
+            if autoConnetced == false,let model = DeviceVM.shared.dataList.first {
+                self?.startConectBle(model)
+            }
+        }
+        CacheManager.shared.user.tokenIsValid(){[weak self] sucess in
+            self?.collectionView.reloadData()
+        }
+    }
+    override func navRightViewTapped() {
+        App.shared.goToPage(BleScanVC())
+//        App.shared.goToPage(CalendarPickerVC())
+//        CCBleManager.shared.checkSettingsConnected()
+//        ChatCache.shared.LargeDateDemoSave()
+    }
+    @objc func editAction(){
+        let vc = BackgroundVC()
+        vc.didSelected = {[weak self] model in
+            guard let self = self else {
+                return
+            }
+            currentBg = model
+            self.imgView.kf.setImage(with: model.bgPath.yc.asUrl)
+            self.collectionView.reloadData()
+            navBar.rightView.setImage(UIImage(named: "add_icon")?.tinted(with: UIColor.hexString(currentBg!.themeColor)), for: .normal)
+        }
+        App.shared.goToPage(vc)
+    }
+
+    func unbindAction(_ deviceModel:HomeDeviceModel){
+        YLprogressHUD.showLoading()
+        let api = CommomApi.unbind(deviceId: deviceModel.deviceId)
+        HttpClient.request(api) {[weak self] (model:HomeDeviceModelRoot,res) in
+            guard let self = self else {return}
+            if model.isSuccess{
+                YLprogressHUD.hidden()
+                if let mac0 = CCBleManager.shared.connectPeripheral?.mac,let mac1 = DeviceCache.getLastConnected(),mac0 == mac1{
+                    DeviceCache.remove()
+                }
+                DeviceVM.shared.dataList.removeAll(where: {$0.deviceId == deviceModel.deviceId})
+                collectionView.reloadData()
+                CCBleManager.shared.cancel()
+                reloadData()
+            }
+            else{
+                YLprogressHUD.showAutoHiden("请求失败".l10n)
+            }
+        }
+    }
+    func startConectBle(_ model:HomeDeviceModel){
+        CCBleManager.shared.connect(mac: model.mac) { result in
+        }
+    }
+    @objc func deviceChange(_ noti:Notification){
+        collectionView.reloadData()
+    }
+}
+
+extension HomeDeviceVC:UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        return DeviceVM.shared.dataList.count
+    }
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        let cell = HomeDeviceCell.cell(withCollectionView: collectionView, indexPath: indexPath)
+        cell.model = DeviceVM.shared.dataList[indexPath.row]
+        cell.longPress = {[weak self] model in
+            self?.unbindAction(model)
+        }
+        return cell
+    }
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        let model = DeviceVM.shared.dataList[indexPath.row]
+        App.shared.goToPage(HomeVC(device: model))
+        
+    }
+    func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView{
+            let header = HomeHeadInfoView.header(with: collectionView, indexPath: indexPath)
+            header.updateUI()
+        header.updateColor(currentBg)
+            return header
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
+        return CGSize(width: kScreenWid, height: 160)
+    }
+}
diff --git a/ShenYin/ShenYin/Sdk/JoySdk/ModeVC.swift b/ShenYin/ShenYin/Sdk/JoySdk/ModeVC.swift
new file mode 100644 (file)
index 0000000..8a6f77b
--- /dev/null
@@ -0,0 +1,108 @@
+//
+//  Untitled.swift
+//  ShenYin
+//
+//  Created by liangshi on 2025/8/5.
+//
+import UIKit
+class ModeVC:BaseVC{
+    let bgView = UIScrollView()
+    let headerView = CurrentDeviceView()
+    let effectsView = ModeEffectsView()
+    let findView = ModeFindView()
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        
+    }
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        headerView.updateUI()
+    }
+    
+    override func setupViews() {
+        self.navBar.title = CCBleManager.shared.connectPeripheral?.device.name ?? ""
+        navBar.backgroundColor = .clear
+        view.backgroundColor = .color(.bgColor)
+        
+        view.addSubview(bgView)
+        bgView.addSubviews([headerView,effectsView,findView])
+        
+//        bgView.backgroundColor = .red
+        effectsView.do { v in
+            v.selectedMode = {[weak self] mode in
+                self?.selectedModeAction(mode)
+            }
+        }
+        findView.yc.addTap(target: self, action: #selector(findAction))
+        NotificationManager.add(self, selector: #selector(deviceChange(_:)), forName: .deviceValidChange)
+        updateState()
+    }
+    override func setupLayout() {
+        bgView.snp.makeConstraints { make in
+            make.top.equalTo(kNavBtm)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(kScreenHei - kNavBtm - kTabbarHei)
+        }
+        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(headerView.snp.bottom).offset(20)
+            make.centerX.equalToSuperview()
+            make.width.equalTo(kScreenWid - 36)
+            make.height.equalTo(325)
+        }
+        findView.snp.makeConstraints { make in
+            make.top.equalTo(effectsView.snp.bottom).offset(10)
+            make.centerX.equalToSuperview()
+            make.width.equalTo(kScreenWid - 36)
+            make.height.equalTo(62)
+            make.bottom.equalToSuperview().inset(20)
+        }
+    }
+    override func setupData() {
+        CCDevice.getEQMode {[weak self] type in
+              guard let self = self else{return}
+              effectsView.mode = type ?? .normal
+        }
+    }
+    
+    override func navRightViewTapped() {
+
+    }
+}
+
+extension ModeVC{
+    @objc func deviceChange(_ noti:Notification){
+        updateState()
+    }
+    func updateState(){
+        self.view.alpha = CCBleManager.shared.isConnetd ? 1:0.5
+    }
+    
+    func selectedModeAction(_ mode:ModeEffectsType){
+        if !CCBleManager.shared.isConnetd {
+            return
+        }
+        CCDevice.setEQMode(mode)
+        if mode == .custom {
+            App.shared.goToPage(CustomEqVC())
+        }
+    }
+    @objc func findAction(){
+        if CCBleManager.shared.isConnetd {
+            App.shared.goToPage(FindVC())
+        }
+        
+    }
+}
+
index 9fc9031..0a09a25 100644 (file)
@@ -50,7 +50,7 @@ class BaseTC:UITabBarController{
             let appearance = UITabBarAppearance()
             appearance.configureWithDefaultBackground()
             appearance.stackedLayoutAppearance.normal.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.rgb(0x8D8D8D)]
-            appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+            appearance.stackedLayoutAppearance.selected.titleTextAttributes = [NSAttributedString.Key.foregroundColor:UIColor.color(.first)]
             self.tabBar.standardAppearance = appearance
             self.tabBar.backgroundColor = .white
             view.backgroundColor = .color(.bgColor)
index 26aff73..3fba650 100644 (file)
@@ -71,7 +71,7 @@ class CustomerHeaderView: BaseView {
             
 //            if item !== vm.list.last {
 //                let line = UIView()
-//                line.backgroundColor = .hexString("#.color(.separateLine)")
+//                line.backgroundColor = .color(.separateLine)
 //                line.height = 1
 //                line.width = kScreenWid - 2*70
 //                line.left = 10
index 4cae225..61b671b 100644 (file)
@@ -106,8 +106,6 @@ class Chinese2EnglishCell:BaseTableViewCell{
         }
     }
     @objc func playAction(){
-//        UIPasteboard.general.string = data.send + "\n" + data.response
-//        YLprogressHUD.showAutoHiden("已拷贝")
         if playIcon.isAnimating {
             playIcon.stopAnimating()
         }
index 630fc36..a99d0b4 100644 (file)
@@ -47,7 +47,7 @@ class DialogTranslateCell:BaseTableViewCell{
         }
         originalLabel.do { v in
             v.font = .regular(14)
-            v.textColor = .color(.first)
+            v.textColor = .color(.secondary)
             v.numberOfLines = 0
             v.textAlignment = .left
         }
@@ -127,15 +127,13 @@ class DialogTranslateCell:BaseTableViewCell{
                     make.left.equalToSuperview().inset(18)
                 }
                 bgView.backgroundColor = .color(.cellBg)
-                originalLabel.textColor = .color(.first)
+                originalLabel.textColor = .color(.secondary)
                 translationLabel.textColor = .color(.first)
             }
             line.setNeedsLayout()
         }
     }
     @objc func playAction(){
-        //        UIPasteboard.general.string = data.send + "\n" + data.response
-        //        YLprogressHUD.showAutoHiden("已拷贝")
         if playIcon.isAnimating {
             playIcon.stopAnimating()
         }
index 6d69e3b..3bbc1bb 100644 (file)
@@ -19,7 +19,7 @@ class RhythView: BaseView {
         }
 
         stopWave.image = UIImage(named: "audio_record_normal")
-        startWave.kf.setImage(with: Bundle.main.url(forResource: "record_start", withExtension: "gif")!)
+        startWave.kf.setImage(with: Bundle.main.url(forResource: CCDevice.isJoy ? "record_start_joy":"record_start", withExtension: "gif")!)
         startWave.isHidden = true
 //        startWave.backgroundColor = .green
 //        backgroundColor = .red
index d9b7049..07e80ac 100644 (file)
@@ -49,6 +49,7 @@ class RecordSearchBar:BaseView{
             v.attributedPlaceholder = NSAttributedString(string: "搜索".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
             v.returnKeyType = .done
             v.delegate = self
+            v.textColor = .color(.first)
             v.addTarget(self, action: #selector(textFieldDidChange(_:)), for: .editingChanged)
         }
         
index 7be2808..e32f48d 100644 (file)
@@ -109,7 +109,7 @@ class SelectCell: BaseTableViewCell {
         
         selectedIcon.image = UIImage(named: "cell_selected")
         line.do { v in
-            v.backgroundColor = .hexString("#.color(.separateLine)")
+            v.backgroundColor = .color(.separateLine)
         }
     }
     
index e35574b..3f3f1ed 100644 (file)
@@ -13,7 +13,7 @@ class CloudSearchVC: BaseVC{
     var searchList = [RecordHistoryModel]()
     var deleteCallback:((_ list:[RecordHistoryModel])->Void)?
     var collectStateChangeCallback:(()->Void)?
-    var selectedDate:String = Date().format(.short)
+    var selectedDate:String = ""
     init(list:[RecordHistoryModel]) {
         orginList = list
         searchList = orginList
@@ -121,7 +121,7 @@ extension CloudSearchVC:RecordSearchBarDelegate{
     
     func searchBarcalendarAction(_ toolBar:RecordSearchBar){
         let vc = CalendarPickerVC()
-        vc.defaultDate = selectedDate
+        vc.defaultDate = selectedDate.isEmpty ? Date().format(.short):selectedDate
         vc.didSelectedDate = {[weak self] date in
             guard let self = self else {
                 return
index 8868885..248ff8c 100644 (file)
@@ -13,7 +13,7 @@ class HistorySearchVC: BaseVC{
     var searchList = [RecordDetailModel]()
     var deleteCallback:((_ list:[RecordDetailModel])->Void)?
     var collectStateChangeCallback:((RecordDetailModel)->Void)?
-    var selectedDate:String = Date().format(.short)
+    var selectedDate:String = ""
 //    init(data:[RecordDetailModel]) {
 //        list = data
 //        super.init()
@@ -125,7 +125,7 @@ extension HistorySearchVC:RecordSearchBarDelegate{
     
     func searchBarcalendarAction(_ toolBar:RecordSearchBar){
         let vc = CalendarPickerVC()
-        vc.defaultDate = selectedDate
+        vc.defaultDate = selectedDate.isEmpty ? Date().format(.short):selectedDate
         vc.didSelectedDate = {[weak self] date in
             guard let self = self else {
                 return
index d6edccb..15bdb49 100644 (file)
@@ -21,7 +21,7 @@ class RecordDetailBar: BaseView {
     weak var delegate:RecordDetailBarDelegate?
     
     override func setupViews() {
-        backgroundColor = .clear
+        backgroundColor = .color(.cellBg)
         addSubviews([tranlateItem,renameItem,playItem,moreItem])
 
         tranlateItem.do {v in
index 4c8c978..46d5ab9 100644 (file)
@@ -43,13 +43,8 @@ class CurrentDeviceView: BaseView {
     func updateUI(){
         if let device = DeviceVM.shared.currentDevice{
             imageView.kf.setImage(with: device.image.yc.asUrl)
-            
-            if CCBleManager.shared.isConnetd {
-                alpha = 1
-            }
-            else{
-                alpha = 0.5
-            }
+        }
+        else{
         }
     }
 }
index 0aa9df9..8a7b56a 100644 (file)
@@ -21,14 +21,14 @@ class HomeVC:BaseVC{
     
     override func viewDidLoad() {
         super.viewDidLoad()
-
+        NotificationManager.add(self, selector: #selector(deviceChange(_:)), forName: .deviceValidChange)
+        updateUI()
     }
     
     override func setupViews() {
         navBar.title = device.productName
         navBar.backgroundColor = .color(.bgColor)
         view.backgroundColor = .color(.bgColor)
-//        navBar.rightView.setImage(UIImage(named: "add_icon"), for: .normal)
         view.addSubview(bgView)
         bgView.addSubviews([headerView,functionView,bottomView])
         
@@ -56,25 +56,11 @@ class HomeVC:BaseVC{
             make.bottom.equalToSuperview().inset(10)
         }
     }
-
-    
-//    @objc func addDeviceAction(){
-//        let vc = AddDeviceVC()
-//        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: "请求失败".l10n)
-//            }
-//        }
+    @objc func deviceChange(_ noti:Notification){
+        updateUI()
+    }
+    func updateUI(){
+        self.headerView.icon.alpha = CCBleManager.shared.isConnetd ? 1:0.5
     }
 }
 
index 0a6fc6f..20ff75a 100644 (file)
@@ -45,7 +45,7 @@ class TranslateCell:BaseTableViewCell{
         }
         originalLabel.do { v in
             v.font = .regular(14)
-            v.textColor = .color(.first)
+            v.textColor = .color(.secondary)
             v.numberOfLines = 0
             v.textAlignment = .left
         }
@@ -104,7 +104,7 @@ class TranslateCell:BaseTableViewCell{
     }
     @objc func copyAction(){
         UIPasteboard.general.string = data.send + "\n" + data.response
-//        YLprogressHUD.showAutoHiden("已拷贝")
+        YLprogressHUD.showAutoHiden("已复制".l10n)
     }
 }
 
index 1ef3f7e..5c30da9 100644 (file)
@@ -70,6 +70,7 @@ extension VarifyBindingVC{
             if model.isSuccess{
                 YLprogressHUD.hidden()
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
             }
             else{
                 YLprogressHUD.showAutoHiden(model.msg)
index 162be85..b179510 100644 (file)
@@ -14,8 +14,8 @@ enum ForgetVCType{
 
 class ForgetVC:BaseVC{
     
-    let logoImg = UIImageView(image: UIImage(named: "logo_3"))
-    let bgView = UIView()
+    let logoImg = LoginHeaderView()
+    let bgView = LoginBgView()
     let titleLabel = UILabel()
     let phoneView = CustomInputView()
     let codeView = CodeView()
@@ -37,10 +37,7 @@ class ForgetVC:BaseVC{
         self.navBar.title = ""
         view.backgroundColor = .color(.bgColor)
 
-        bgView.do { v in
-            v.backgroundColor = .color(.bgColor)
-            v.yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid, height: kScreenHei - 244), roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 50, height: 50))
-        }
+
         titleLabel.do { v in
             v.text = self.type == .forget ? "忘记密码".l10n:"重置密码".l10n
             v.font = .medium(18)
@@ -64,10 +61,17 @@ class ForgetVC:BaseVC{
     }
     override func setupLayout(){
         logoImg.snp.makeConstraints { make in
-            make.width.equalTo(62)
-            make.height.equalTo(80)
-            make.top.equalTo(kNavBtm + 20)
-            make.centerX.equalToSuperview()
+            if CCDevice.isJoy{
+                make.left.equalToSuperview().inset(28)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
+            else{
+                make.width.equalTo(62)
+                make.height.equalTo(80)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
         }
         bgView.snp.makeConstraints { make in
             make.left.right.equalToSuperview()
@@ -116,6 +120,7 @@ extension ForgetVC{
             if model.isSuccess{
                 YLprogressHUD.hidden()
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
             }
             else{
                 YLprogressHUD.showAutoHiden(model.msg)
index 7dc2978..56ea674 100644 (file)
@@ -9,9 +9,8 @@ import UIKit
 import DeviceKit
 
 class LoginVC:BaseVC{
-    
-    let logoImg = UIImageView(image: UIImage(named: "logo_3"))
-    let bgView = UIView()
+    let logoImg = LoginHeaderView()
+    let bgView = LoginBgView()
     let titleLabel = UILabel()
     let phoneView = CustomInputView()
     let pwdView = PasswordView()
@@ -26,11 +25,7 @@ class LoginVC:BaseVC{
 //        self.navBar.title = ""
         navBar.isHidden = true
         view.backgroundColor = .color(.bgColor)
-        
-        bgView.do { v in
-            v.backgroundColor = .color(.bgColor)
-            v.yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid, height: kScreenHei - 244), roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 50, height: 50))
-        }
+
         titleLabel.do { v in
             v.text = "用户登录".l10n
             v.font = .medium(18)
@@ -53,10 +48,17 @@ class LoginVC:BaseVC{
     }
     override func setupLayout(){
         logoImg.snp.makeConstraints { make in
-            make.width.equalTo(62)
-            make.height.equalTo(80)
-            make.top.equalTo(kNavBtm + 20)
-            make.centerX.equalToSuperview()
+            if CCDevice.isJoy{
+                make.left.equalToSuperview().inset(28)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
+            else{
+                make.width.equalTo(62)
+                make.height.equalTo(80)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
         }
         bgView.snp.makeConstraints { make in
             make.left.right.equalToSuperview()
index 81db0ae..90b72b9 100644 (file)
@@ -10,8 +10,8 @@ import DeviceKit
 
 class RegisterVC:BaseVC{
     
-    let logoImg = UIImageView(image: UIImage(named: "logo_3"))
-    let bgView = UIView()
+    let logoImg = LoginHeaderView()
+    let bgView = LoginBgView()
     let titleLabel = UILabel()
     let regionView = RegionView()
     let phoneView = CustomInputView()
@@ -28,10 +28,7 @@ class RegisterVC:BaseVC{
         //        navBar.isHidden = true
         view.backgroundColor = .color(.bgColor)
 
-        bgView.do { v in
-            v.backgroundColor = .color(.bgColor)
-            v.yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid, height: kScreenHei - 244), roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 50, height: 50))
-        }
+
         titleLabel.do { v in
             v.text = "用户注册".l10n
             v.font = .medium(18)
@@ -59,10 +56,17 @@ class RegisterVC:BaseVC{
     }
     override func setupLayout(){
         logoImg.snp.makeConstraints { make in
-            make.width.equalTo(62)
-            make.height.equalTo(80)
-            make.top.equalTo(kNavBtm + 20)
-            make.centerX.equalToSuperview()
+            if CCDevice.isJoy{
+                make.left.equalToSuperview().inset(28)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
+            else{
+                make.width.equalTo(62)
+                make.height.equalTo(80)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
         }
         bgView.snp.makeConstraints { make in
             make.left.right.equalToSuperview()
@@ -124,6 +128,7 @@ extension RegisterVC{
         HttpClient.request(CommomApi.sms(account: text,type: .reg)) {[weak self] (model:ResponseBaseModel, res) in
             if model.isSuccess{
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
                 YLprogressHUD.hidden()
             }
             else{
diff --git a/ShenYin/ShenYin/UI/Login/Controller/SetPasswordVC.swift b/ShenYin/ShenYin/UI/Login/Controller/SetPasswordVC.swift
deleted file mode 100644 (file)
index 4a31174..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-//
-//  SetPwdVC.swift
-//  ShenYin
-//
-//  Created by liangshi on 2025/8/25.
-//
-
-import UIKit
-
-class SetPwdVC:BaseVC{
-
-    let titleLabel = UILabel()
-    let pwdView1 = PasswordView()
-    let pwdView2 = PasswordView()
-    let loginBtn = CustomButton()
-    let desLabel = UILabel()
-    
-    override func viewDidLoad() {
-        super.viewDidLoad()
-    }
-    override func setupViews(){
-        self.navBar.title = "设置密码".l10n
-        view.backgroundColor = .color(.bgColor)
-       
-        titleLabel.do { v in
-            v.text = "新密码".l10n
-            v.font = .medium(18)
-            v.textColor = .color(.first)
-        }
-        pwdView1.do { v in
-            v.textField.attributedPlaceholder = NSAttributedString(string: "请输入密码".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
-
-        }
-        pwdView2.do { v in
-            v.textField.attributedPlaceholder = NSAttributedString(string: "请输入确认密码".l10n, attributes: [NSAttributedString.Key.foregroundColor: UIColor.color(.placeholder)])
-
-        }
-        desLabel.do { v in
-            v.text = "密码长度8-16位,数字、字母、字符至少包含两种".l10n
-            v.font = .regular(12)
-            v.textColor = .hexString("#999999")
-        }
-        loginBtn.set(title: "确定".l10n,style: .theme1, target: self, action: #selector(loginAction))
-        view.addSubviews([titleLabel,pwdView1,pwdView2,loginBtn,desLabel])
-        
-    }
-    override func setupLayout(){
-
-        titleLabel.snp.makeConstraints { make in
-            make.top.equalToSuperview().offset(kNavBtm + 30)
-            make.left.right.equalToSuperview().inset(36)
-        }
-        pwdView1.snp.makeConstraints { make in
-            make.top.equalTo(titleLabel.snp.bottom).offset(16)
-            make.left.right.equalToSuperview().inset(36)
-        }
-        pwdView2.snp.makeConstraints { make in
-            make.top.equalTo(pwdView1.snp.bottom).offset(20)
-            make.left.right.equalToSuperview().inset(36)
-        }
-        loginBtn.snp.makeConstraints { make in
-            make.top.equalTo(pwdView2.snp.bottom).offset(74)
-            make.left.right.equalToSuperview().inset(51)
-            make.height.equalTo(46)
-        }
-        desLabel.snp.makeConstraints { make in
-            make.top.equalTo(pwdView2.snp.bottom).offset(14)
-            make.centerX.equalToSuperview()
-        }
-    }
-    
-}
-
-extension SetPwdVC{
-
-    @objc func loginAction(){
-        guard let pwd1 = pwdView1.textField.value else{
-            YLprogressHUD.showAutoHiden("请输入密码".l10n)
-            return
-        }
-        guard let pwd2 = pwdView2.textField.value else{
-            YLprogressHUD.showAutoHiden("请输入确认密码".l10n)
-            return
-        }
-    }
-}
index 0fe6edd..eba23ca 100644 (file)
@@ -10,8 +10,8 @@ import DeviceKit
 
 class SmsLoginVC:BaseVC{
     
-    let logoImg = UIImageView(image: UIImage(named: "logo_3"))
-    let bgView = UIView()
+    let logoImg = LoginHeaderView()
+    let bgView = LoginBgView()
     let titleLabel = UILabel()
     let regionView = RegionView()
     let phoneView = CustomInputView()
@@ -25,11 +25,7 @@ class SmsLoginVC:BaseVC{
     }
     override func setupViews(){
         view.backgroundColor = .color(.bgColor)
-        
-        bgView.do { v in
-            v.backgroundColor = .color(.bgColor)
-            v.yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid, height: kScreenHei - 244), roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 50, height: 50))
-        }
+
         titleLabel.do { v in
             v.text = "验证码登录".l10n
             v.font = .medium(18)
@@ -58,10 +54,17 @@ class SmsLoginVC:BaseVC{
     }
     override func setupLayout(){
         logoImg.snp.makeConstraints { make in
-            make.width.equalTo(62)
-            make.height.equalTo(80)
-            make.top.equalTo(kNavBtm + 20)
-            make.centerX.equalToSuperview()
+            if CCDevice.isJoy{
+                make.left.equalToSuperview().inset(28)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
+            else{
+                make.width.equalTo(62)
+                make.height.equalTo(80)
+                make.top.equalTo(kNavBtm + 20)
+                make.centerX.equalToSuperview()
+            }
         }
         bgView.snp.makeConstraints { make in
             make.left.right.equalToSuperview()
@@ -128,6 +131,7 @@ extension SmsLoginVC{
         HttpClient.request(CommomApi.sms(account: text,type: .login)) {[weak self] (model:ResponseBaseModel, res) in
             if model.isSuccess{
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
                 YLprogressHUD.hidden()
             }
             else{
index 8061677..3febe93 100644 (file)
@@ -84,6 +84,7 @@ extension VerifyCodeVC{
         HttpClient.request(CommomApi.sms(account: text,type: .update)) {[weak self] (model:ResponseBaseModel, res) in
             if model.isSuccess{
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
                 YLprogressHUD.hidden()
             }
             else{
index d6b733c..1e73c65 100644 (file)
@@ -68,6 +68,7 @@ extension VerifyEmailVC{
         HttpClient.request(CommomApi.sms(account: self.email,type: .update)) {[weak self] (model:ResponseBaseModel, res) in
             if model.isSuccess{
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
                 YLprogressHUD.hidden()
             }
             else{
index b63ddcb..70b73c0 100644 (file)
@@ -69,6 +69,7 @@ extension VerifyPhoneVC{
             if model.isSuccess{
                 YLprogressHUD.hidden()
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
             }
             else{
                 YLprogressHUD.showAutoHiden(model.msg)
index 596dacd..3b27f46 100644 (file)
@@ -26,7 +26,7 @@ class CodeView: BaseView {
             v.label.text = "点击获取".l10n
         }
         
-        inputBgView.backgroundColor = .color(.cellBg)
+        inputBgView.backgroundColor = CCDevice.isJoy ? .rgb(0xF3F4F8): .color(.cellBg)
         inputBgView.layer.cornerRadius = 12
         inputBgView.layer.masksToBounds = true
         
@@ -83,7 +83,7 @@ extension UIView{
     }
     func addBottomLine(){
         let line = UIView()
-        line.backgroundColor = .hexString("#.color(.separateLine)")
+        line.backgroundColor = .color(.separateLine)
         addSubview(line)
         line.snp.makeConstraints { make in
             make.height.equalTo(1)
index da7090f..6561eeb 100644 (file)
@@ -36,7 +36,7 @@ class CustomInputView: BaseView {
             v.leftViewMode = .never
         }
         
-        inputBgView.backgroundColor =  .color(.cellBg)
+        inputBgView.backgroundColor =  CCDevice.isJoy ? .rgb(0xF3F4F8): .color(.cellBg)
         inputBgView.layer.cornerRadius = 10
         inputBgView.layer.masksToBounds = true
         addSubviews([inputBgView])
diff --git a/ShenYin/ShenYin/UI/Login/View/LoginBgView.swift b/ShenYin/ShenYin/UI/Login/View/LoginBgView.swift
new file mode 100644 (file)
index 0000000..568198b
--- /dev/null
@@ -0,0 +1,13 @@
+//
+//  LoginBgView.swift
+//  ShenYin
+//
+//  Created by liangshi on 2026/1/17.
+//
+
+class LoginBgView: BaseView {
+    override func setupViews() {
+        backgroundColor = CCDevice.isJoy ? UIColor.white : .color(.bgColor)
+        yc.setCorners(withRoundedRect: CGRect(x: 0, y: 0, width: kScreenWid, height: kScreenHei - 244), roundingCorners: [.topLeft,.topRight], cornerRadii: CGSize(width: 50, height: 50))
+    }
+}
diff --git a/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift b/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift
new file mode 100644 (file)
index 0000000..36926a8
--- /dev/null
@@ -0,0 +1,39 @@
+//
+//  LoginHeaderView.swift
+//  ShenYin
+//
+//  Created by liangshi on 2026/1/17.
+//
+
+class LoginHeaderView: BaseView {    
+    override func setupViews() {
+        if CCDevice.isJoy {
+            let tipsLabel = UILabel()
+//            tipsLabel.backgroundColor = .red
+//            backgroundColor = .green
+            tipsLabel.do { v in
+                v.numberOfLines = 0
+                v.font = .medium(22)
+                v.textColor = .rgb(0x121212)
+                let text = "您好, \n欢迎使用DeepChords".l10n
+                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
+            }
+            addSubview(tipsLabel)
+            tipsLabel.snp.makeConstraints { make in
+                make.edges.equalToSuperview()
+            }
+        }
+        else{
+            let logo = UIImageView(image: UIImage(named: "logo_3"))
+            addSubview(logo)
+            logo.snp.makeConstraints { make in
+                make.edges.equalToSuperview()
+            }
+        }
+    }
+}
index 76926db..aa226cc 100644 (file)
@@ -27,7 +27,7 @@ class PasswordView: BaseView {
         textField.rightView = btn
         textField.rightViewMode = .always
         
-        inputBgView.backgroundColor =  .color(.cellBg)
+        inputBgView.backgroundColor =  CCDevice.isJoy ? .rgb(0xF3F4F8): .color(.cellBg)
         inputBgView.layer.cornerRadius = 10
         inputBgView.layer.masksToBounds = true
         addSubviews([inputBgView])
index 9a3805e..38a89e5 100644 (file)
@@ -25,7 +25,7 @@ class RegionView: BaseView {
         addSubviews([inputBgView])
         inputBgView.addSubviews([titleLabel,valeLabel,arrrowIcon])
         
-        inputBgView.backgroundColor =  .color(.cellBg)
+        inputBgView.backgroundColor =  CCDevice.isJoy ? .rgb(0xF3F4F8): .color(.cellBg)
         inputBgView.layer.cornerRadius = 10
         inputBgView.layer.masksToBounds = true
         inputBgView.yc.addTap(target: self, action: #selector(tapAction))
index 4092862..4b06c6f 100644 (file)
@@ -67,6 +67,7 @@ extension RevokeCodeVC{
         HttpClient.request(CommomApi.revokeCode) {[weak self] (model:ResponseBaseModel, res) in
             if model.isSuccess{
                 self?.codeView.codeButton.start()
+                self?.codeView.textField.becomeFirstResponder()
                 YLprogressHUD.hidden()
             }
             else{
index 6899ec8..11b0c5f 100644 (file)
@@ -25,7 +25,7 @@ class FindVC:BaseVC{
     }
     
     override func setupViews() {
-        self.navBar.title = "查找眼镜".l10n
+        self.navBar.title = CCDevice.isJoy ? "查找耳机".l10n:"查找眼镜".l10n
         navBar.backgroundColor = .clear
         view.backgroundColor = .color(.bgColor)
         view.addSubviews([titleLabel,desLabel,leftRadar,rightRadar,leftBtn,rightBtn])
index 2641460..9675ff2 100644 (file)
@@ -63,20 +63,20 @@ class ModeEffectsView: BaseView {
 //                }
             }
         }
-        NotificationManager.add(self, selector: #selector(deviceChange(_:)), forName: .deviceValidChange)
-        updateState()
-    }
-    @objc func deviceChange(_ noti:Notification){
-        updateState()
-    }
-    func updateState(){
-        if CCBleManager.shared.isConnetd {
-            alpha = 1
-        }
-        else{
-            alpha = 0.5
-        }
+//        NotificationManager.add(self, selector: #selector(deviceChange(_:)), forName: .deviceValidChange)
+//        updateState()
     }
+//    @objc func deviceChange(_ noti:Notification){
+//        updateState()
+//    }
+//    func updateState(){
+//        if CCBleManager.shared.isConnetd {
+//            alpha = 1
+//        }
+//        else{
+//            alpha = 0.5
+//        }
+//    }
     
     override func setupLayout() {
         titleLabel.snp.makeConstraints { make in
index 2984c22..a50b3b0 100644 (file)
@@ -18,7 +18,7 @@ class ModeFindView: BaseView {
         
         icon.image = UIImage(named: "find_icon")
         titleLabel.do { v in
-            v.text = "查找眼镜".l10n
+            v.text = CCDevice.isJoy ? "查找耳机".l10n:"查找眼镜".l10n
             v.font = .bold(16)
             v.textColor = .color(.first)
             
index 1724801..58febd3 100644 (file)
@@ -20,7 +20,7 @@ class BrokenLineView: UIView {
     
     private func setupShapeLayer() {
         shapeLayer = CAShapeLayer()
-        shapeLayer.strokeColor = UIColor.color(.separateLine).cgColor
+        shapeLayer.strokeColor = CCDevice.isJoy ? UIColor.rgb(0x93C6EC).cgColor: UIColor.color(.separateLine).cgColor
         shapeLayer.fillColor = UIColor.clear.cgColor
         shapeLayer.lineWidth = 0.5
         shapeLayer.lineDashPattern = [NSNumber(value: 5.0), NSNumber(value: 3.0)]
index e4f08a9..91c3c9f 100644 (file)
@@ -17,33 +17,65 @@ enum CustomButtonStyle:Int{
 
 class CustomButton: UIButton {
     func set(title:String,font:UIFont = .bold(14),style:CustomButtonStyle = .theme1, target: Any?, action: Selector) {
-        setTitle(title, for: .normal)
-        addTarget(target, action: action, for: .touchUpInside)
-        layer.cornerRadius = 23
-        layer.masksToBounds = true
-        titleLabel?.font = font
-        
-        if style == .theme1 {
-            setTitleColor(.rgb(0x121212), for: .normal)
-            backgroundColor =  .white
-        }
-        else if style == .theme4 {
-            setTitleColor(.hexString("#FF4E4E"), for: .normal)
-            backgroundColor =  UIColor.hexString("#FF4E4E")
-            setTitleColor(.white, for: .normal)
-            titleLabel?.font = .bold(14)
-        }
-        else if style == .theme3 {
-            layer.cornerRadius = 12
-            setTitleColor(.color(.first), for: .normal)
-            backgroundColor =  .color(.cellBg)
-            titleLabel?.font = .regular(14)
+        if CCDevice.isJoy{
+            setTitle(title, for: .normal)
+            addTarget(target, action: action, for: .touchUpInside)
+            layer.cornerRadius = 23
+            layer.masksToBounds = true
+            titleLabel?.font = font
+            
+            if style == .theme1 {
+                setTitleColor(.white, for: .normal)
+                backgroundColor =  .color(.theme)
+            }
+            else if style == .theme4 {
+                setTitleColor(.hexString("#FF4E4E"), for: .normal)
+                backgroundColor =  UIColor.hexString("#FF4E4E")
+                setTitleColor(.white, for: .normal)
+                titleLabel?.font = .bold(14)
+            }
+            else if style == .theme3 {
+                layer.cornerRadius = 12
+                setTitleColor(.color(.first), for: .normal)
+                backgroundColor =  .color(.cellBg)
+                titleLabel?.font = .regular(14)
+            }
+            else{
+                setTitleColor(.color(.theme), for: .normal)
+                backgroundColor = .clear
+                layer.borderWidth = 1.4
+                layer.borderColor = UIColor.color(.theme).cgColor
+            }
         }
         else{
-            setTitleColor(.white, for: .normal)
-            backgroundColor = .clear
-            layer.borderWidth = 1.4
-            layer.borderColor = UIColor.color(.first).cgColor
+            setTitle(title, for: .normal)
+            addTarget(target, action: action, for: .touchUpInside)
+            layer.cornerRadius = 23
+            layer.masksToBounds = true
+            titleLabel?.font = font
+            
+            if style == .theme1 {
+                setTitleColor(.rgb(0x121212), for: .normal)
+                backgroundColor =  .white
+            }
+            else if style == .theme4 {
+                setTitleColor(.hexString("#FF4E4E"), for: .normal)
+                backgroundColor =  UIColor.hexString("#FF4E4E")
+                setTitleColor(.white, for: .normal)
+                titleLabel?.font = .bold(14)
+            }
+            else if style == .theme3 {
+                layer.cornerRadius = 12
+                setTitleColor(.color(.first), for: .normal)
+                backgroundColor =  .color(.cellBg)
+                titleLabel?.font = .regular(14)
+            }
+            else{
+                setTitleColor(.white, for: .normal)
+                backgroundColor = .clear
+                layer.borderWidth = 1.4
+                layer.borderColor = UIColor.color(.first).cgColor
+            }
         }
     }
     
index 5411bf4..e5777d2 100644 (file)
@@ -168,7 +168,7 @@ fileprivate extension CustomButton {
             
             selectedIcon.image = UIImage(named: "cell_selected")
             line.do { v in
-                v.backgroundColor = .hexString("#.color(.separateLine)")
+                v.backgroundColor = .color(.separateLine)
             }
         }
         
index 6f2231e..d72f852 100644 (file)
@@ -197,7 +197,7 @@ fileprivate extension LanguagePickerView {
             
             selectedIcon.image = UIImage(named: "cell_selected")
             line.do { v in
-                v.backgroundColor = .hexString("#.color(.separateLine)")
+                v.backgroundColor = .color(.separateLine)
             }
         }