App权限判断和提示 - DCloud 插件市场

下载链接:

https://ext.dcloud.net.cn/plugin?id=594

引入:

import permision from "@/js_sdk/wa-permission/permission.js"

使用:

switch (uni.getSystemInfoSync().platform) {

case 'android':

permision.requestAndroidPermission("android.permission.RECORD_AUDIO")

permision.requestAndroidPermission("android.permission.CAMERA")

break;

case 'ios':

permision.judgeIosPermission("record")

permision.judgeIosPermission("camera")

break;

}

作者:安徒生1997
链接:file:///home/lenix/%E6%96%87%E6%A1%A3/uni-app%20%E6%89%93%E5%BC%80%E6%89%8B%E6%9C%BA%E6%9D%83%E9%99%90%20-%20%E7%AE%80%E4%B9%A6.html
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

uni-app 打开手机权限 摄像头,麦克风权限弹窗提示
标签: