出现错误:shareFileMessage:fail can only be invoked by user TAP gesture.
var g = Date.parse(new Date()), a = wx.getFileSystemManager(), n = wx.env.USER_DATA_PATH + “/盘点_” + g + “.txt”;
a.writeFile({
filePath: n,
data: e,
//encoding: ‘binary’,
success: function () {
//console.log(“打开文档失败1”, n);
wx.shareFileMessage({
filePath: n,
success() {},
fail: console.error,
})
}
});