/**
- 角标增长
- @param {String} key 键值
-
@param {Number} step 增长值
*/
BadgeManager.setInc = function(key, step){var key = "badge_"+key;
var total_number = plus.storage.getItem("badge_total_number");
var key_number = plus.storage.getItem(key);total_number = parseInt(total_number); // 字符串转数字
key_number = parseInt(key_number);
if(!key_number) key_number = 0;
if(!total_number) total_number = 0;
key_number = key_number + step;
total_number = total_number + step;// console.log('badge_total_number',key_number)
plus.storage.setItem(key, key_number.toString()); // 数字转字符串
plus.storage.setItem("badge_total_number", total_number.toString());// console.log('total_number',total_number)
// 设置APP图标的角标
// console.log( plus.runtime)
plus.runtime.setBadgeNumber(total_number);
}
成都H5 (作者)
到现在也没有解决
2022-01-20 00:32
1***@qq.com
回复 成都H5: 平台的人说没有荣耀手机,就没有后续了。
2022-01-20 15:07
1***@qq.com
估计放假了吧
2022-01-20 15:07