diff --git a/public/faceLoginIE/index.html b/public/faceLoginIE/index.html
index b1d88df..79fd187 100644
--- a/public/faceLoginIE/index.html
+++ b/public/faceLoginIE/index.html
@@ -28,10 +28,11 @@
pos += 4 * 320;
//post>= 4 * 320(x轴像素) * 240(y轴像素) 表示读取图像数据完毕
if (pos >= 4 * 320 * 240) {
- var url ='http://127.0.0.1:8081/outer/v1.0/stock/logicStock/rgbArray2Base64';
- $.post(url, {type: 'pixel', rgb: image.join('|')}, function(result){
- $('#base64image').attr('src', 'data:image/jpg;base64,' + result.data);
- });
+ window.parent.postMessage({"image":image.join('|')}, '*');
+ // var url ='http://127.0.0.1:8081/outer/v1.0/stock/logicStock/rgbArray2Base64';
+ // $.post(url, {type: 'pixel', rgb: image.join('|')}, function(result){
+ // $('#base64image').attr('src', 'data:image/jpg;base64,' + result.data);
+ // });
image = new Array();
pos = 0;
}
@@ -56,6 +57,13 @@
$('#snapBtn').on('click', function() {
webcam.capture();
});
+
+ function receiveMessageFromParent ( event ) {
+ console.log(event.data);
+ $('#base64image').attr('src', 'data:image/jpg;base64,' + event.data.data);
+ };
+
+ window.addEventListener('message', receiveMessageFromParent, false);
});