Przeglądaj źródła

Update index.js

star7th 8 lat temu
rodzic
commit
ec4324fc06
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      Public/js/page/index.js

+ 3 - 2
Public/js/page/index.js

@@ -70,9 +70,10 @@ $(function(){
 
       }else{
         //如果在iframe里,则直接传url给父窗口
-        top.postMessage(img_url, '*');
+        var message ={"img_url":img_url,"meessage_type":"img_url"};
+        top.postMessage(message, window.location.origin);
       }
 
     });
 
-})
+})