市北新大屏
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.7 KiB

2 years ago
export default {
apiUrl: getApiUrl(), // 获取接口的baseURL
screenBaseUrl: getScreenBaseUrl(), // 获取接口转发的baseURL
shibeiConfig: getShibeiScreenConfig(), // 市北大屏高德地图配置
reproductionConfig: getReproductionConfig(), // 标准版大屏-演示版本高德地图配置
electronPackageurl: getElectronPackageUrl() // 客户端版本更新路径
}
function getScreenBaseUrl() {
// 需要区分 客户端生产环境、web端生产环境、本地开发环境
if (process.env.VUE_APP_SCREEN === 'dev') {
2 years ago
return 'http://192.168.1.58:10001'
2 years ago
} else if (
process.env.VUE_APP_SCREEN === 'prod' ||
process.env.NODE_ENV === 'production'
) {
return 'http://192.168.1.58:10001' // 生产机 域名地址
} else {
return '/screenBaseUrl'
}
}
function getApiUrl() {
// 需要区分 客户端生产环境、web端生产环境、本地开发环境
if (process.env.NODE_ENV === 'development') {
return '/api'
} else if (
process.env.VUE_APP_SCREEN === 'prod' ||
process.env.NODE_ENV === 'production'
) {
return 'http://192.168.1.58:10001/api' // 生产机 域名地址
} else {
return '/api'
}
}
// 获取市北大屏配置
function getShibeiScreenConfig() {
return {
aMapBase: {
key: '04a33f777b1ed62e69915440699ad400', // 市北大屏高德key
version: '2.0',
plugins: []
},
aMapStyle: {
mapStyle: 'amap://styles/640ee0ff2203ce81b32ed946714f65c8',
center: [120.364165, 36.103091],
resizeEnable: true, // 是否监控地图容器尺寸变化
// zooms: [11, 20],
zooms: [13, 20],
scrollWheel: true,
labelzIndex: 120,
keyboardEnable: false,
doubleClickZoom: false,
rotateEnable: true,
showIndoorMap: false,
pitchEnable: true,
// zoom: 12,
zoom: 14,
viewMode: '3D',
pitch: 59
}
}
}
function getReproductionConfig() {
return {
aMapBase: {
key: '04a33f777b1ed62e69915440699ad400', // 市北大屏高德key
version: '2.0',
plugins: []
},
aMapStyle: {
mapStyle: 'amap://styles/fc93e14aa3ca0d88cb2797458d0978f6',
center: [120.364165, 36.103091],
resizeEnable: true, // 是否监控地图容器尺寸变化
// zooms: [11, 20],
zooms: [13, 20],
scrollWheel: true,
labelzIndex: 120,
keyboardEnable: false,
doubleClickZoom: false,
rotateEnable: true,
showIndoorMap: false,
pitchEnable: true,
// zoom: 12,
zoom: 13,
viewMode: '3D',
pitch: 50
}
}
}
// 获取客户端最新安装包地址-客户端版本检测、自动更新配置
function getElectronPackageUrl() {
return 'http://47.104.85.99:10003/electron-packages/'
}