后端返回图片文件流,前端处理
获取验证码 const res = await indexApi.getCaptcha(); let url = (URL || webkitURL).createObjectURL(res); setImgUrl(url)注意要在get请求的请求头里面加属性export async function getCaptcha(options) { return request('/energyops/captcha.jpg', { method: 'GET', //