Files
yuto-water-h5/public/config/globalConfig.dev.js
hermes 9b68a2d275 feat: Phase 3 - API layer + Pinia stores + app integration
- HTTP client (axios interceptors, token mgmt, typed APIs)
- Pinia stores: token, user (login/logout), app (dark mode, sidebar)
- globalConfig TS types + Window augmentation
- Vue Router (hash history, auth guard)
- Login/Home/Mine pages (Vant UI)
- Vant integration + globalConfig dev script
- Build passes (vue-tsc + vite)
2026-06-15 20:56:05 +08:00

149 lines
5.9 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* @Description: 全局配置(开发环境)
*
* 此文件在 index.html 中通过 <script> 标签加载,
* 将配置挂载到 window.globalConfig 供应用启动时读取。
*
* 生产环境部署时,由运维/后端将此文件替换为对应环境的配置。
*/
window.globalConfig = {
// ══════════════════════════════════════════════
// 系统基础配置
// ══════════════════════════════════════════════
system: {
/** 系统名称(登录页、导航栏展示) */
name: '舆图智慧水务',
/** 系统编码(集成管控平台中的子系统编码) */
id: '4b9ce59235794ff5b6785dd0bf4ddf9e',
/** 附件存储桶名称 */
buckName: 'swfile',
/** 符号库存储桶名称 */
buckNameMetadata: 'sw-metadata',
/** 附件存储桶地址 */
imgLoadUrl: 'http://10.10.10.189:81/icp-api',
/** 版本信息 */
version: 'v2.0.0',
/** 是否是微信小程序 */
isMiniProgram: false,
/** navbar 高度px */
navHeight: 76,
/** 轨迹记录时间间隔毫秒1分钟 */
trackTime: 1000 * 60,
/** 班组打卡轨迹记录距离间隔毫秒10分钟 */
groupsTrackTime: 1000 * 600,
/** 默认行政区划等级PROVINCE | CITY | COUNTY | TOWNSHIP */
regionLevel: 'COUNTY',
/** 系统首页标题 */
homeTitle: '智慧水务',
/** 系统描述 */
description: '舆图智慧水务移动端',
},
// ══════════════════════════════════════════════
// API 接口配置
// ══════════════════════════════════════════════
api: {
/** API 主机地址 */
host: 'http://10.10.10.189:81/',
/** API 基础路径 */
baseURL: 'http://10.10.10.189:81/icp-api',
// baseURL: '/dev-api', // 代理模式
/** 智慧水务服务路径 */
swPath: '/wisdomwater',
// swPath: '/wisdomwatersm', // 思明环境
/** 天地图接口服务 */
tdt: 'https://api.tianditu.gov.cn',
tdtToken: '72f4500be0826ec2443f0794b05bec0f',
/** 高德地图接口服务 */
amap: 'https://restapi.amap.com',
amapKey: 'c6c64f95ef9ca6f504d4b676a0a77c7d',
/** 台风数据接口服务 */
typhoon: 'http://183.252.1.27:8082',
/** 请求超时时间(毫秒) */
timeout: 30000,
},
// ══════════════════════════════════════════════
// 地图配置
// ══════════════════════════════════════════════
map: {
/** 地图中心点 [经度, 纬度] */
center: [118.734575, 31.990939],
// center: [118.112785, 24.486653],
/** 地图默认缩放级别 */
zoom: 10,
/** 地图最大缩放级别 */
maxZoom: 20,
/** 地图最小缩放级别 */
minZoom: 3,
/** Token 拦截配置 */
interceptors: [
{
urls: 'https://map.zygh.xm.gov.cn:6060',
params: {
token: '11eA5fuVv89GgFd2zJRJj44OQsDuHzCf-LuiYqjfqF3D3RlrV4hGzv9ev6ckf8eZbGGW2obvw9zHKU5g0XU-6w..',
},
},
],
/** 基础图层列表 */
baseLayers: [],
/** 地图类型 */
type: 'tdt',
},
// ══════════════════════════════════════════════
// 排水管网配置
// ══════════════════════════════════════════════
pipe: {
/** 检查井 ID */
checkId: '32',
},
// ══════════════════════════════════════════════
// 巡检养护配置
// ══════════════════════════════════════════════
xjyhSys: {
/** (防汛)养护单位父级 code */
fxyhdwParentCode: 'yhdw',
/** 巡检单位父级 code */
xjdwParentCode: 'swxj',
},
// ══════════════════════════════════════════════
// 打卡配置
// ══════════════════════════════════════════════
clockIn: {
/** 打卡距离(米) */
distance: 50,
},
// ══════════════════════════════════════════════
// 系统加载服务类型
// ══════════════════════════════════════════════
loadMapType: {
/** 基础服务 */
basic: 'base-map',
/** 专题服务 */
thematic: 'thematic-map',
},
/** 基础服务缓存 Key */
CACHE_KEY: 'loadMapListCacheSearch',
/** 所有基础服务缓存 Key */
CACHE_KEY_ALL: 'loadMapListCacheSearch_ALL',
/** 专题判断标识列表 */
specialFeature: [],
// ══════════════════════════════════════════════
// 设备类型配置(雨情/水情/工情)
// ══════════════════════════════════════════════
sbType: {
/** 雨情设备 */
yq: ['雨量计'],
/** 水情设备 */
sq: ['水位计', '河道水位', '电子水尺'],
/** 工情设备 */
gq: ['雨水泵站', '闸门', '截流井', '拍门'],
},
}