From: liangzhenying <867174124@qq.com> Date: Wed, 28 Jan 2026 04:04:40 +0000 (+0800) Subject: 北科AI接入完成,上到testflight X-Git-Tag: RaisoundVad~1^2 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=9bbd1c283e79913c5abd74961999ae7e407e1c56;p=mirrors%2FShenYin.git 北科AI接入完成,上到testflight --- diff --git a/ShenYin/ShenYin.xcodeproj/project.pbxproj b/ShenYin/ShenYin.xcodeproj/project.pbxproj index a691cf7..3c2cf08 100644 --- a/ShenYin/ShenYin.xcodeproj/project.pbxproj +++ b/ShenYin/ShenYin.xcodeproj/project.pbxproj @@ -95,6 +95,7 @@ Sdk/CCDevice.swift, Sdk/CCPage.swift, Sdk/DcSdk/tool/CCBleManager.swift, + Sdk/DcSdk/tool/CCConfig.swift, Sdk/DcSdk/tool/CCDevice.swift, Sdk/DcSdk/tool/CCPage.swift, Sdk/DcSdk/tool/DcCall.swift, @@ -146,6 +147,7 @@ Sdk/CCDevice.swift, Sdk/CCPage.swift, Sdk/JoySdk/tool/CCBleManager.swift, + Sdk/JoySdk/tool/CCConfig.swift, Sdk/JoySdk/tool/CCDevice.swift, Sdk/JoySdk/tool/CCPage.swift, Sdk/JoySdk/tool/JoyCallRecord.swift, @@ -744,7 +746,7 @@ CODE_SIGN_ENTITLEMENTS = ShenYin/ShenYin.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1004; + CURRENT_PROJECT_VERSION = 100040; DEVELOPMENT_TEAM = G23X75CJ67; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -800,7 +802,7 @@ CODE_SIGN_ENTITLEMENTS = ShenYin/ShenYin.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1004; + CURRENT_PROJECT_VERSION = 100040; DEVELOPMENT_TEAM = G23X75CJ67; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", diff --git a/ShenYin/ShenYin/Api/HttpClient.swift b/ShenYin/ShenYin/Api/HttpClient.swift index b433f16..1187a97 100644 --- a/ShenYin/ShenYin/Api/HttpClient.swift +++ b/ShenYin/ShenYin/Api/HttpClient.swift @@ -135,7 +135,7 @@ extension CommomApi{ // http://118.145.178.188:32000/uc/country/list // return "https://app-api.deepchords.com" // return "http://118.145.178.188:32000" - return DCConfig.baseURL + return CCConfig.baseURL } var url:String{ @@ -194,9 +194,9 @@ extension CommomApi{ case .storageSize: return "/res/voice-file/storage-size" case .musicCategory: - return "/res/music-category/list?languageCode=\(DCConfig.appLanguage.lanCode)" + return "/res/music-category/list?languageCode=\(CCConfig.appLanguage.lanCode)" case .musicCategoryList(let categoryId,let page): - return "/res/sleep-music/list/\(page)?categoryId=\(categoryId)&languageCode=\(DCConfig.appLanguage.lanCode)" + return "/res/sleep-music/list/\(page)?categoryId=\(categoryId)&languageCode=\(CCConfig.appLanguage.lanCode)" case .musicUrl( let id): return "/res/music-file/path/\(id)" case .recordUrl( let id): @@ -207,13 +207,13 @@ extension CommomApi{ case .uploadVoiceFile(_): return "/res/voice-file/upload" case .getProductList: - return "/dev/product/list?name=&languageCode=\(DCConfig.appLanguage.lanCode)" + return "/dev/product/list?name=&languageCode=\(CCConfig.appLanguage.lanCode)" case .productBook(let productId): - return "/res/prod-book-file?productId=\(productId)&languageCode=\(DCConfig.appLanguage.lanCode)" + return "/res/prod-book-file?productId=\(productId)&languageCode=\(CCConfig.appLanguage.lanCode)" case .qaCategory: - return "/uc/qa-category/list?&languageCode=\(DCConfig.appLanguage.lanCode)" + return "/uc/qa-category/list?&languageCode=\(CCConfig.appLanguage.lanCode)" case .qaList(let categoryId,let page): - return "/uc/qa/list/\(page)?categoryId=\(categoryId)&languageCode=\(DCConfig.appLanguage.lanCode)" + return "/uc/qa/list/\(page)?categoryId=\(categoryId)&languageCode=\(CCConfig.appLanguage.lanCode)" case .commitFeedback(_): return "/uc/feedback" @@ -336,7 +336,7 @@ extension CommomApi{ break case let .productInfo(name): params["prodName"] = name - params["languageCode"] = DCConfig.appLanguage.lanCode + params["languageCode"] = CCConfig.appLanguage.lanCode break case let .bindDevice(para): params += para diff --git a/ShenYin/ShenYin/Launch/AppLaunch.swift b/ShenYin/ShenYin/Launch/AppLaunch.swift index f535ed1..6f207af 100644 --- a/ShenYin/ShenYin/Launch/AppLaunch.swift +++ b/ShenYin/ShenYin/Launch/AppLaunch.swift @@ -11,7 +11,7 @@ class AppLaunch:NSObject{ @MainActor static func start(){ // NFX.sharedInstance().start() - DCConfig.appLanguage = LanuageCache.get() + CCConfig.appLanguage = LanuageCache.get() IASignWithWeChat.shared.register() diff --git a/ShenYin/ShenYin/Sdk/DcSdk/tool/CCBleManager.swift b/ShenYin/ShenYin/Sdk/DcSdk/tool/CCBleManager.swift index 9b5bc75..b388c31 100644 --- a/ShenYin/ShenYin/Sdk/DcSdk/tool/CCBleManager.swift +++ b/ShenYin/ShenYin/Sdk/DcSdk/tool/CCBleManager.swift @@ -71,7 +71,7 @@ extension CCBleManager:CBCentralManagerDelegate{ } Logger.debug(peripheral) - if let mac = DcSdkManager.getMac(advertisementData),mac.count == 17 { + if let mac = DcSdkManager.getMac(advertisementData) { devices.append(DCPeripheral(device: peripheral,mac: mac)) discoverDeviceCallback?(devices) } diff --git a/ShenYin/ShenYin/Sdk/CCConfig.swift b/ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift similarity index 61% rename from ShenYin/ShenYin/Sdk/CCConfig.swift rename to ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift index 04bda40..fb06aa7 100644 --- a/ShenYin/ShenYin/Sdk/CCConfig.swift +++ b/ShenYin/ShenYin/Sdk/DcSdk/tool/CCConfig.swift @@ -1,49 +1,47 @@ // -// Config.swift +// CCConfig.swift // ShenYin // -// Created by liangshi on 2025/10/15. +// Created by liangshi on 2026/1/28. // -class DCConfig{ - static var appLanguage = AppSupportLanguage.english - - static let wxAppID = "wxd9d677e0024caa90" - static let wxUniversalLink = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/app/" - /// 通用链接 -// https://dc-cloud-pub.tos-cn-guangzhou.volces.com/apple-app-site-association - static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8" - /// 版本检测 - static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504" - - /// 服务器地址 -// static let baseURL = "http://118.145.178.188:32000" - static let baseURL = "https://app-api.deepchords.com" - //海外版 -// static let baseURL = "https://app-api.deepchords-ai.com" - - /// 用户隐私协议地址 - static let yonghuBaseURL = "https://pub-tos.deepchords.com" -} - - - -// -//class DCConfig{ +//class CCConfig{ // static var appLanguage = AppSupportLanguage.english // // static let wxAppID = "wxd9d677e0024caa90" // static let wxUniversalLink = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/app/" -// /// 通用链接 -// // https://dc-cloud-pub.tos-cn-guangzhou.volces.com/apple-app-site-association // static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8" // /// 版本检测 // static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504" // // /// 服务器地址 -// static let baseURL = "https://app-api.keqianggx.com" +// // static let baseURL = "http://118.145.178.188:32000" +// static let baseURL = "https://app-api.deepchords.com" +// //海外版 +// // static let baseURL = "https://app-api.deepchords-ai.com" // // /// 用户隐私协议地址 // static let yonghuBaseURL = "https://pub-tos.deepchords.com" -// //} +// +// + + +class CCConfig{ + static var appLanguage = AppSupportLanguage.english + + static let wxAppID = "wxd9d677e0024caa90" + static let wxUniversalLink = "https://www.playboykq.com/app/" + /// 通用链接 + // https://dc-cloud-pub.tos-cn-guangzhou.volces.com/apple-app-site-association + static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8" + /// 版本检测 + static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504" + + /// 服务器地址 + static let baseURL = "https://app-api.playboykq.com" + + /// 用户隐私协议地址 + static let yonghuBaseURL = "https://pub-tos.deepchords.com" + +} diff --git a/ShenYin/ShenYin/Sdk/DcSdk/tool/DcSdkManager.swift b/ShenYin/ShenYin/Sdk/DcSdk/tool/DcSdkManager.swift index 29c38c4..a9b6ec1 100644 --- a/ShenYin/ShenYin/Sdk/DcSdk/tool/DcSdkManager.swift +++ b/ShenYin/ShenYin/Sdk/DcSdk/tool/DcSdkManager.swift @@ -112,7 +112,10 @@ extension DcSdkManager{ let text = mac.map { String($0, radix: 16).padLeft(toLength: 2, withPad: "0") }.joined(separator: ":").uppercased() Logger.debug(dict) Logger.debug(advMsd) - Logger.debug(mac) + Logger.debug("mac地址",mac) + if mac.count > 20{ + return "" + } Logger.debug(text) return text } else { diff --git a/ShenYin/ShenYin/Sdk/JoySdk/tool/CCConfig.swift b/ShenYin/ShenYin/Sdk/JoySdk/tool/CCConfig.swift new file mode 100644 index 0000000..50c2c00 --- /dev/null +++ b/ShenYin/ShenYin/Sdk/JoySdk/tool/CCConfig.swift @@ -0,0 +1,25 @@ +// +// Config.swift +// ShenYin +// +// Created by liangshi on 2025/10/15. +// + +class CCConfig{ + static var appLanguage = AppSupportLanguage.english + + static let wxAppID = "wxd9d677e0024caa90" + static let wxUniversalLink = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/app/" + static let appStoreLink = "https://itunes.apple.com/cn/app/6752551504?mt=8" + /// 版本检测 + static let appStoreVersionURL = "https://itunes.apple.com/cn/lookup?id=6752551504" + + /// 服务器地址 +// static let baseURL = "http://118.145.178.188:32000" + static let baseURL = "https://app-api.deepchords.com" + //海外版 +// static let baseURL = "https://app-api.deepchords-ai.com" + + /// 用户隐私协议地址 + static let yonghuBaseURL = "https://pub-tos.deepchords.com" +} diff --git a/ShenYin/ShenYin/Sdk/LogManager.swift b/ShenYin/ShenYin/Sdk/LogManager.swift index f61e054..8735333 100644 --- a/ShenYin/ShenYin/Sdk/LogManager.swift +++ b/ShenYin/ShenYin/Sdk/LogManager.swift @@ -9,7 +9,7 @@ import Foundation /// 日记管理 class Logger { - static var isDebug: Bool = false + static var isDebug: Bool = true fileprivate static let shared = Logger() private var fileHandle:FileHandle? diff --git a/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CalendarPickerVC.swift b/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CalendarPickerVC.swift index 5e94d11..1258a15 100644 --- a/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CalendarPickerVC.swift +++ b/ShenYin/ShenYin/UI/Home/HistoryRecord/VC/CalendarPickerVC.swift @@ -40,7 +40,7 @@ class CalendarPickerVC: BaseVC { }() var isChinese:Bool{ - return (DCConfig.appLanguage == .chinse || DCConfig.appLanguage == .chinse) + return (CCConfig.appLanguage == .chinse || CCConfig.appLanguage == .chinse) } override func viewDidLoad() { super.viewDidLoad() diff --git a/ShenYin/ShenYin/UI/Login/ViewModel/IASignWithWeChat.swift b/ShenYin/ShenYin/UI/Login/ViewModel/IASignWithWeChat.swift index 8d65cfd..9065646 100644 --- a/ShenYin/ShenYin/UI/Login/ViewModel/IASignWithWeChat.swift +++ b/ShenYin/ShenYin/UI/Login/ViewModel/IASignWithWeChat.swift @@ -18,7 +18,7 @@ class IASignWithWeChat:NSObject { WXApi.startLog(by: .detail) { log in Logger.debug(log) } - WXApi.registerApp(DCConfig.wxAppID, universalLink: DCConfig.wxUniversalLink) + WXApi.registerApp(CCConfig.wxAppID, universalLink: CCConfig.wxUniversalLink) // WXApi.checkUniversalLinkReady { step, result in // Logger.debug("step = ",step) // Logger.debug("result success = \(result.success),errorInfo = \(result.errorInfo),suggestion = \(result.suggestion)") diff --git a/ShenYin/ShenYin/UI/Mine/LanguageVC.swift b/ShenYin/ShenYin/UI/Mine/LanguageVC.swift index edb9d3b..5ef482d 100644 --- a/ShenYin/ShenYin/UI/Mine/LanguageVC.swift +++ b/ShenYin/ShenYin/UI/Mine/LanguageVC.swift @@ -59,13 +59,13 @@ extension LanguageVC:UITableViewDelegate,UITableViewDataSource { else{ cell.bgView.yc.setCorners(withRoundedRect: rect, roundingCorners: [.allCorners], cornerRadii: CGSize(width: 0, height: 0)) } - cell.selectedIcon.isHidden = list[indexPath.row] != DCConfig.appLanguage + cell.selectedIcon.isHidden = list[indexPath.row] != CCConfig.appLanguage return cell } func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let lan = list[indexPath.row] - DCConfig.appLanguage = lan - LanuageCache.save(lan: DCConfig.appLanguage) + CCConfig.appLanguage = lan + LanuageCache.save(lan: CCConfig.appLanguage) App.shared.didLogin() App.shared.tabController?.selectedIndex = 4 App.shared.goToPage(LanguageVC()) diff --git a/ShenYin/ShenYin/UI/Mine/ProtocolVC.swift b/ShenYin/ShenYin/UI/Mine/ProtocolVC.swift index fa494cb..2d31386 100644 --- a/ShenYin/ShenYin/UI/Mine/ProtocolVC.swift +++ b/ShenYin/ShenYin/UI/Mine/ProtocolVC.swift @@ -64,9 +64,9 @@ final class FileDownloadVC: BaseVC { } override func setupData() { - let lan = DCConfig.appLanguage.yonghuCode + let lan = CCConfig.appLanguage.yonghuCode // let fileUrl = "https://dc-cloud-pub.tos-cn-guangzhou.volces.com/protocol/\(lan)/\(type.rawValue).pdf" - let fileUrl = DCConfig.yonghuBaseURL + "/protocol/\(lan)/\(type.rawValue).pdf" + let fileUrl = CCConfig.yonghuBaseURL + "/protocol/\(lan)/\(type.rawValue).pdf" self.dowmload(url:fileUrl) } diff --git a/ShenYin/ShenYin/UI/Mine/Update/AppUpdateVM.swift b/ShenYin/ShenYin/UI/Mine/Update/AppUpdateVM.swift index 0c65f99..7a82dee 100644 --- a/ShenYin/ShenYin/UI/Mine/Update/AppUpdateVM.swift +++ b/ShenYin/ShenYin/UI/Mine/Update/AppUpdateVM.swift @@ -39,7 +39,7 @@ class AppUpdateVM:BaseVM{ CustomAlert.showWith(title: nil, messgage: "检测到新版本,是否前往更新".l10n) { } okCallback: { - guard let url = DCConfig.appStoreLink.yc.asUrl else{ + guard let url = CCConfig.appStoreLink.yc.asUrl else{ return } UIApplication.shared.open(url) @@ -48,7 +48,7 @@ class AppUpdateVM:BaseVM{ } func forceUpdate(){ CustomAlert.showWith(title: nil, messgage: "检测到新版本".l10n, ok: "前往更新".l10n,cancelCallback: nil) { - guard let url = DCConfig.appStoreLink.yc.asUrl else{ + guard let url = CCConfig.appStoreLink.yc.asUrl else{ return } UIApplication.shared.open(url, options: [:], completionHandler: {_ in diff --git a/ShenYin/ShenYin/UI/Raisound/RSApi.swift b/ShenYin/ShenYin/UI/Raisound/RSApi.swift index dc3b69c..8e27e88 100644 --- a/ShenYin/ShenYin/UI/Raisound/RSApi.swift +++ b/ShenYin/ShenYin/UI/Raisound/RSApi.swift @@ -5,7 +5,7 @@ // Created by liangshi on 2026/1/26. // -//8FFDCB2185D5、8FFDCB2185D7、8FFDCB2185D8、8FFDCB2185D9 +// import Foundation import HandyJSON diff --git a/ShenYin/ShenYin/UI/Raisound/RSManager.swift b/ShenYin/ShenYin/UI/Raisound/RSManager.swift index df1c74f..9c73899 100644 --- a/ShenYin/ShenYin/UI/Raisound/RSManager.swift +++ b/ShenYin/ShenYin/UI/Raisound/RSManager.swift @@ -7,7 +7,10 @@ class RSManager{ static let shared = RSManager() - let deviceId = "8FFDCB2185D5" +// 8FFDCB2185D5、testflihgt +// 8FFDCB2185D7、目前 +// 8FFDCB2185D8、8FFDCB2185D9 还未使用 + let deviceId = "8FFDCB2185D7" var chat:MSVoiceChat = MSVoiceChat() func start(){ diff --git a/ShenYin/ShenYin/lan/LanConfig.swift b/ShenYin/ShenYin/lan/LanConfig.swift index 64e052d..0b98a7a 100644 --- a/ShenYin/ShenYin/lan/LanConfig.swift +++ b/ShenYin/ShenYin/lan/LanConfig.swift @@ -179,10 +179,10 @@ enum AppSupportLanguage{ extension String{ var l10n:String{ - if DCConfig.appLanguage == .chinse{ + if CCConfig.appLanguage == .chinse{ return self } - if let value = DCConfig.appLanguage.map[self] { + if let value = CCConfig.appLanguage.map[self] { return value } else{