一直显示文件找不到,我人都吐了。
uni.getFileSystemManager().readFile({
filePath: wx.env.USER_DATA_PATH + "/pm.json",
success: function(res){
console.log(res);
},
fail: function(err){
console.log("失败");
console.log(err);
},
})
文件放在src根目录下目前,wx.env.USER_DATA_PATH指代的到底是哪个目录也不清楚,文档也不写详细点,我真是一肚子怨气
这个是读取本地目录不是项目目录,还有