uni app微信小程序. 电脑端(window)打开小程序下载 文件显示成功,实际没打开 ,mac正常,这是怎么回事,特急,
export function saveFile(url, name, accept = "xlsx") {
wx.getFileSystemManager().saveFile({
tempFilePath: url,
filePath: wx.env.USER_DATA_PATH + "/" + name.slice(0, 10) + '.' + accept, //此处文件名自定义,
success(res1) {
const savedFilePath = res1.savedFilePath
wx.openDocument({
filePath: savedFilePath,
fileType: accept,
showMenu: true,
success: (res2) => {
console.log(
'成功打开文档', wx.env.USER_DATA_PATH,'---',res2);
},
fail: (err) => {
},
})
},
fail(err) {
console.log(err, '-----19')
}
})
}
试试更新内核https://docs.qq.com/doc/DRmROZXpBVmNxYURY