**首先获取用户权限 **
getUserSetting(isVideo, downLOadPath) {
wx.showLoading({
title: '加载中...',
mask: true,
});
let that = this
wx.getSetting({
success(res) {
if (res.authSetting['scope.writePhotosAlbum'] === undefined) {
wx.authorize({
scope: 'scope.writePhotosAlbum',
success() {
console.log('打开了授权')
that.downloadSaveFile(isVideo, downLOadPath)
},
fail() {
wx.showToast({
title: '授权失败',
icon: 'none'
});
}
})
} else if (!res.authSetting['scope.writePhotosAlbum']) {
wx.openSetting({
success(res) {
// console.log(res)
if (res.authSetting['scope.writePhotosAlbum']) {
console.log('授权了')
that.downloa