// 文件流的多此一举请求
componentDidMount() {
const that = this;
fetch('http://172.16.20.202/api/v1/wechat/content/13/media', {
method: 'GET',
responseType: 'blob',
})
.then(res => {
console.log(res,89);
return res.blob()
}).then(res => {
const reader = new FileReader();
reader.readAsDataURL(res);
reader.onload = (e) => {
that.setState({ img: e.target.result })
console.log(e.target.result,0);
}
})
}