chooseMessageAFile:fail api scope is not declared in the privacy agreement
时间: 2023-12-05 11:38:18 浏览: 186
Scope(作用域).md
chooseMessageAFile:fail api scope is not declared in the privacy agreement是因为小程序没有在隐私协议中声明该api的使用权限。需要在小程序管理后台的设置-隐私设置中添加该api的使用权限。
代码示例:
```javascript
wx.showModal({
title: '提示',
content: '请前往设置-隐私设置中打开chooseMessageAFile权限',
success: function (res) {
if (res.confirm) {
wx.openSetting({
success: function (res) {
console.log(res.authSetting)
}
})
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
```
相关问题:
阅读全文