wx.openDocument打开txt文件,在安卓下成功打开,在ios下失败?
[代码]const FileSystemManager = wx.getFileSystemManager();[代码][代码] [代码][代码]var[代码] [代码]filePath = `${wx.env.USER_DATA_PATH}/test.txt`;[代码][代码] [代码][代码]console.log([代码][代码]'filePath:'[代码][代码], filePath);[代码][代码] [代码][代码]FileSystemManager.writeFileSync(filePath, ’hello world~~‘, [代码][代码]'utf8'[代码][代码]);[代码][代码] [代码][代码]const temp = FileSystemManager.readFileSync(filePath, [代码][代码]'utf8'[代码][代码]);[代码][代码] [代码][代码]console.log([代码][代码]"文件内容:"[代码][代码], temp);[代码][代码] [代码][代码]wx.openDocument({[代码][代码] [代码][代码]filePath: filePath,[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"打开文档成功"[代码][代码], res);[代码][代码] [代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]console.log([代码][代码]"打开文档失败"[代码][代码], res);[代码][代码] [代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码]