更新记录
1.0.2(2023-04-23) 下载此版本
优化代码
1.0.1(2023-04-23) 下载此版本
更新插件包
1.0.0(2023-04-23) 下载此版本
1.0.0上线
查看更多平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | √ | - | - | √ | √ | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
× | × | × | × | × | × | - | × | × | × | × |
使用说明
<template>
<view class="content">
<button @click="checkVersion">当前通知权限状态:{{isNotifications}}</button>
</view>
</template>
<script>
import {
isNotificationsEnabled,
permissions
} from '@/js_sdk/AS-NotifyTheAuthority/index.js'
export default {
data() {
return {
// 通知权限是否已开启
isNotifications: false
}
},
onShow() {
this.isNotifications = isNotificationsEnabled()
},
methods: {
// 前往系统设置的功能
checkVersion() {
permissions(!this.isNotifications)
}
}
}
</script>