DC_Karenloar
DC_Karenloar
  • 发布:2024-10-15 11:46
  • 更新:2024-12-06 16:26
  • 阅读:464

wx.getFileSystemManager().readFile报错

分类:uni-app
wx.getFileSystemManager().readFile({  
    filePath: e,  
    encoding: "base64",  
    success: function(e) {  
        t("data:image/png;base64," + e.data)  
    },  
    fail: function(e) {  
        n(e)  
    }  
});

将本地图片路径转换为base64格式。
解析本地地址“/static/logo.png”时,报错“ReferenceError: nativeFileManager is not defined”。
很久之前还好使,不知道为什么报错,有什么解决方法吗?

2024-10-15 11:46 负责人:无 分享
已邀请:
DC_Karenloar

DC_Karenloar (作者) - 缘起缘灭花未谢,三生无悔自由界

目前可以用plus.io.resolveLocalFileSystemURL来解决

m***@gmail.com

m***@gmail.com

同样遇到了..踩坑..

要回复问题请先登录注册