this.data.src = “wxfile://tmp_20f3b439b28c3bxxxxxxxxxxxxxxxxxxxx.jpg”; // 在代码中该地址是正常的微信临时文件路径
let base = wx.getFileSystemManager().readFileSync(this.data.src, ‘base64’);
console.log(base)
这一段代码,在安卓上没任何问题,可以转成base64,但在ios上就报错,提示超时了,如下:
[publib]:1 thirdScriptError
readFileSync:fail timeout;at pages/auth/auth page getBaseImg function
Error: readFileSync:fail timeout
at readFileSync ([publib]:1:432687)
at Object.e.(anonymous function) [as readFileSync] ([publib]:1:438711)
at s.getBaseImg (weapp:///pages/auth/auth.js:62:42)
at s.<anonymous> ([publib]:1:966027)
at Function.success (weapp:///pages/auth/auth.js:29:14)
at Object.success ([publib]:1:101885)
at v ([publib]:1:212131)
at v ([publib]:1:212317)
at [publib]:1:213673
at Object.y ([publib]:1:1375)
到底啥情况?