问题:
百度地图引用时,报错api?v=2.0&ak=MqgPRehwsDncQGZrRLg6OojcU8oSOYR2:1 A parser-blocking, cross site (i.e. different eTLD+1) script, https://api.map.baidu.com/getscript?v=2.0&ak=MqgPRehwsDncQGZrRLg6OojcU8oSOYR2&services=&t=20210113094335, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
原因:
暂不明,大概是因为某个地方用了document.write()吧。
解决方法:
修改api引用url,api改成getscript就行
//修改前
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=####################"></script>
//修改后
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&ak=##########################"></script>