收藏
回答

点金计划Failed to execute 'postMessage' on 'DOMWindow'

      代码:

  <script type="text/javascript">


            window.onload=function(){


let mchData ={action:'onIframeReady',displayStyle:'SHOW_CUSTOM_PAGE'}

let postData = JSON. stringify(mchData)

parent.postMessage(postData,'https://payapp.weixin.qq.com')


            }


function tiaozhuan(){


let mchData ={action:'jumpOut', jumpOutUrl:'https://www.qq.com'}

let postData = JSON. stringify(mchData)

parent.postMessage(postData,'https://payapp.weixin.qq.com')


}


        </script>




weixinpayreturn.php:37 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://payapp.weixin.qq.com') does not match the recipient window's origin ('https://www.baidu.com').

window.onload @ weixinpayreturn.php:37

load (async)

(anonymous) @ weixinpayreturn.php:33

weixinpayreturn.php:45 Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://payapp.weixin.qq.com') does not match the recipient window's origin ('https://www.baidu.com').



js报错为什么,都是https啊

回答关注问题邀请回答
收藏
登录 后发表内容