diff --git a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift index 3d6c25e73..86ac66bb9 100644 --- a/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift +++ b/local_plugins/azure_speech/ios/azure_speech/Sources/azure_speech/AzureTtsHelper.swift @@ -166,7 +166,7 @@ public class AzureTtsHelper: NSObject, ITtsService { let currentText = streamBuffer // 标点符号列表 (与Android一致) - let punctuationMarks: [Character] = [".", "。", "!", "!", "?", "?", ";", ";", ",", ",", ":", ":", "\n"] + let punctuationMarks: [Character] = [".", "。", "!", "!","*", "?", "?", ";", ";", ",", ",", ":", ":", "\n"] // 从后往前查找最后一个标点符号 var lastPunctuationIndex = -1 diff --git a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift index bcacf4eb5..e55b3c15f 100644 --- a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift +++ b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/SystemFunctionHandler.swift @@ -462,8 +462,7 @@ private class GetCurrentLocationHandler: FunctionHandler { guard let latStr = locationInfo["user_lat"] as? String, let lngStr = locationInfo["user_lng"] as? String, let latitude = Double(latStr), - let longitude = Double(lngStr), - let address = locationInfo["user_location"] as? String else { + let longitude = Double(lngStr) else { print("[GetCurrentLocationHandler] 位置数据格式错误") continuation.resume(returning: self.createErrorResponse(message: "位置数据格式错误,请重试")) return @@ -471,8 +470,8 @@ private class GetCurrentLocationHandler: FunctionHandler { print("[GetCurrentLocationHandler] 位置获取成功: lat=\(latitude), lng=\(longitude)") - let message = "当前位置:\(address)(纬度 \(latitude),经度 \(longitude))" - let successResponse = self.createSuccessResponse(message: message, latitude: latitude, longitude: longitude, address: address) + // let message = "当前位置:\(address)(纬度 \(latitude),经度 \(longitude))" + let successResponse = self.createSuccessResponse(latitude: latitude, longitude: longitude) print("[GetCurrentLocationHandler] 返回位置结果") continuation.resume(returning: successResponse) @@ -486,14 +485,12 @@ private class GetCurrentLocationHandler: FunctionHandler { } } - private func createSuccessResponse(message: String, latitude: Double, longitude: Double, address: String) -> String { + private func createSuccessResponse(latitude: Double, longitude: Double) -> String { let result: [String: Any] = [ "success": true, - "message": message, "data": [ "latitude": latitude, "longitude": longitude, - "address": address, "timestamp": Date().timeIntervalSince1970 * 1000 ] ] diff --git a/local_plugins/location_service/ios/location_service/Sources/location_service/LocationData.swift b/local_plugins/location_service/ios/location_service/Sources/location_service/LocationData.swift index af7f9827c..4701388b1 100644 --- a/local_plugins/location_service/ios/location_service/Sources/location_service/LocationData.swift +++ b/local_plugins/location_service/ios/location_service/Sources/location_service/LocationData.swift @@ -4,13 +4,11 @@ import Foundation public struct LocationData: Codable { public let latitude: Double public let longitude: Double - public let address: String public let timestamp: TimeInterval - public init(latitude: Double, longitude: Double, address: String, timestamp: TimeInterval) { + public init(latitude: Double, longitude: Double,timestamp: TimeInterval) { self.latitude = latitude self.longitude = longitude - self.address = address self.timestamp = timestamp } } diff --git a/local_plugins/location_service/ios/location_service/Sources/location_service/LocationService.swift b/local_plugins/location_service/ios/location_service/Sources/location_service/LocationService.swift index 2312b1fc4..bc682d13e 100644 --- a/local_plugins/location_service/ios/location_service/Sources/location_service/LocationService.swift +++ b/local_plugins/location_service/ios/location_service/Sources/location_service/LocationService.swift @@ -190,11 +190,11 @@ public class LocationService: NSObject { } // 使用缓存的状态信息 - print("[LocationService] 开始位置请求") - print("[LocationService] 缓存的权限状态: \(self.authorizationStatus.rawValue)") - print("[LocationService] 缓存的位置服务状态: \(self.isLocationServicesEnabled)") - print("[LocationService] 当前线程: \(Thread.current)") - print("[LocationService] 是否主线程: \(Thread.isMainThread)") + // print("[LocationService] 开始位置请求") + // print("[LocationService] 缓存的权限状态: \(self.authorizationStatus.rawValue)") + // print("[LocationService] 缓存的位置服务状态: \(self.isLocationServicesEnabled)") + // print("[LocationService] 当前线程: \(Thread.current)") + // print("[LocationService] 是否主线程: \(Thread.isMainThread)") // 验证权限状态 if !self.checkLocationPermission() { @@ -238,7 +238,6 @@ public class LocationService: NSObject { let locationData = LocationData( latitude: latitude, longitude: longitude, - address: "", timestamp: Date().timeIntervalSince1970 * 1000 ) completion(.success(locationData)) @@ -273,7 +272,6 @@ public class LocationService: NSObject { return [ "user_lat": String(locationData.latitude), "user_lng": String(locationData.longitude), - "user_location": locationData.address, "timestamp": locationData.timestamp ] } diff --git a/pubspec.yaml b/pubspec.yaml index d59266ff8..ed31e55ad 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -55,7 +55,7 @@ dependencies: uuid: ^4.3.3 record: ^5.2.1 share_plus: ^11.0.0 - image_picker: ^1.1.2 + image_picker: ^1.1. audio_waveforms: ^1.3.0 font_awesome_flutter: ^10.8.0 lottie: ^3.3.1