From 0116d920214dc12355430a347beca14623b6d493 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 31 Oct 2025 23:17:04 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=99=E6=94=AF=E6=8C=81=E8=A7=92?= =?UTF-8?q?=E6=A0=87=E7=9A=84Android=E8=AE=BE=E5=A4=87=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=92=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/UmengAlias.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Models/UmengAlias.php b/app/Models/UmengAlias.php index c169377f7..fddce90c9 100644 --- a/app/Models/UmengAlias.php +++ b/app/Models/UmengAlias.php @@ -153,7 +153,7 @@ class UmengAlias extends AbstractModel $description = $array['description'] ?: 'no description'; // 描述 $extra = is_array($array['extra']) ? $array['extra'] : []; // 额外参数 $seconds = intval($array['seconds']) ?: 86400; // 有效时间(单位:秒) - $badge = intval($array['badge']) ?: 0; // 角标数(iOS) + $badge = intval($array['badge']) ?: 0; // 角标数 // switch ($platform) { case 'ios': @@ -203,6 +203,7 @@ class UmengAlias extends AbstractModel 'title' => $title, 'after_open' => 'go_app', 'play_sound' => true, + 'set_badge' => min(99, $badge), ], ], $extra), 'type' => 'customizedcast', @@ -215,12 +216,17 @@ class UmengAlias extends AbstractModel ], 'category' => 1, 'channel_properties' => [ + 'main_activity' => 'com.dootask.task.WelcomeActivity', 'oppo_channel_id' => 'dootask', 'vivo_category' => 'IM', 'huawei_channel_importance' => 'NORMAL', 'huawei_channel_category' => 'IM', 'channel_fcm' => 0, ], + 'local_properties' => [ + 'importance' => 'IMPORTANCE_DEFAULT', + 'category' => 'CATEGORY_MESSAGE', + ] ] ]); break;