https://developers.weixin.qq.com/miniprogram/dev/api/file/wx.saveFileToDisk.html
const res = await api.xxxx({
})
const { data } = res
const fsm = wx.getFileSystemManager()
const filePath = wx.env.USER_DATA_PATH + `/xxx_2020_11_11.xlsx`
fsm.writeFile({
filePath,
data,
encoding: 'binary',
success: () => {
wx.saveFileToDisk({
filePath: filePath,
success: () => {
},
fail: () => {
}
})
}
})
你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)