/** * WebSocket配置文件 * * @author kxmall * @date 2025-01-08 */ export default { // WebSocket连接配置 connection: { // 最大重连次数 maxReconnectAttempts: 5, // 重连间隔(毫秒) reconnectInterval: 5000, // 心跳间隔(毫秒) heartbeatInterval: 30000, // 连接超时时间(毫秒) connectionTimeout: 10000 }, // 消息通知配置 notification: { // 是否启用声音提醒 enableSound: true, // 是否启用震动提醒 enableVibration: true, // 是否启用Toast通知 enableToast: true, // 紧急订单是否使用模态框 urgentOrderModal: true, // Toast显示时长(毫秒) toastDuration: 3000, // 震动时长(毫秒) vibrationDuration: 500 }, // 消息类型配置 messageTypes: { // 新订单消息 newOrder: { type: 'NEW_ORDER', title: '新订单通知', sound: true, vibration: true, autoRefresh: true }, // 订单取消消息 orderCancel: { type: 'ORDER_CANCEL', title: '订单取消', sound: false, vibration: false, autoRefresh: true }, // 订单状态更新 orderStatusUpdate: { type: 'ORDER_STATUS_UPDATE', title: '订单状态更新', sound: false, vibration: false, autoRefresh: true }, // 系统消息 systemMessage: { type: 'SYSTEM_MESSAGE', title: '系统消息', sound: false, vibration: false, autoRefresh: false } }, // 开发环境配置 development: { // 是否启用调试日志 enableDebugLog: true, // 是否启用性能监控 enablePerformanceMonitor: false, // 测试模式 testMode: false }, // 生产环境配置 production: { // 是否启用调试日志 enableDebugLog: false, // 是否启用性能监控 enablePerformanceMonitor: true, // 测试模式 testMode: false } };