1、已成功從后端獲取base64圖片:

2、處理數據:
for(var i in res.data) {
let url = 'data:image/jpg;base64,' + res.data[i]; // 此時 base64 位圖片沒有帶前面的頭,需添加 base64 頭,此時 src 已經有值了,但頁面還是無法顯示
this.user_msg.push({"url": url.replace(/[\r\n]/g, "")}); //再需加上 replace(/[\r\n]/g, "") 正則去除回車換行符,就可以正常顯示了
}
