提交 eb7c8a05 编写于 作者: taohebin@dcloud.io's avatar taohebin@dcloud.io

update: 创建通知时,增加通知权限的判断。

上级 0252135c
......@@ -33,6 +33,7 @@
console.log("channels : " + manager.getAllChannels());
},
handleCreateLocalNotification() {
if(uni.getAppAuthorizeSetting().notificationAuthorized == "authorized"){
uni.createPushMessage({
title: "halo",
content: "world",
......@@ -52,6 +53,12 @@
console.log("fail :" + e);
}
})
}else{
uni.showToast({
title:"请在设置中开启通知权限",
icon:"error"
})
}
},
handleGetClientId() {
uni.getPushClientId({
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册