let file = new FormData();
file.append('file',this.fileList[0].raw)
file.append('startDate',this.reportForm.startDate)
file.append('endDate',this.reportForm.endDate)
file.append('frequency',this.reportForm.frequency)
注意:其他需要传的参数通过append加入到formdata,传参就传整体的file就行。至于action可以不传值。
在写调接口方法时候需要加入请求头headers,里面传入token