Failed to execute ‘readAsText‘ on ‘FileReader‘: parameter 1 is not of type ‘Blob‘.的解决方法
把c.JSON(http.StatusOK,res)替换成resByte,_:=json.Marshal(res)////c.JSON(http.StatusOK,res)c.Header("Content-Disposition","attachment;filename=file-name.txt")c.Data(http.StatusOK,"application/octet-stream"