uni.removeTabBarBadge

cyl/master-0804
zsk 3 months ago
parent efeddbee76
commit 375cc0fd53

@ -283,9 +283,13 @@ export default {
text: String(res.approvePassHasNotRed), text: String(res.approvePassHasNotRed),
}); });
} else { } else {
try {
uni.removeTabBarBadge({ uni.removeTabBarBadge({
index: 2, index: 2,
}); });
} catch (error) {
console.log("当前页面不是 TabBar 页面,无法移除 badge");
}
} }
}); });
} }

@ -764,9 +764,13 @@ export default {
}); });
that.readed = false; that.readed = false;
} else { } else {
try {
uni.removeTabBarBadge({ uni.removeTabBarBadge({
index: 2, index: 2,
}); });
} catch (error) {
console.log("当前页面不是 TabBar 页面,无法移除 badge");
}
that.readed = true; that.readed = true;
} }
}); });

Loading…
Cancel
Save