1.在图片后面拼上?response-content-type=application/octet-stream即可
const link = document.createElement('a')
link.download = ''
link.href = 'https://qa-static.xunhou.cn/62fddf2920241f1f1b683301.jpg?response-content-type=application/octet-stream'
link.click()
<a download="" href="https://qa-static.xunhou.cn/62fddf2920241f1f1b683301.jpg?response-content-type=application/octet-stream">下载图片</a>