- getSavedFileList查不到saveFile指定了filePath的文件?
saveimagefile里没指定filePath saveimagefile2里指定了filePath 结果:在getsavefiles里能查到saveimagefile保存的文件,查不到saveimagefile2保存的文件。 saveimagefile(e){ let that = this; var fsm = wx.getFileSystemManager(); fsm.saveFile({ tempFilePath: that.data.outpath, success(rs){ that.setData({ savefilepath: rs.savedFilePath }); } }); }, saveimagefile2(e){ let that = this; let userdatapath = wx.env.USER_DATA_PATH; console.log("userdatapath=",userdatapath); let savepath = userdatapath + "/123.jpg"; var fsm = wx.getFileSystemManager(); fsm.saveFile({ tempFilePath: that.data.outpath, filePath: savepath, success(rs){ that.setData({ savefilepath: rs.savedFilePath }); } }); }, getsavefiles(e){ let that = this; var fsm = wx.getFileSystemManager(); fsm.getSavedFileList({ success(res){ let flist = res.fileList; var str = ""; for(var i=0;i<flist.length;i++){ str = str+ flist[i].filePath+"\n"; } console.log(str); that.setData({themsg: str}); } }); },
2022-08-22 - 信息资讯 这个太广了,搞个菜谱也说是属于这个?
信息资讯 这个太广了,放个什么都能属于信息资讯,搞个菜谱也说属于这个。
2022-08-21