问题现象:
解决方案:
1、用h5+方法清理
h5+地址:HTML5+ API Reference
废话不多说上代码
/*** 清除应用角标(支持iOS和Android)* 使用H5+方法清理推送角标*/clearAppBadge() {// #ifdef APP-PLUStry {plus.runtime.setBadgeNumber(0);plus.push.clear();} catch (error) {console.error('❌ 清除应用角标失败:', error);}// #endif}
在app的onShow调用这个方法即可
plus.runtime.setBadgeNumber(0); 清空角标
plus.push.clear(); 清空所有推送消息