在正确分子的这种情况下,后台的图片不能直接返回为二进制流,也应该转换成 Base64 格式的字符串格式,前台直接设置图片元素的 attr 就可以了。
byte[] oriCopyImages = 流文件读取到字节数组中;
Base64 base64Object = new Base64();
pictureMap.put("newImage", base64Object.encodeToString(newImages));
放到 Map 中返回给前台
不需要ajax post
直接
$("#LAY-user-get-vercode").attr("src", "http://xxxx你的地址/getverify?" + Math.random());
注意是 attr 不是 sattr
attr 和你获取uuid 半毛钱关系都没有