wx.getSetting一直失败体验版正常,线上不正常,非常的离谱。
export const getSetting = () => {
return new Promise((resolve, reject) => {
wx.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success() {
resolve();
},
fail() {
reject();
}
});
} else {
resolve();
}
},
fail() {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success() {
resolve();
},
fail() {
reject();
}
});
}
});
});
};
你好,打印下看看具体是什么错误呢?
请问你的问题解决了吗?我也有同样的问题!