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); } }) |

这个问题那么说的那么明显了 老哥怎么解决ios打不开txt文件的
具体是什么问题?麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
docx 格式
xls 格式
xlsx 格式
ppt 格式
pptx 格式
pdf 格式
以上这些格式,在ios上能正常打开,txt、jpg格式的再iOS上下载成功,但是打开失败:文件类型不支持。
所谓 "失败" 太过粗略了,不是一个合格的问题,帖出报错吧。