最近因项目原因,使用到了IONIC框架做前端,然后集成第三方支付,但是在页面跳转至第三方支付页面时,一直提示:
XMLHttpRequest cannot load
https://www.baidu.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63342' is therefore not allowed access.
在页面的hear部分添加了
<meta http-equiv="Access-Control-Allow-Origin" content="*.baidu.com">
好像也不起任何作用