wx.saveFile读取文件时错误?
ReadFromFile:function (params) {
let fsm = wx.getFileSystemManager();
console.log(wx.env.USER_DATA_PATH),
wx.saveFile({
tempFilePath: wx.env.USER_DATA_PATH + "/Crsmini.txt",
success(res) {
fsm.readFile({
filePath:res.savedFilePath,
encoding: 'utf8',
success:function(res){
console.log(res.data) }
})
},
fail: res => {
console.info(res)}
})
- 这里是读取保存的文本问题,提示错误 {errMsg: "saveFile:fail tempFilePath file not exist"}
- errMsg: "saveFile:fail tempFilePath file not exist"
- __proto__: Object