From 03a309d8ee707d2565950e261a5dd58c4cecb3ff Mon Sep 17 00:00:00 2001 From: yangjiejie12308 <38904385+yangjiejie12308@users.noreply.github.com> Date: Thu, 13 Jul 2023 17:25:37 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=85=81=E8=AE=B8UID=20=E4=B8=BA?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cim-flutter-sdk/.flutter-plugins-dependencies | 2 +- cim-client-sdk/cim-flutter-sdk/CHANGELOG.md | 4 ++-- cim-client-sdk/cim-flutter-sdk/README.md | 4 ++-- cim-client-sdk/cim-flutter-sdk/example/lib/main.dart | 2 +- cim-client-sdk/cim-flutter-sdk/example/pubspec.lock | 2 +- cim-client-sdk/cim-flutter-sdk/lib/cim_socket.dart | 6 +++--- cim-client-sdk/cim-flutter-sdk/pubspec.yaml | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cim-client-sdk/cim-flutter-sdk/.flutter-plugins-dependencies b/cim-client-sdk/cim-flutter-sdk/.flutter-plugins-dependencies index 7529ebd..1975384 100644 --- a/cim-client-sdk/cim-flutter-sdk/.flutter-plugins-dependencies +++ b/cim-client-sdk/cim-flutter-sdk/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]}],"date_created":"2023-07-07 10:37:13.109602","version":"3.7.7"} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"android":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":true,"dependencies":[]}],"linux":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","native_build":false,"dependencies":[]}],"web":[{"name":"device_info_plus","path":"C:\\\\Users\\\\smeb\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\device_info_plus-8.2.2\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"device_info_plus","dependencies":[]}],"date_created":"2023-07-13 17:24:04.445236","version":"3.7.7"} \ No newline at end of file diff --git a/cim-client-sdk/cim-flutter-sdk/CHANGELOG.md b/cim-client-sdk/cim-flutter-sdk/CHANGELOG.md index bc44140..a0b0b55 100644 --- a/cim-client-sdk/cim-flutter-sdk/CHANGELOG.md +++ b/cim-client-sdk/cim-flutter-sdk/CHANGELOG.md @@ -1,3 +1,3 @@ -## 1.0.3 +## 1.0.4 -* 修复重复收到消息的BUG +* 允许链接到服务器的UID为字符串 diff --git a/cim-client-sdk/cim-flutter-sdk/README.md b/cim-client-sdk/cim-flutter-sdk/README.md index 1fe0048..5adc045 100644 --- a/cim-client-sdk/cim-flutter-sdk/README.md +++ b/cim-client-sdk/cim-flutter-sdk/README.md @@ -9,7 +9,7 @@ ``` dependencies: - cim_flutter_sdk: ^1.0.3 + cim_flutter_sdk: ^1.0.4 ``` @@ -37,7 +37,7 @@ import 'package:cim_flutter_sdk/cim_socket.dart'; connectStatus = value; }); }); - cimSocket!.init('127.0.0.1', 34567, 16501516154949); + cimSocket!.init('127.0.0.1', 34567, '16501516154949'); cimSocket!.connect(); } ... diff --git a/cim-client-sdk/cim-flutter-sdk/example/lib/main.dart b/cim-client-sdk/cim-flutter-sdk/example/lib/main.dart index 6562fee..a67cbba 100644 --- a/cim-client-sdk/cim-flutter-sdk/example/lib/main.dart +++ b/cim-client-sdk/cim-flutter-sdk/example/lib/main.dart @@ -34,7 +34,7 @@ class _MyAppState extends State { connectStatus = value; }); }); - cimSocket!.init('api.hoxin.farsunset.com', 34567, 16501516154949); + cimSocket!.init('api.hoxin.farsunset.com', 34567, '16501516154949'); cimSocket!.connect(); } diff --git a/cim-client-sdk/cim-flutter-sdk/example/pubspec.lock b/cim-client-sdk/cim-flutter-sdk/example/pubspec.lock index 849852f..93b0b7e 100644 --- a/cim-client-sdk/cim-flutter-sdk/example/pubspec.lock +++ b/cim-client-sdk/cim-flutter-sdk/example/pubspec.lock @@ -31,7 +31,7 @@ packages: path: ".." relative: true source: path - version: "1.0.3" + version: "1.0.4" clock: dependency: transitive description: diff --git a/cim-client-sdk/cim-flutter-sdk/lib/cim_socket.dart b/cim-client-sdk/cim-flutter-sdk/lib/cim_socket.dart index 48b9eef..1df90c0 100644 --- a/cim-client-sdk/cim-flutter-sdk/lib/cim_socket.dart +++ b/cim-client-sdk/cim-flutter-sdk/lib/cim_socket.dart @@ -46,7 +46,7 @@ class CIMSocket { late Socket? socket; late String? uri; late int? port; - late int? uid; + late String? uid; late String endCode = "0"; final DeviceInfoPlugin deviceInfoPlugin = DeviceInfoPlugin(); final ValueChanged onMessageReceived; @@ -59,7 +59,7 @@ class CIMSocket { } }); - Future init(String uri, int port, int uid) async { + Future init(String uri, int port, String uid) async { this.uri = uri; this.port = port; this.uid = uid; @@ -132,7 +132,7 @@ class CIMSocket { md5.convert(const Utf8Encoder().convert(systemInfo.deviceId)).bytes); Map map = { - "uid": uid.toString(), //主id + "uid": uid!, //主id "channel": channel, "appVersion": sOCKETAPPVERSION, "osVersion": systemVersion, diff --git a/cim-client-sdk/cim-flutter-sdk/pubspec.yaml b/cim-client-sdk/cim-flutter-sdk/pubspec.yaml index 0af8d38..84e37f7 100644 --- a/cim-client-sdk/cim-flutter-sdk/pubspec.yaml +++ b/cim-client-sdk/cim-flutter-sdk/pubspec.yaml @@ -1,7 +1,7 @@ name: cim_flutter_sdk description: a flutter sdk for cim. repository: https://gitee.com/farsunset/cim -version: 1.0.3 +version: 1.0.4 homepage: http://farsunset.com/ environment: