收藏
回答

FileSystemManager.appendFile(Object object)真机调试失败?

真机调试控制台错误信息:path must be a string Error: path must be a string

路径有什么问题,求大佬告知

var savePath = wx.env.USER_DATA_PATH + "/accelerometer.txt"
let fsm = wx.getFileSystemManager()
        fsm.appendFileSync({
          filePath: savePath,
          data: info.name+','+info.age+','+info.gender+','+info.time+','+info.xaxis+','+info.yaxis+','+info.zaxis+'\n',
          encoding:'utf-8'
          })
回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容
问题标签