调整环境变量参数,支持项目切换
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
export const config = {
|
||||
BACKEND_URL:
|
||||
process.env.NEXT_PUBLIC_BACKEND_URL || "http://127.0.0.1:8000",
|
||||
BACKEND_URL: process.env.NEXT_PUBLIC_BACKEND_URL || "http://127.0.0.1:8000",
|
||||
MAP_URL: process.env.NEXT_PUBLIC_MAP_URL || "http://127.0.0.1:8080/geoserver",
|
||||
MAP_WORKSPACE: process.env.NEXT_PUBLIC_MAP_WORKSPACE || "TJWater",
|
||||
MAP_WORKSPACE: process.env.NEXT_PUBLIC_MAP_WORKSPACE || "tjwater",
|
||||
MAP_EXTENT: process.env.NEXT_PUBLIC_MAP_EXTENT
|
||||
? process.env.NEXT_PUBLIC_MAP_EXTENT.split(",").map(Number)
|
||||
: [13508849, 3608035.75, 13555781, 3633812.75],
|
||||
: [13508849, 3608036, 13555781, 3633813],
|
||||
MAP_DEFAULT_STYLE: {
|
||||
"stroke-width": 3,
|
||||
"stroke-color": "rgba(51, 153, 204, 0.9)",
|
||||
@@ -37,6 +36,10 @@ export const setMapWorkspace = (workspace: string) => {
|
||||
config.MAP_WORKSPACE = workspace;
|
||||
};
|
||||
|
||||
export const setMapExtent = (extent: number[]) => {
|
||||
config.MAP_EXTENT = extent;
|
||||
};
|
||||
|
||||
export const MAPBOX_TOKEN =
|
||||
process.env.NEXT_PUBLIC_MAPBOX_TOKEN ||
|
||||
"pk.eyJ1IjoiemhpZnUiLCJhIjoiY205azNyNGY1MGkyZDJxcTJleDUwaHV1ZCJ9.wOmSdOnDDdre-mB1Lpy6Fg";
|
||||
|
||||
Reference in New Issue
Block a user