wx.getPrivacySetting is not a function
时间: 2024-01-09 21:06:05 浏览: 93
微信小程序报错:this.setData is not a function的解决办法
`wx.getPrivacySetting` is not a valid function in WeChat Mini Program API. The correct function is `wx.getSetting`. The `wx.getSetting` function is used to asynchronously get the user's authorization status for a specific scope. It takes an object parameter with a `success` callback function to handle the result. Here's an example usage:
```javascript
wx.getSetting({
success(res) {
console.log(res.authSetting);
// res.authSetting = {
// "scope.userInfo": true,
// "scope.userLocation": true
// }
}
});
```
Make sure to use the correct function name and check the WeChat Mini Program documentation for further details on its usage.
阅读全文