From: liangzhenying <867174124@qq.com> Date: Sat, 17 Jan 2026 01:59:19 +0000 (+0800) Subject: 眼镜版替换UI X-Git-Tag: mix-v1.0~6 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=113e9536fe13c03cb94b91b75cc8040119031720;p=mirrors%2FShenYin.git 眼镜版替换UI --- diff --git a/ShenYin/ShenYin.xcodeproj/project.pbxproj b/ShenYin/ShenYin.xcodeproj/project.pbxproj index 208261a..c75d6f9 100644 --- a/ShenYin/ShenYin.xcodeproj/project.pbxproj +++ b/ShenYin/ShenYin.xcodeproj/project.pbxproj @@ -19,8 +19,8 @@ 3FFB77C22F179F3100EF9A60 /* DeepChordsSdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 0D54E0EF2F0A61E600A80EE7 /* DeepChordsSdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 644D1BB5EDD3EA1D77C57786 /* Pods_DeepChordsSdk.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 248D8B53B5A178ACA5867275 /* Pods_DeepChordsSdk.framework */; }; 7A6613B4B617D6E71D34944C /* Pods_ShenYin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 90FF0C8B0D4D6AE0933FA672 /* Pods_ShenYin.framework */; }; - 817510A595D00CAD05E3772C /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; - F2E449CAD5874BE652A69B50 /* BuildFile in Frameworks */ = {isa = PBXBuildFile; }; + 817510A595D00CAD05E3772C /* (null) in Frameworks */ = {isa = PBXBuildFile; }; + F2E449CAD5874BE652A69B50 /* (null) in Frameworks */ = {isa = PBXBuildFile; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -88,7 +88,6 @@ 3F8F58282EBCA2B800FFC00B /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 3FD1A2912F0BC9D800A62733 /* JLAudioUnitKit.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = JLAudioUnitKit.xcframework; path = framework/JLAudioUnitKit.xcframework; sourceTree = ""; }; 3FD1DFF42F0E00BF00A62733 /* playboy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = playboy.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 3FFB818B2F18912400EF9A60 /* playboy copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "playboy copy-Info.plist"; path = "/Users/yaozuopan/Documents/code/ShenYin/ShenYin/playboy copy-Info.plist"; sourceTree = ""; }; 5A92F7DC2CB6E6E69D2AB23E /* Pods-DeepChordsSdk.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-DeepChordsSdk.debug.xcconfig"; path = "Target Support Files/Pods-DeepChordsSdk/Pods-DeepChordsSdk.debug.xcconfig"; sourceTree = ""; }; 5F5DE5910965D53C2B3405B0 /* Pods-ShenYin.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ShenYin.debug.xcconfig"; path = "Target Support Files/Pods-ShenYin/Pods-ShenYin.debug.xcconfig"; sourceTree = ""; }; 90FF0C8B0D4D6AE0933FA672 /* Pods_ShenYin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ShenYin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -104,8 +103,10 @@ 3F887BAE2E38D8DD00C98658 /* Exceptions for "ShenYin" folder in "ShenYin" target */ = { isa = PBXFileSystemSynchronizedBuildFileExceptionSet; membershipExceptions = ( + Info.plist, playboy.storyboard, playboy.xcassets, + Sdk/CCDevice.swift, Sdk/JoySdk/JoyCallRecord.swift, Sdk/JoySdk/JoyChat.swift, Sdk/JoySdk/JoyChinse2English.swift, @@ -131,6 +132,7 @@ "/Localized: LaunchScreen.storyboard", Assets.xcassets, Info.plist, + Sdk/JoySdk/CCDevice.swift, Sdk/JoySdk/JoyCallRecord.swift, Sdk/JoySdk/JoyChat.swift, Sdk/JoySdk/JoyChinse2English.swift, @@ -159,8 +161,11 @@ /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet section */ - 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" build phase */ = { + 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */ = { isa = PBXFileSystemSynchronizedGroupBuildPhaseMembershipExceptionSet; + attributesByRelativePath = { + StarburstSdk.framework = (CodeSignOnCopy, RemoveHeadersOnCopy, ); + }; buildPhase = 3FFB77C52F17A11100EF9A60 /* Embed Frameworks */; membershipExceptions = ( StarburstSdk.framework, @@ -172,7 +177,7 @@ 0D54E0F02F0A61E600A80EE7 /* DeepChordsSdk */ = { isa = PBXFileSystemSynchronizedRootGroup; exceptions = ( - 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" build phase */, + 3FFB77C62F17A11100EF9A60 /* Exceptions for "DeepChordsSdk" folder in "Embed Frameworks" phase from "DeepChordsSdk" target */, 3FFB77C82F17A14C00EF9A60 /* Exceptions for "DeepChordsSdk" folder in "playboy" target */, ); path = DeepChordsSdk; @@ -203,7 +208,7 @@ buildActionMask = 2147483647; files = ( 3F469CB12F0B539600121DBD /* DeepChordsSdk.framework in Frameworks */, - F2E449CAD5874BE652A69B50 /* BuildFile in Frameworks */, + F2E449CAD5874BE652A69B50 /* (null) in Frameworks */, 3FD1A2952F0BCACB00A62733 /* JLAudioUnitKit.xcframework in Frameworks */, 7A6613B4B617D6E71D34944C /* Pods_ShenYin.framework in Frameworks */, ); @@ -215,7 +220,7 @@ files = ( 3FD1DFEB2F0E00BF00A62733 /* JLAudioUnitKit.xcframework in Frameworks */, 3FFB77C12F179F3100EF9A60 /* DeepChordsSdk.framework in Frameworks */, - 817510A595D00CAD05E3772C /* BuildFile in Frameworks */, + 817510A595D00CAD05E3772C /* (null) in Frameworks */, 30B13DEF1AA0E4C54D873276 /* Pods_playboy.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -250,7 +255,6 @@ 3F887B9D2E38D8DC00C98658 /* Products */, 34A14A83ECF09370871C891F /* Pods */, 676B86A4BA2639E8694D56B4 /* Frameworks */, - 3FFB818B2F18912400EF9A60 /* playboy copy-Info.plist */, ); sourceTree = ""; }; @@ -464,10 +468,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-playboy/Pods-playboy-frameworks.sh\"\n"; @@ -503,10 +511,14 @@ inputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); + inputPaths = ( + ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( "${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); + outputPaths = ( + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ShenYin/Pods-ShenYin-frameworks.sh\"\n"; diff --git a/ShenYin/ShenYin/Sdk/JoySdk/CCDevice.swift b/ShenYin/ShenYin/Sdk/JoySdk/CCDevice.swift new file mode 100644 index 0000000..c008fd7 --- /dev/null +++ b/ShenYin/ShenYin/Sdk/JoySdk/CCDevice.swift @@ -0,0 +1,268 @@ +// +// Device.swift +// ShenYin +// +// Created by liangshi on 2025/12/25. +// +import JoyGemAI +import DeepChordsSdk +class CCDevice{ + static var isJoy = true + static func initSdk(){ + if CCDevice.isJoy { + JoySdkManager.shared.setupSdk() + } + else{ + DcSdkManager.shared.initSdk() + } + } + static func translate(text:String,from:String,to:String,finished:@escaping ((stream:String,finish:Bool)?)->Void){ + if isJoy { + JoyGemAIManager.shared().cancelTranslateRequest() + JoyGemAIManager.shared().translate(text, from: from, to: to) { result, finish in + finished((result,finish)) + } error: { error in + finished(nil) + } + } + else{ + DCText.cancelTranslateByTextWithSplit() + DCText.translate(text: text, from: from, to: to) { result in + finished(result) + } + } + } + static func summary(text:String,finished:@escaping ((stream:String,finish:Bool)?)->Void){ + if isJoy { + JoyGemAIManager.shared().cancelSummaryRequest() + JoyGemAIManager.shared().summary(text) { text, finish in + finished((text,finish)) + } error: { error in + finished(nil) + } + } + else{ + DCText.cancelSummaryByTextWithSplit() + DCText.sumary(text: text) { result in + finished(result) + } + } + } +} +extension CCDevice{ + static func findHeadphone(_ mode:FindType){ + if CCDevice.isJoy { + var value:JoyGemFindHeadphoneMode = .all + switch mode { + case .left: + value = .left + case .right: + value = .right + case .cancel: + value = .cancel + case .all: + value = .all + } + JoyGemAIManager.shared().device.findHeadphone(value) { err in + Logger.debug("findHeadphone:\(err)"); + } + } + else{ + let value:UInt8 = mode == .cancel ? 0:1 + DCDevice.shared.findDevice(state: value) { result in + } + } + } + static func getEQMode(finished:@escaping (ModeEffectsType?)->Void){ + if CCDevice.isJoy { + JoyGemAIManager.shared().device.getEQMode { mode in + var value:ModeEffectsType = .normal + switch mode { + case .normal: + value = .normal + case .pop: + value = .pop + case .classic: + value = .classic + case .rock: + value = .rock + case .jazz: + value = .jazz + case .custom: + value = .custom + } + finished(value) + } error: { err in + Logger.debug("getEQMode:\(err)"); + finished(nil) + } + } + else{ + /// type, 0x00(正常模式) + // 0x01(流行) + // 0x02(经典) + // 0x03(爵士) + // 0x04(摇滚) + // 0x05(自定义) + DCDevice.shared.getEQ { (arg0,result) in + guard let (type,list) = arg0 else{ + finished(nil) + return + } + switch type{ + case 0: + finished(.normal) + case 1: + finished(.pop) + case 2: + finished(.classic) + case 3: + finished(.jazz) + case 4: + finished(.rock) + case 5: + finished(.custom) + default: + finished(nil) + } + } + } + } + static func setEQMode(_ type:ModeEffectsType){ + if CCDevice.isJoy { + var value:JoyGemEQMode = .normal + switch type { + case .normal: + value = .normal + case .pop: + value = .pop + case .classic: + value = .classic + case .rock: + value = .rock + case .jazz: + value = .jazz + case .custom: + value = .custom + } + + JoyGemAIManager.shared().device.setEQMode(value) { err in + Logger.debug("setEQMode:\(err)"); + } + }else{ + let value:UInt8 = UInt8(type.rawValue) + DCDevice.shared.setEQ(type: value) { success in + + } + } + } + + + static func getCustomEQ(finished:@escaping ([NSNumber]?)->Void){ + if CCDevice.isJoy { + JoyGemAIManager.shared().device.getCustomEQ { eq in + Logger.debug("getCustomEQ:\(eq)"); + finished(eq.bands) + } error: { err in + Logger.debug("getCustomEQ:\(err)"); + finished(nil) + } + } + else{ + DCDevice.shared.getEQ { (arg0,result) in + guard let (type,list) = arg0 else{ + finished(nil) + return + } + if type == 5{ + let nums = list.map { NSNumber(value: $0) } + finished(nums) + } + else{ + finished(nil) + } + } + } + } + static func resetCustomEQ(){ + if CCDevice.isJoy { + JoyGemAIManager.shared().device.resetCustomEQ { err in + Logger.debug("resetCustomEQ:\(err)"); + } + } + else{ + let list = [ + 0,0,0,0,0,0,0,0,0,0,0,0 + ] + let dispatchGroup = DispatchGroup() + for (index,item) in list.enumerated() { + dispatchGroup.enter() + DCDevice.shared.setCustomEQ(index: UInt8(index), value: item) {result in + dispatchGroup.leave() + } + } + dispatchGroup.notify(queue:.main) { + DCDevice.shared.setEQ(type: 0x05) {result in + } + } + } + } + static func setCustomEQ(index:Int,value:Int){ + if CCDevice.isJoy { + JoyGemAIManager.shared().device.setCustomEQ(UInt(index), withGain: value) { err in + Logger.debug("setCustomEQ:\(err)"); + } + } + else{ + DCDevice.shared.setCustomEQ(index: UInt8(index), value: value) {result in + } + } + } +} +extension CCDevice{ +// static func getMac(finished:@escaping ((_ mac:String?)->Void)) { +// if CCDevice.isJoy { +// JoyGemAIManager.shared().device.macAddress { edr, ble in +// Logger.debug("edr:\(edr),ble:\(ble)"); +// finished(edr.uppercased()) +// } error: { error in +// Logger.debug("\(error!.localizedDescription)") +// finished(nil) +// } +// } +// else{ +//// DCDevice.shared.getSoftVersion {result in +//// finished(result) +//// } +// } +// } + static func getDN(finished:@escaping ((_ mac:String?)->Void)) { + if CCDevice.isJoy { + JoyGemAIManager.shared().device.getDN { deviceName in + finished(deviceName) + } error: { error in + Logger.debug("获取dn失败","\(error!.localizedDescription)") + finished(nil) + } + } + else{ + let dn = DCText.getDeviceName() + finished(dn) + } + } + static func getVersion(finished:@escaping ((_ version:String?)->Void)) { + if CCDevice.isJoy { + JoyGemAIManager.shared().device.software { version in + finished(version) + } error: { error in + Logger.debug("\(error!.localizedDescription)"); + finished(nil) + } + } + else{ + DCDevice.shared.getSoftVersion {result in + finished(result) + } + } + } +} diff --git a/ShenYin/ShenYin/UI/Login/View/AgreeView.swift b/ShenYin/ShenYin/UI/Login/View/AgreeView.swift index 2446173..19065bc 100644 --- a/ShenYin/ShenYin/UI/Login/View/AgreeView.swift +++ b/ShenYin/ShenYin/UI/Login/View/AgreeView.swift @@ -63,7 +63,7 @@ class AgreeView: BaseView { m.centerY.equalTo(agreeBtn) } agreeValue.snp.makeConstraints { (m) in - m.left.equalTo(agreeTitle.snp.right) + m.left.equalTo(agreeTitle.snp.right).offset(2) m.centerY.equalTo(agreeBtn) } andlabel.snp.makeConstraints { (m) in diff --git a/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/20260117-094528.png b/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/20260117-094528.png new file mode 100644 index 0000000..e2cb37f Binary files /dev/null and b/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/20260117-094528.png differ diff --git a/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/Contents.json b/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/Contents.json index 3cbe57f..c38f7bd 100644 --- a/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/Contents.json +++ b/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "server_qr.png", + "filename" : "20260117-094528.png", "idiom" : "universal", "scale" : "1x" }, diff --git a/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/server_qr.png b/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/server_qr.png deleted file mode 100644 index a06461f..0000000 Binary files a/ShenYin/ShenYin/playboy.xcassets/customer/server_qr.imageset/server_qr.png and /dev/null differ diff --git a/ShenYin/playboy copy-Info.plist b/ShenYin/playboy copy-Info.plist deleted file mode 100644 index 82a0f3a..0000000 --- a/ShenYin/playboy copy-Info.plist +++ /dev/null @@ -1,55 +0,0 @@ - - - - - CFBundleURLTypes - - - CFBundleTypeRole - Editor - CFBundleURLName - weixin - CFBundleURLSchemes - - wxf19317f23b00d8ab - - - - LSApplicationQueriesSchemes - - weixin - weixinURLParamsAPI - weixinULAPI - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - UISceneConfigurations - - UIWindowSceneSessionRoleApplication - - - UISceneConfigurationName - Default Configuration - UISceneDelegateClassName - $(PRODUCT_MODULE_NAME).SceneDelegate - UISceneStoryboardFile - Main - - - - - UIBackgroundModes - - bluetooth-peripheral - bluetooth-central - audio - - -