Agriculture-front-end/dist/config.js

40 lines
2.9 KiB
JavaScript
Raw Normal View History

2023-11-08 11:15:41 +08:00
let flag = ''
let url = window.location.origin
// 使用正则表达式来提取 IP 地址的第一段
var ipAddress = url.match(/(\d+)\.\d+\.\d+\.\d+/);
if (ipAddress && ipAddress.length > 1) {
if (ipAddress[1] == 10 || ipAddress[1] == 59) {
flag = true
} else {
flag = false
}
}
2023-04-23 09:41:12 +08:00
window.serverAPI = {
2023-11-08 11:15:41 +08:00
// baseUrl: "http://192.168.1.19:6902", //本地
2023-09-11 21:56:39 +08:00
// baseUrl: "http://36.134.44.75:6901", //线上
2023-09-19 14:34:21 +08:00
// baseUrl: "http://zz.qxszsn.cn/prod-api/", //线上
2023-11-08 11:15:41 +08:00
baseUrl: `${url}/prod-api/`, //金宏网
2023-04-23 09:41:12 +08:00
// geoserver
2023-09-11 21:56:39 +08:00
// geoserverUrl: "http://36.134.44.75:8090/iserver/services",//外网
2023-11-08 11:15:41 +08:00
geoserverUrl: flag ? "http://10.213.5.109:8090/iserver/services" : "http://27.223.102.23:9010/iserver/services", //外网
// geoserverUrl: "http://10.213.5.109:8090/iserver/services", //金宏网
2023-09-11 21:56:39 +08:00
geoserverUrl2: "http://10.213.5.109:8090/iserver/services", //耕地资源模块
// geoserverUrl2: "http://192.168.0.113:8090/iserver/services", //耕地资源模块
key: '921cd226bea05c8604531b8443b3cb13', //天地图key
// logHome: 'http://36.134.45.201:8000/index', //退出登录跳转门户网站
2023-11-08 11:15:41 +08:00
logHome: flag ? `${url}/index` : `${url}/index`, //退出登录跳转门户网站
// logHome: 'http://10.213.5.175:80/index', //退出登录跳转门户网站
2023-09-11 21:56:39 +08:00
// 金宏网天地图
2023-11-08 11:15:41 +08:00
// tiandituLayers: 'http://59.206.203.34/tileservice/SdRasterPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdimg2017&STYLE=default&TILEMATRIXSET=img2017&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=application%2Fpng',
2023-09-11 21:56:39 +08:00
// //外网天地图
2023-11-08 11:15:41 +08:00
tiandituLayers: flag ? 'http://59.206.203.34/tileservice/SdRasterPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdimg2017&STYLE=default&TILEMATRIXSET=img2017&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=application%2Fpng' : 'https://t0.tianditu.gov.cn/img_w/wmts?tk=921cd226bea05c8604531b8443b3cb13&layer=img&style=default&tilematrixset=w&Service=WMTS&Request=GetTile&Version=1.0.0&Format=tiles&TileMatrix={z}&TileCol={x}&TileRow={y}',
2023-09-11 21:56:39 +08:00
//金宏网天地图注记
2023-11-08 11:15:41 +08:00
// tiandituzhuji:'http://59.206.203.34/tileservice/SDRasterPubMapDJ?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdcia&STYLE=default&TILEMATRIXSET=sdcia&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=application%2Fpng',
2023-09-11 21:56:39 +08:00
//外网天地图注记
2023-11-08 11:15:41 +08:00
tiandituzhuji: flag ? 'http ://59.206.203.34/tileservice/SDRasterPubMapDJ?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdcia&STYLE=default&TILEMATRIXSET=sdcia&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&FORMAT=application%2Fpng' : 'http://t0.tianditu.com/DataServer?T=cia_w&tk=921cd226bea05c8604531b8443b3cb13&x={x}&y={y}&l={z}',
2023-09-11 21:56:39 +08:00
// api:'http://36.134.45.201:8000',//跳转获取用户信息接口
2023-11-08 11:15:41 +08:00
api: 'http://oa.qxszsn.cn',//跳转获取用户信息接口
// api:'http://10.213.5.175:80',//跳转获取用户信息接口
flag:flag ? true :false
}