后端返回的图片路径为base64 前端渲染时, this.codeUrl = "data:image/gif;base64," + res.img; 前面加data:image/gif;base64即可;