下载链接

下载不被拦截的方式

const down_url = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
down_url.href = data.oss_url;
down_url.download = data.name;
const event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
down_url.dispatchEvent(event);
JSRUN notes