From fc583059fbf2eb0629a68de625bb6f8c006d1767 Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Fri, 6 Aug 2021 10:21:38 +0800 Subject: [PATCH] update jpush --- lib/provider/user_provider.dart | 6 ++++-- pubspec.lock | 10 ++++------ pubspec.yaml | 4 +--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/lib/provider/user_provider.dart b/lib/provider/user_provider.dart index 84143736..3534e596 100644 --- a/lib/provider/user_provider.dart +++ b/lib/provider/user_provider.dart @@ -38,8 +38,10 @@ class UserProvider extends ChangeNotifier { await updateProfile(); await updateUserDetail(); await appProvider.updateHouses(await HouseFunc.passedHouses); - WebSocketUtil().setUser(userInfoModel!.id.toString()); - WebSocketUtil().startWebSocket(); + if (isLogin) { + WebSocketUtil().setUser(userInfoModel!.id.toString()); + WebSocketUtil().startWebSocket(); + } notifyListeners(); } catch (e) { LoggerData.addData(e); diff --git a/pubspec.lock b/pubspec.lock index b294dc77..7f870081 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -628,12 +628,10 @@ packages: jpush_flutter: dependency: "direct main" description: - path: "." - ref: HEAD - resolved-ref: cbe804fd2389255be02729abbfd07deb6c468951 - url: "https://git.oa00.com/flutter_third/jpush-flutter-plugin" - source: git - version: "2.0.1" + name: jpush_flutter + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.5" js: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 7716330a..33f24ca1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -77,9 +77,7 @@ dependencies: #评分组件 flutter_rating_bar: ^4.0.0 #极光推送 - jpush_flutter: - git: - url: https://git.oa00.com/flutter_third/jpush-flutter-plugin + jpush_flutter: ^2.1.5 #打开文件 open_file: ^3.2.1 #角标