From: liangzhenying <867174124@qq.com>
Date: Sat, 17 Jan 2026 10:41:22 +0000 (+0800)
Subject: mix兼容完成UI调试
X-Git-Tag: mix-v1.0~4
X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=5ecb14644946eb329248b229fc6b861860485847;p=mirrors%2FShenYin.git
mix兼容完成UI调试
---
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk
index 69ecb70..cade777 100644
Binary files a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk and b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/DeepChordsSdk differ
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Frameworks/StarburstSdk.framework/StarburstSdk b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Frameworks/StarburstSdk.framework/StarburstSdk
index 5b81461..bd35b7f 100755
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
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
index 64a8f92..1eefd0d 100644
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
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json
index 1c4aa47..7f2690b 100644
--- a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json
+++ b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json
@@ -11781,63 +11781,63 @@
{
"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": "\"\""
},
@@ -11967,6 +11967,13 @@
"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",
@@ -11977,14 +11984,14 @@
{
"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\""
},
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeDirectory b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeDirectory
index 08a83a2..c5d3298 100644
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
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeResources b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeResources
index 0e22ab3..a744bc3 100644
--- a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeResources
+++ b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeResources
@@ -14,7 +14,7 @@
Frameworks/StarburstSdk.framework/StarburstSdk
- MkQukbCj7SCh2eyrtZPo6Bqdf4A=
+ 8Gs4sXssvRCJN21rU30a67r7N6o=
Frameworks/StarburstSdk.framework/_CodeSignature/CodeResources
@@ -26,11 +26,11 @@
Modules/DeepChordsSdk.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo
- O1x9BrZy7upg08bZqGU/Uc5etPM=
+ mEqZfVrzB53tawxpt2dNXLwsZqU=
Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json
- aUGMYXcXkccmHGwFIdGWAK/ssp4=
+ CsItm5OKF9/+ftWZEp8o3WqdIBg=
Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.private.swiftinterface
@@ -69,7 +69,7 @@
hash2
- xmw2ssE4+Oy+Ou293pFF8Wzmr6D0q15g35a8lDBSEbY=
+ 8ljyW9uNaE17fq+8E2zGO93awpOcEB3qVTJrxo/5UGU=
Frameworks/StarburstSdk.framework/_CodeSignature/CodeResources
@@ -83,14 +83,14 @@
hash2
- jY0Vz9dnHqg9VkabsBTOyHmRQCzHAQpzx8qEVoDsZWI=
+ 9kBR1SZb+wEMizfVxGSYHNFLnjf1D03QrkLGHSHZUAc=
Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.abi.json
hash2
- 7UkzEof8Cs5MlhqxmmMbpwo8Czj4WWOkV/I2+hOGnPw=
+ doBqFM+cZXnCY+J03piPHrTI6lqW1V89sbEslZp6zPg=
Modules/DeepChordsSdk.swiftmodule/arm64-apple-ios.private.swiftinterface
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeSignature b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/DeepChordsSdk/DeepChordsSdk.framework/_CodeSignature/CodeSignature
index 1e463c2..1158743 100644
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
diff --git a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/tools/DcSdkManager.swift b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/tools/DcSdkManager.swift
index fb0471b..c79057f 100644
--- a/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/tools/DcSdkManager.swift
+++ b/DeepChordsSdk_iOS/DeepChordsSdk/Example/Example/tools/DcSdkManager.swift
@@ -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/\350\261\206\345\214\205APP\350\207\252\345\256\232\344\271\211\345\215\217\350\256\256.txt" "b/DeepChordsSdk_iOS/document/\350\261\206\345\214\205APP\350\207\252\345\256\232\344\271\211\345\215\217\350\256\256.txt"
deleted file mode 100644
index c0f0508..0000000
--- "a/DeepChordsSdk_iOS/document/\350\261\206\345\214\205APP\350\207\252\345\256\232\344\271\211\345\215\217\350\256\256.txt"
+++ /dev/null
@@ -1,165 +0,0 @@
-
-UUID/AE30 AE03/WRITE_WITHOUT_RESPONSEÂ AE04/NOTIFYÂ
-
-
-
-BYTE0 :0xBA
-BYTE1 :CMD
-BYTE2 :DATA
-BYTE3:DATA_LEN
-BYTE4:CRC
-
-CRC:
-static u8 chargestore_crc8(u8 *ptr, u8 len)
-{
- u8 i, crc;
- crc = 0;
- while (len--) {
- crc ^= *ptr++;
- for (i = 0; i < 8; i++) {
- if (crc & 0x01) {
- crc = (crc >> 1) ^ 0x8c;
- } else {
- crc >>= 1;
- }
- }
- }
- return crc;
-}
-
-
-CMD:
-0x01 代表设置å¤ç¹è¿æ¥ DATA:0x00表示å
³éå¤ç¹è¿æ¥ 0x01表示æå¼å¤ç¹è¿æ¥
- ï¼ä¾ï¼APPä¸å 0xBA 0x01 0x01 0x01 CRC è³æºå¼å¯ç©ºé´é³é¢çåè½åå¤ 0xBA 0x01 0x01 0x01 CRCï¼
-0x02 代表è·åå¤ç¹è¿æ¥ DATA:0x00表示å
³éå¤ç¹è¿æ¥ 0x01表示æå¼å¤ç¹è¿æ¥
-ï¼ä¾ï¼APPä¸å 0xBA 0x02 0x00 0x00 CRC è³æºå¤ç¹è¿æ¥åè½å¼å¯çè¯åå¤ 0xBA 0x02 0x01 0x01 CRCï¼
-0x03 代表设置空é´é³é¢ DATA:0x00表示å
³é空é´é³é¢ 0x01表示æå¼ç©ºé´é³é¢
- ï¼ä¾ï¼APPä¸å 0xBA 0x03 0x01 0x01 CRC è³æºå¼å¯ç©ºé´é³é¢çåè½åå¤ 0xBA 0x03 0x01 0x01 CRCï¼
-0x04 代表è·å空é´é³é¢ DATA:0x00表示å
³é空é´é³é¢ 0x01表示æå¼ç©ºé´é³é¢
- ï¼ä¾ï¼APPä¸å 0xBA 0x04 0x00 0x00 CRC è³æºç©ºé´é³é¢åè½å¼å¯çè¯åå¤ 0xBA 0x04 0x01 0x01 CRCï¼
-
-0x05 代表è·å设å¤ID DATA:0x00 注:TWSæè¿æ¥è®°å½è¿åå·¦å³è³ TWSæªè¿æ¥è¿åªè¿ååè³å¦ä¸ä¸ªä¿¡æ¯é½ä¸º0XFF
- ï¼ä¾ï¼APPä¸å 0xBA 0x05 0x00 0x00 CRC è³æºåå¤è®¾å¤ID: 0xBA 0x05
-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ï¼
-
-0x06 å¼MIC(OPUSä¼ è¾) DATA:0x01ï¼é¢çå®ä¹è±å
AIï¼
- ï¼ä¾ï¼APPä¸å 0xBA 0x06 0x01 0x01 CRC è³æºåå¤è®¾å¤0xBA 0x06 0x01 0x01 CRCï¼
-
-
-0x07 å
³MIC(OPUSä¼ è¾) DATA:0x01ï¼é¢çå®ä¹è±å
AIï¼
- ï¼ä¾ï¼APPä¸å 0xBA 0x07 0x01 0x01 CRC è³æºåå¤è®¾å¤0xBA 0x07 0x01 0x01 CRCï¼
-0x08 è·å设å¤åç§°(UTF-8)
- ä¾ï¼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
-
-0x09 è·åçµé(å·¦è³/å³è³)
-ä¾ï¼APPä¸å 0xBA 0x09 0x00 0x00 CRC è³æºåå¤: 0xBA 0x09 0x00(å·¦è³) 0x64(100çµé) 0x01(å³è³) 0x64(100çµé) 0x04(æ°æ®é¿åº¦) CRC
-
-0x0A è·åè½¯ä»¶çæ¬ï¼ç¡¬ä»¶çæ¬
-ä¾ï¼APPä¸å 0xBA 0x0A 0x00(è½¯ä»¶çæ¬) 0x01 CRC è³æºåå¤:åè®¾è½¯ä»¶çæ¬(1.0.1) 0xBA 0x0A 0x49(1) 0x46(.) 0x48(0) 0x46(.) 0x49(1) 0x05(æ°æ®é¿åº¦) CRC
-ä¾ï¼APPä¸å 0xBA 0x0A 0x01(ç¡¬ä»¶çæ¬) 0x01 CRC è³æºåå¤:åè®¾ç¡¬ä»¶çæ¬(1.0.0) 0xBA 0x0A 0x49(1) 0x46(.) 0x48(0) 0x46(.) 0x48(0) 0x05(æ°æ®é¿åº¦) CRC
-0x0B æ¥æ¾è³æº(è³æºå£°é³ææ¾/忢ï¼
-ä¾ï¼APPä¸å 0xBA 0x0A 0x00(å
³éæ¥æ¾é³) 0x01 CRC è³æºåå¤:0xBA 0x0A 0x00(å
³éæ¥æ¾é³) 0x01 CRC
-ä¾ï¼APPä¸å 0xBA 0x0A 0x01(æå¼æ¥æ¾é³) 0x01 CRC è³æºåå¤:0xBA 0x0A 0x01(æå¼æ¥æ¾é³) 0x01 CRC
-0x0C 设置EQ
-
-
-ç¨æ·å¨APPè®¾ç½®è³æºæé®èªå®ä¹åè½
-BYTE0 :0x05
-BYTE1:DATA1
-BYTE2:DATA2
-BYTE3:DATA3
-BYTE1 :CMD
-BYTE4:CRC
-
-CRC:
-static u8 chargestore_crc8(u8 *ptr, u8 len)
-{
- u8 i, crc;
- crc = 0;
- while (len--) {
- crc ^= *ptr++;
- for (i = 0; i < 8; i++) {
- if (crc & 0x01) {
- crc = (crc >> 1) ^ 0x8c;
- } else {
- crc >>= 1;
- }
- }
- }
- return crc;
-}
-
-
-DATA1:
- Lift = 0x00
- Right = 0x01
-
-DATA2ï¼
- butten0 = 0x00
- butten1 = 0x01
- butten2 = 0x02
- butten3 = 0x03
- butten4 = 0x04
-
-
-DATA3:
-æé®æä½ç±»åå®ä¹ï¼
- KEY_ACTION_SINGLE_CLICK = 0x01 // åå»
- KEY_ACTION_LONG_PRESS = 0x02 // é¿æ
- KEY_ACTION_DOUBLE_CLICK = 0x03 // åå»
- KEY_ACTION_TRIPLE_CLICK = 0x04 // ä¸å»
-
-CMD:
-æé®åè½ç±»åå®ä¹ï¼
- KEY_TYPE_NONE = 0x00 // æ åè½
- KEY_TYPE_PREV = 0x03 // ä¸ä¸æ²
- KEY_TYPE_NEXT = 0x04 // ä¸ä¸æ²
- TYPE_PP = 0x05 // ææ¾/æå
- TYPE_ANSWER_CALL = 0x06 // æ¥å¬çµè¯
- KEY_TYPE_HANG_UP = 0x07 // ææçµè¯
- KEY_TYPE_CALL_BACK = 0x08 // 忍
- KEY_TYPE_INC_VOICE = 0x09 // é³éå¢å
- KEY_TYPE_DESC_VOICE = 0x0A // é³éåå°
- KEY_TYPE_TAKE_PHOTO = 0x0B // æç
§
- KEY_TYPE_SIRI = 0x0C // è¯é³å©æ
- KEY_TYPE_ANC_VOICE = 0xFF // ANC/éé
-
-ï¼ä¾ï¼è®¾ç½®å·¦è³çæé®1为å廿¯ææ¾åè½
- APPä¸å 0x05 0x00 0x01 0x01 0x05 CRC è³æºè®¾ç½®æåååå¤0x05 0x00 0x01 0x01 0x05 CRCï¼
-
-
-
-æé®æä¸å䏿¥éç¥ç»å°APP
-Button Notifications
-Notification ID: 0x7B
-Payload:
-Byte 0: JieLi button ID
-0: Earbuds power left or headset button #0
-1: Earbuds power right or headset button #1
-2ï¼headset button #2
-3ï¼headset button #3
-4ï¼headset button #4
-5ï¼headset button #5
-Byte 1: JieLi gesture ID
-0: Click
-1: Hold Up
-2: Double click
-3: Triple click
-Byte 2: JieLi command ID
-0: No action
-3: Previous
-4: Next
-5: Play/pause
-6: Take call
-7: End call
-9: Volume up
-10: Volume down
-11: Remote up
-12: Assistant toggle
-0xFF: ANC toggle
-
-
-
-
-
-
diff --git a/ShenYin/DeepChordsSdk/DCLogger.swift b/ShenYin/DeepChordsSdk/DCLogger.swift
index 84ddb6b..b609102 100644
--- a/ShenYin/DeepChordsSdk/DCLogger.swift
+++ b/ShenYin/DeepChordsSdk/DCLogger.swift
@@ -19,6 +19,9 @@ public class DCLogger {
public static var isDebug:Bool = false{
didSet{
// StarburstConfig.shared().isDebug = false
+ if isDebug {
+ DCLogger.debug("***********DeepChordsSdk_v2026111501***********")
+ }
}
}
diff --git a/ShenYin/ShenYin.xcodeproj/project.pbxproj b/ShenYin/ShenYin.xcodeproj/project.pbxproj
index f192505..1125f27 100644
--- a/ShenYin/ShenYin.xcodeproj/project.pbxproj
+++ b/ShenYin/ShenYin.xcodeproj/project.pbxproj
@@ -115,6 +115,7 @@
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,
@@ -139,6 +140,7 @@
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,
@@ -147,6 +149,7 @@
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,
diff --git a/ShenYin/ShenYin/Resource/colors/Colors+YL.swift b/ShenYin/ShenYin/Resource/colors/Colors+YL.swift
index d0dd774..514d988 100644
--- a/ShenYin/ShenYin/Resource/colors/Colors+YL.swift
+++ b/ShenYin/ShenYin/Resource/colors/Colors+YL.swift
@@ -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
index 0000000..89700a2
Binary files /dev/null and b/ShenYin/ShenYin/Resource/record_start_joy.gif differ
diff --git a/ShenYin/ShenYin/UI/Mode/ModeVC.swift b/ShenYin/ShenYin/Sdk/DcSdk/ModeVC.swift
similarity index 100%
rename from ShenYin/ShenYin/UI/Mode/ModeVC.swift
rename to ShenYin/ShenYin/Sdk/DcSdk/ModeVC.swift
diff --git a/ShenYin/ShenYin/Sdk/JoySdk/CCBleManager.swift b/ShenYin/ShenYin/Sdk/JoySdk/CCBleManager.swift
index a58e431..5bf1aa8 100644
--- a/ShenYin/ShenYin/Sdk/JoySdk/CCBleManager.swift
+++ b/ShenYin/ShenYin/Sdk/JoySdk/CCBleManager.swift
@@ -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
index 0000000..9e9fd95
--- /dev/null
+++ b/ShenYin/ShenYin/Sdk/JoySdk/HomeDeviceVC.swift
@@ -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
index 0000000..8a6f77b
--- /dev/null
+++ b/ShenYin/ShenYin/Sdk/JoySdk/ModeVC.swift
@@ -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())
+ }
+
+ }
+}
+
diff --git a/ShenYin/ShenYin/UI/Base/BaseTC.swift b/ShenYin/ShenYin/UI/Base/BaseTC.swift
index 9fc9031..0a09a25 100644
--- a/ShenYin/ShenYin/UI/Base/BaseTC.swift
+++ b/ShenYin/ShenYin/UI/Base/BaseTC.swift
@@ -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)
diff --git a/ShenYin/ShenYin/UI/Customer/CustomerHeaderView.swift b/ShenYin/ShenYin/UI/Customer/CustomerHeaderView.swift
index 26aff73..3fba650 100644
--- a/ShenYin/ShenYin/UI/Customer/CustomerHeaderView.swift
+++ b/ShenYin/ShenYin/UI/Customer/CustomerHeaderView.swift
@@ -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
diff --git a/ShenYin/ShenYin/UI/Home/Chinese2English/Chinese2EnglishCell.swift b/ShenYin/ShenYin/UI/Home/Chinese2English/Chinese2EnglishCell.swift
index 4cae225..61b671b 100644
--- a/ShenYin/ShenYin/UI/Home/Chinese2English/Chinese2EnglishCell.swift
+++ b/ShenYin/ShenYin/UI/Home/Chinese2English/Chinese2EnglishCell.swift
@@ -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()
}
diff --git a/ShenYin/ShenYin/UI/Home/Dialog/DialogTranslateCell.swift b/ShenYin/ShenYin/UI/Home/Dialog/DialogTranslateCell.swift
index 630fc36..a99d0b4 100644
--- a/ShenYin/ShenYin/UI/Home/Dialog/DialogTranslateCell.swift
+++ b/ShenYin/ShenYin/UI/Home/Dialog/DialogTranslateCell.swift
@@ -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()
}
diff --git a/ShenYin/ShenYin/UI/Home/FieldRecording/RhythView.swift b/ShenYin/ShenYin/UI/Home/FieldRecording/RhythView.swift
index 6d69e3b..3bbc1bb 100644
--- a/ShenYin/ShenYin/UI/Home/FieldRecording/RhythView.swift
+++ b/ShenYin/ShenYin/UI/Home/FieldRecording/RhythView.swift
@@ -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
diff --git a/ShenYin/ShenYin/UI/Home/HistoryRecord/RecordSearchBar.swift b/ShenYin/ShenYin/UI/Home/HistoryRecord/RecordSearchBar.swift
index d9b7049..07e80ac 100644
--- a/ShenYin/ShenYin/UI/Home/HistoryRecord/RecordSearchBar.swift
+++ b/ShenYin/ShenYin/UI/Home/HistoryRecord/RecordSearchBar.swift
@@ -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)
}
diff --git a/ShenYin/ShenYin/UI/Home/HistoryRecord/SelecteCell.swift b/ShenYin/ShenYin/UI/Home/HistoryRecord/SelecteCell.swift
index 7be2808..e32f48d 100644
--- a/ShenYin/ShenYin/UI/Home/HistoryRecord/SelecteCell.swift
+++ b/ShenYin/ShenYin/UI/Home/HistoryRecord/SelecteCell.swift
@@ -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)
}
}
diff --git a/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CloudSearchVC.swift b/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CloudSearchVC.swift
index e35574b..3f3f1ed 100644
--- a/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CloudSearchVC.swift
+++ b/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CloudSearchVC.swift
@@ -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
diff --git a/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/HistorySearchVC.swift b/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/HistorySearchVC.swift
index 8868885..248ff8c 100644
--- a/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/HistorySearchVC.swift
+++ b/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/HistorySearchVC.swift
@@ -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
diff --git a/ShenYin/ShenYin/UI/Home/RecordDetail/RecordDetailBar.swift b/ShenYin/ShenYin/UI/Home/RecordDetail/RecordDetailBar.swift
index d6edccb..15bdb49 100644
--- a/ShenYin/ShenYin/UI/Home/RecordDetail/RecordDetailBar.swift
+++ b/ShenYin/ShenYin/UI/Home/RecordDetail/RecordDetailBar.swift
@@ -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
diff --git a/ShenYin/ShenYin/UI/Home/Root/CurrentDeviceView.swift b/ShenYin/ShenYin/UI/Home/Root/CurrentDeviceView.swift
index 4c8c978..46d5ab9 100644
--- a/ShenYin/ShenYin/UI/Home/Root/CurrentDeviceView.swift
+++ b/ShenYin/ShenYin/UI/Home/Root/CurrentDeviceView.swift
@@ -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{
}
}
}
diff --git a/ShenYin/ShenYin/UI/Home/Root/HomeVC.swift b/ShenYin/ShenYin/UI/Home/Root/HomeVC.swift
index 0aa9df9..8a7b56a 100644
--- a/ShenYin/ShenYin/UI/Home/Root/HomeVC.swift
+++ b/ShenYin/ShenYin/UI/Home/Root/HomeVC.swift
@@ -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
}
}
diff --git a/ShenYin/ShenYin/UI/Home/TextTranslate/TranslateCell.swift b/ShenYin/ShenYin/UI/Home/TextTranslate/TranslateCell.swift
index 0a6fc6f..20ff75a 100644
--- a/ShenYin/ShenYin/UI/Home/TextTranslate/TranslateCell.swift
+++ b/ShenYin/ShenYin/UI/Home/TextTranslate/TranslateCell.swift
@@ -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)
}
}
diff --git a/ShenYin/ShenYin/UI/Login/Controller/Binding/VarifyBindingVC.swift b/ShenYin/ShenYin/UI/Login/Controller/Binding/VarifyBindingVC.swift
index 1ef3f7e..5c30da9 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/Binding/VarifyBindingVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/Binding/VarifyBindingVC.swift
@@ -70,6 +70,7 @@ extension VarifyBindingVC{
if model.isSuccess{
YLprogressHUD.hidden()
self?.codeView.codeButton.start()
+ self?.codeView.textField.becomeFirstResponder()
}
else{
YLprogressHUD.showAutoHiden(model.msg)
diff --git a/ShenYin/ShenYin/UI/Login/Controller/ForgetVC.swift b/ShenYin/ShenYin/UI/Login/Controller/ForgetVC.swift
index 162be85..b179510 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/ForgetVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/ForgetVC.swift
@@ -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)
diff --git a/ShenYin/ShenYin/UI/Login/Controller/LoginVC.swift b/ShenYin/ShenYin/UI/Login/Controller/LoginVC.swift
index 7dc2978..56ea674 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/LoginVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/LoginVC.swift
@@ -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()
diff --git a/ShenYin/ShenYin/UI/Login/Controller/RegisterVC.swift b/ShenYin/ShenYin/UI/Login/Controller/RegisterVC.swift
index 81db0ae..90b72b9 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/RegisterVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/RegisterVC.swift
@@ -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
index 4a31174..0000000
--- a/ShenYin/ShenYin/UI/Login/Controller/SetPasswordVC.swift
+++ /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
- }
- }
-}
diff --git a/ShenYin/ShenYin/UI/Login/Controller/SmsLoginVC.swift b/ShenYin/ShenYin/UI/Login/Controller/SmsLoginVC.swift
index 0fe6edd..eba23ca 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/SmsLoginVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/SmsLoginVC.swift
@@ -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{
diff --git a/ShenYin/ShenYin/UI/Login/Controller/VerifyCodeVC.swift b/ShenYin/ShenYin/UI/Login/Controller/VerifyCodeVC.swift
index 8061677..3febe93 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/VerifyCodeVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/VerifyCodeVC.swift
@@ -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{
diff --git a/ShenYin/ShenYin/UI/Login/Controller/VerifyEmailVC.swift b/ShenYin/ShenYin/UI/Login/Controller/VerifyEmailVC.swift
index d6b733c..1e73c65 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/VerifyEmailVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/VerifyEmailVC.swift
@@ -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{
diff --git a/ShenYin/ShenYin/UI/Login/Controller/VerifyPhoneVC.swift b/ShenYin/ShenYin/UI/Login/Controller/VerifyPhoneVC.swift
index b63ddcb..70b73c0 100644
--- a/ShenYin/ShenYin/UI/Login/Controller/VerifyPhoneVC.swift
+++ b/ShenYin/ShenYin/UI/Login/Controller/VerifyPhoneVC.swift
@@ -69,6 +69,7 @@ extension VerifyPhoneVC{
if model.isSuccess{
YLprogressHUD.hidden()
self?.codeView.codeButton.start()
+ self?.codeView.textField.becomeFirstResponder()
}
else{
YLprogressHUD.showAutoHiden(model.msg)
diff --git a/ShenYin/ShenYin/UI/Login/View/CodeView.swift b/ShenYin/ShenYin/UI/Login/View/CodeView.swift
index 596dacd..3b27f46 100644
--- a/ShenYin/ShenYin/UI/Login/View/CodeView.swift
+++ b/ShenYin/ShenYin/UI/Login/View/CodeView.swift
@@ -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)
diff --git a/ShenYin/ShenYin/UI/Login/View/CustomInputView.swift b/ShenYin/ShenYin/UI/Login/View/CustomInputView.swift
index da7090f..6561eeb 100644
--- a/ShenYin/ShenYin/UI/Login/View/CustomInputView.swift
+++ b/ShenYin/ShenYin/UI/Login/View/CustomInputView.swift
@@ -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
index 0000000..568198b
--- /dev/null
+++ b/ShenYin/ShenYin/UI/Login/View/LoginBgView.swift
@@ -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
index 0000000..36926a8
--- /dev/null
+++ b/ShenYin/ShenYin/UI/Login/View/LoginHeaderView.swift
@@ -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()
+ }
+ }
+ }
+}
diff --git a/ShenYin/ShenYin/UI/Login/View/PasswordView.swift b/ShenYin/ShenYin/UI/Login/View/PasswordView.swift
index 76926db..aa226cc 100644
--- a/ShenYin/ShenYin/UI/Login/View/PasswordView.swift
+++ b/ShenYin/ShenYin/UI/Login/View/PasswordView.swift
@@ -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])
diff --git a/ShenYin/ShenYin/UI/Login/View/RegionView.swift b/ShenYin/ShenYin/UI/Login/View/RegionView.swift
index 9a3805e..38a89e5 100644
--- a/ShenYin/ShenYin/UI/Login/View/RegionView.swift
+++ b/ShenYin/ShenYin/UI/Login/View/RegionView.swift
@@ -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))
diff --git a/ShenYin/ShenYin/UI/Mine/RevokeCodeVC.swift b/ShenYin/ShenYin/UI/Mine/RevokeCodeVC.swift
index 4092862..4b06c6f 100644
--- a/ShenYin/ShenYin/UI/Mine/RevokeCodeVC.swift
+++ b/ShenYin/ShenYin/UI/Mine/RevokeCodeVC.swift
@@ -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{
diff --git a/ShenYin/ShenYin/UI/Mode/FindVC.swift b/ShenYin/ShenYin/UI/Mode/FindVC.swift
index 6899ec8..11b0c5f 100644
--- a/ShenYin/ShenYin/UI/Mode/FindVC.swift
+++ b/ShenYin/ShenYin/UI/Mode/FindVC.swift
@@ -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])
diff --git a/ShenYin/ShenYin/UI/Mode/ModeEffectsView.swift b/ShenYin/ShenYin/UI/Mode/ModeEffectsView.swift
index 2641460..9675ff2 100644
--- a/ShenYin/ShenYin/UI/Mode/ModeEffectsView.swift
+++ b/ShenYin/ShenYin/UI/Mode/ModeEffectsView.swift
@@ -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
diff --git a/ShenYin/ShenYin/UI/Mode/ModeFindView.swift b/ShenYin/ShenYin/UI/Mode/ModeFindView.swift
index 2984c22..a50b3b0 100644
--- a/ShenYin/ShenYin/UI/Mode/ModeFindView.swift
+++ b/ShenYin/ShenYin/UI/Mode/ModeFindView.swift
@@ -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)
diff --git a/ShenYin/ShenYin/UI/common/BrokenLineView.swift b/ShenYin/ShenYin/UI/common/BrokenLineView.swift
index 1724801..58febd3 100644
--- a/ShenYin/ShenYin/UI/common/BrokenLineView.swift
+++ b/ShenYin/ShenYin/UI/common/BrokenLineView.swift
@@ -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)]
diff --git a/ShenYin/ShenYin/UI/common/CustomButton.swift b/ShenYin/ShenYin/UI/common/CustomButton.swift
index e4f08a9..91c3c9f 100644
--- a/ShenYin/ShenYin/UI/common/CustomButton.swift
+++ b/ShenYin/ShenYin/UI/common/CustomButton.swift
@@ -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
+ }
}
}
diff --git a/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift b/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift
index 5411bf4..e5777d2 100644
--- a/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift
+++ b/ShenYin/ShenYin/UI/common/pop/CustomPicker.swift
@@ -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)
}
}
diff --git a/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift b/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift
index 6f2231e..d72f852 100644
--- a/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift
+++ b/ShenYin/ShenYin/UI/common/pop/LanguagePicker/LanguagePickerView.swift
@@ -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)
}
}