第一种方式
url //接口名称
window.location = url;
第二种通过创建a标签的方式
返回示例
const link = document.createElement('a')
link.style.display = 'none'
link.href =`${process.env.VUE_APP_API_URL}Goods/${command == 'export'?'exportIpuhuoExcel':'exportGoodsInfo'}?token=${localStorage.getItem("token")}&ids=${this.selectId.join(',')}`
document.body.appendChild(link);
link.click();
document.body.removeChild(link);