Quellcode durchsuchen

选择照片改为回传Base64编码,<img>设置src时添加前缀

zhanglong7 vor 5 Jahren
Ursprung
Commit
363c8b154a
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      show-server/src/main/webapp/biz/js/plugins/photo.js

+ 2 - 2
show-server/src/main/webapp/biz/js/plugins/photo.js

@ -28,11 +28,11 @@ require([ "ipuMobile", "jcl", "iScroll", "jquery", "ipuUI"], function(IpuMobile,
28 28
			// fileSize: 默认400 * 1024, 压缩图片的最小文件大小
29 29
			// minWidth: 默认300,压缩图片的最小宽度
30 30
			IpuMobile.getPicture(function(path) {
31
				$("#pic2").html("<img src='" + path + "'/>");
31
				$("#pic2").html("<img src='data:image/jpeg;base64," + path + "'/>");
32 32
				setTimeout(function(){
33 33
					iscroll.refresh();
34 34
				}, 1000);
35
			},1, 400*1024, 300);
35
			},0, 400*1024, 300);
36 36
		});
37 37
38 38
		$("#get_pic").click(function() {