diff --git a/config/nginx.conf b/config/nginx.conf index ade88614b0daa4b7e69b266325ba48076b736ba3..aaedbd4018bb435e2a4116d38ecc947714a99a9b 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -28,22 +28,22 @@ proxy_redirect default; } - location /region { - rewrite ^/region/(.*)$ /kelan/$1 break; - add_header Access-Control-Allow-Origin *; - add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; - add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; - proxy_pass https://10.1.174.34:13600; - proxy_redirect default; - } + # location /region { + # rewrite ^/region/(.*)$ /kelan/$1 break; + # add_header Access-Control-Allow-Origin *; + # add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; + # add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; + # proxy_pass https://10.1.174.34:13600; + # proxy_redirect default; + # } - location /grid-range { - rewrite ^/grid-range/(.*)$ /grid-range/$1 break; - add_header Access-Control-Allow-Origin *; - add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; - add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; - proxy_pass https://10.1.174.34:13600; - proxy_redirect default; - } + # location /grid-range { + # rewrite ^/grid-range/(.*)$ /grid-range/$1 break; + # add_header Access-Control-Allow-Origin *; + # add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; + # add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; + # proxy_pass https://10.1.174.34:13600; + # proxy_redirect default; + # } } \ No newline at end of file diff --git a/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/loadArea-1.3.1.js b/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/loadArea-1.3.1.js index 92c56680edfe2273a3af4ac833d701049111804d..34aebaa1eca0c6bd4ca60ef40b1f8f3726fc1c9a 100644 --- a/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/loadArea-1.3.1.js +++ b/src/pages/Home_v_2504/components/MapContainer/DistrictMapCustomized/loadArea-1.3.1.js @@ -8,6 +8,8 @@ const CooGL = window.CooGL; // 调试开关 const DEBUG = false; +const IS_PROD = process.env.NODE_ENV === 'production' ? true : false; + // API基础URL配置 const API_BASE_URLS = { // 直接地址 @@ -17,8 +19,8 @@ const API_BASE_URLS = { }, // 相对地址(代理) PROXY: { - REGION_API: '/region/coogl/api', - GRID_RANGE_API: '/grid-range' + REGION_API: IS_PROD?'/cd-comprehensive/region/coogl/api':'/region/coogl/api', + GRID_RANGE_API: IS_PROD?'/cd-comprehensive/grid-range':'/grid-range' } };