ソースを参照

[fit]修改极光回调的操作

云天逵 7 ヶ月 前
コミット
5e114d6a9b
1 ファイル変更5 行追加3 行削除
  1. 5 3
      lib/sdk/jpush/jpush_helper.dart

+ 5 - 3
lib/sdk/jpush/jpush_helper.dart

@@ -31,6 +31,11 @@ class JpushHelper {
       _jpush.addEventHandler(
         onReceiveNotification: (Map<String, dynamic> message) async {
           AtmobLog.d(tag, "flutter onReceiveNotification: $message");
+
+
+        },
+        onOpenNotification: (Map<String, dynamic> message) async {
+          AtmobLog.d(tag, "flutter onOpenNotification: $message");
           if (Get.isRegistered<MainController>() &&
               Get.currentRoute != RoutePath.newDiscount) {
             NewDiscountPage.start();
@@ -38,9 +43,6 @@ class JpushHelper {
           //清除应用图标角标数量
           _jpush.setBadge(-1);
         },
-        onOpenNotification: (Map<String, dynamic> message) async {
-          AtmobLog.d(tag, "flutter onOpenNotification: $message");
-        },
         onReceiveMessage: (Map<String, dynamic> message) async {
           AtmobLog.d(tag, "flutter onReceiveMessage: $message");
         },