今天调一个接口返回的是一个byte数组 想的是直接把它里面的东西丢到img的src属性里面就行了 但是结果是显示失败 <img src=" /9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgFBgcGBQgHBgcJCAgJDBMMDA
sLDBgREg4THBgdHRsYGxofIywlHyEqIRobJjQnKi4vMTIxHiU2OjYwOiwwMTD/
2wBDAQgJCQwKDBcMDBcwIBsgMDAwMDAwMDAwMDAwMDAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDD/wgARCAF5
AR4DASEAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAQIAAwQFB
gf/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/2gAMAwEAAhADEAAAAfa
W4oBBUJAGBiSLIklErAkhIQkCmuHtTNaoBACEJIhUY0IADEMBAwkAVleT2J
RZQFQAksNhkQUmCOXXHU1VpeowYQgIBKEDfJnemWoCSCKYHJ89lh5M
FE1IdTo6dXq26DUMSARQkh0xmtoygKEiMDlHzvLmWuBC5IstrR6SvSvqkkg
UiU5raEz20DQlCRErheOy5ljMkJnq/RDpa2mN3qtOy1pgYKmKugz22SaAEh
V5HLh8dm1oSFOqq6pbb7K7C7oL7bpapJCBM2nUme2oCSpSeK4uZzXQO
FjHqTOi07i91G9PQ+n1bWUgC5temTNbpBRAnio4WWTHsRYWQrU50t03y
Ay5elZs9xb2WtkFObVoTLdUFRTyvmMwVJVpM7mXWU11irWXyR4XXVvrK
9g100EaKdOWWzQigh8+5uZERbjHaXdeupoqYZeTyJMlolJr6B7vtapKgRT
qyy2aGUMp84z5znJdhD2jsdVdejQgp5pxPM5ac6Ped/3WrbFIinTllemGk5B
4CjOZUX4ju9uujfba4WFrMXi4ySRmNf0OugbqLFWmMpHmk4h4FM5pzGn
oWek6Ft9ilyEEM/Fjy/Nk6RNvvrd7WyvIXmaU8qcc+btnNdNdD0qdfTdMwA
AhYmc5fz6NelPW+qtZlmTNs0pmlPKnNPmVcy1J7Lr1dmUWFhFYJBSHx
0ed6knsvV6pKskV6IzirBUzp8z5eYnQs9pptGKXh4Eu7dbM68rNJ0OzTUS
/N9Z9L79RlKxXojMadaK2eB8Xk/tLnvqoRU56YdRvymPYbrFlh4Zcz6np3
YZSsV6YoFMtTKnivMyX+6q/lry8cmboHT6NdLnLyuZJj2mrunH4x6z1lsitI0…"
解决方法img src=" data:image/jpeg;base64,+/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgFBgcGBQgHBgcJCAgJDBMMDA
sLDBgREg4THBgdHRsYGxofIywlHyEqIRobJjQnKi4vMTIxHiU2OjYwOiwwMTD/
2wBDAQgJCQwKDBcMDBcwIBsgMDAwMDAwMDAwMDAwMDAwMDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDD…"就好了
数据库BLOB类型在前端转化为图片格式问题
最新推荐文章于 2024-07-25 17:32:44 发布