feat
parent
f3136773bd
commit
fe33611300
|
|
@ -12,8 +12,8 @@ module.exports = {
|
||||||
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
// 可通过环境变量覆盖: SAFETY_EVAL_API_HOST=http://192.168.x.x:8095
|
||||||
//API_HOST: "https://gbs-gateway.qhdsafety.com",
|
//API_HOST: "https://gbs-gateway.qhdsafety.com",
|
||||||
|
|
||||||
//API_HOST: "http://192.168.0.152",
|
API_HOST: "http://192.168.0.152",
|
||||||
API_HOST: "http://192.168.0.150", //太浅
|
//API_HOST: "http://192.168.0.150", //太浅
|
||||||
// API_HOST: "http://192.168.0.152",
|
// API_HOST: "http://192.168.0.152",
|
||||||
//API_HOST: "http://192.168.0.103", //huwei
|
//API_HOST: "http://192.168.0.103", //huwei
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,10 @@ const BaiduMapPicker = ({ visible, onCancel, onConfirm }) => {
|
||||||
script.id = scriptId;
|
script.id = scriptId;
|
||||||
script.src = `https://api.map.baidu.com/api?v=3.0&ak=6lkWDSnHTCcvUenZhovQPER9nkhFfT9A&callback=__onBMapLoaded`;
|
script.src = `https://api.map.baidu.com/api?v=3.0&ak=6lkWDSnHTCcvUenZhovQPER9nkhFfT9A&callback=__onBMapLoaded`;
|
||||||
script.async = true;
|
script.async = true;
|
||||||
document.body.appendChild(script);
|
// qiankun 微应用沙箱会劫持动态 <script> 的 appendChild 并改用 fetch 拉取脚本内容,
|
||||||
|
// 百度地图 API 未开启 CORS 会被浏览器拦截。改用原生 Node.prototype.appendChild 绕过劫持,
|
||||||
|
// 使脚本以标准 <script> 标签方式加载(JSONP,不受同源策略限制)。
|
||||||
|
Node.prototype.appendChild.call(document.head, script);
|
||||||
}, [visible]);
|
}, [visible]);
|
||||||
|
|
||||||
// 初始化地图
|
// 初始化地图
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue