fix(地图配置): 移除index.html中的安全配置并更新edit-project-form中的地图配置

将AMap安全配置从index.html移至edit-project-form组件中,并更新地图密钥和默认中心坐标
2个文件已修改
16 ■■■■■ 已修改文件
estate-frontend-v2024/public/index.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
estate-frontend-v2024/src/views/business/forms/edit-project-form.jsx 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
estate-frontend-v2024/public/index.html
@@ -7,11 +7,6 @@
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <meta name="theme-color" content="#000000" />
  <script src="https://cache.amap.com/lbs/static/es5.min.js"></script>
  <script type="text/javascript">
    window._AMapSecurityConfig = {
      securityJsCode: "c75eccf0742998b2ea43823e08cacccd",
    };
  </script>
  <script src="https://webapi.amap.com/loader.js"></script>
  <meta name="description" content="岱观智评管理平台" />
  <title>岱观智评管理平台</title>
estate-frontend-v2024/src/views/business/forms/edit-project-form.jsx
@@ -15,6 +15,10 @@
import { getCityList, getDistrictList } from "../../common/address_func";
import { flatPath, formatNodeForCascader, getDepartmentRoot } from "../../../api/hierarchy";
window._AMapSecurityConfig = {
    securityJsCode: 'ba4138d0c0efb13d1d5fd10df08bb0d1',
}
const { Option } = Select;
class EditProjectForm extends BaseForm {
@@ -138,8 +142,7 @@
    initMap = () => {
        AMapLoader.load({
            key: "232929db1cb31f26d42b3645a7456154",
            version: "2.0",
            key: "1c53e2a2bb2218895e9a9f672df36840",
            plugins: ['AMap.ToolBar', 'AMap.AutoComplete', 'AMap.PlaceSearch', 'AMap.Geocoder', 'AMap.Marker'],
        }).then((AMap) => {
            this.AMap = AMap;
@@ -147,14 +150,14 @@
                extensions: "all"
            });
            const { addressInfo } = this.state.editableData;
            let center = [104.04, 30.40];
            let center = [104.065617, 30.656952];
            if (addressInfo && addressInfo.longitude && addressInfo.latitude) {
                center = [addressInfo.longitude, addressInfo.latitude];
            }
            if (!this.map) {
                this.map = new AMap.Map("mapContainer", {
                    zoom: 15,
                    zoom: 14,
                    resizeEnable: true,
                    center: center
                });