- 定义了一个数组,在控制台打印出来却是个对象类型
[图片]
2022-09-14 - wx.getFuzzyLocation 后台权限申请通过了 ?
该弄的都按照文档上弄了,但是还是显示没权限是什么鬼 [图片][图片]
2022-07-14 - IOS wx.downloadFile 下载视频 报错 的问题 ?
在安卓机上下载30个视频毫无压力 ,但是同样的代码在IOS 手机一直报 errMsg: "downloadFile:fail'savefile: fail the maximum size of the file storage limit is exceeded" [图片] // 下载素材 handleDownload() { let _this = this; _this.getSetting(function (e) { if (e) { if (_this.data.disabled) { _this.setData({ disabled: false }) } let list = _this.data.list; let listVide = []; let file_ids=[]; for (let index = 0; index < list.data.length; index++) { if (list.data[index].checked) { listVide.push(list.data[index].video) file_ids.push( list.data[index].file_id) } } if (listVide.length<=0) { wx.showModal({ title: '提示', content: '请选择视频~', showCancel: false, }) _this.setData({ disabled: true }) return false } wx.showLoading({ title: '下载中', }) let videos=function(){ for (let a = 0; a < list.data.length; a++) { list.data[a].checked=false; } _this.setData({ list }); _this.saveVideo(file_ids); } let indexVide = 0; for (let i = 0; i < listVide.length; i++) { let fileName = new Date().valueOf(); wx.downloadFile({ url: listVide[i], filePath: wx.env.USER_DATA_PATH + '/' + fileName + i + '.mp4', success: res => { let filePath = res.filePath; wx.saveVideoToPhotosAlbum({ filePath, success: file => { indexVide++; let fileMgr = wx.getFileSystemManager(); fileMgr.unlink({ filePath: wx.env.USER_DATA_PATH + '/' + fileName + i + '.mp4', success: function (r) { }, }) if (indexVide > listVide.length-1) { wx.hideLoading() wx.showToast({ title: '视频下载完成', icon: 'success', duration: 2000, success(){ videos() _this.setData({ disabled:true }) } }) } }, fail: err => { wx.hideLoading() if (err.errMsg === 'saveVideoToPhotosAlbum:fail auth deny') { wx.showModal({ title: '提示', content: '需要您授权保存相册', showCancel: false, success: data => { wx.openSetting({ success(settingdata) { if (settingdata.authSetting['scope.writePhotosAlbum']) { wx.showModal({ title: '提示', content: '获取权限成功,再次点击下载即可保存', showCancel: false, }) } else { wx.showModal({ title: '提示', content: '获取权限失败,将无法保存到相册哦~', showCancel: false, }) } }, }) } }) } } }) } }) } } })
2022-03-31 - wx.getUserProfile is not a function ?
微信开发者工具跟基础库都是最高版本了,但是还是会有报错;开发工具是1.05版 基础库是2.16.1[图片]
2021-04-25