0.1.5 • Published 9 months ago

@lollipope/alarm-helper-compat v0.1.5

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

写在前面的话

此库只适用于Vue2项目集成

如果是Vue3项目,请使用 @lollipope/alarm-helper

集成文档

1.安装依赖(建议使用 npm 下载)
npm i @lollipope/alarm-helper-compat --no-save

2.添加配置文件

//public/config/config.js:
//全局配置项
;(function (window) {
  window.globalConfig = {
    // 添加以下配置
    AlarmCenterWsUrl: `128.23.13.125:28082`, // 告警中心Socket地址
    AlarmRobotApiContext: '/api/',// 告警弹窗接口前缀
    WhiteRoutes: ["/video/setting"],// 路由白名单
    UserInfo:{ userId:''}, // 用户的所有信息
    //AlarmWebPath:'', //请配置告警中心系统历史消息页地址
    AlarmStreamPath:`http://xxxx/api/GetCameraPlayURL`,//流媒体服务接口
    AlarmStreamDomain:`private`, //外网(public)还是内网(private)
    AlarmStreamRate:`slaver` //获取主码流(master)或者副码流(slaver)
  }
})(window)

配置说明: | 参数 | 说明 | 类型 | 是否必要 | 默认值 | | :----|:----| :----: |:----: |:----: | | AlarmCenterWsUrl | 告警中心Socket地址 eg:127.0.0.1:9527 | String | 是 | - | | AlarmRobotApiContext | 告警弹窗接口前缀,需要拦截该前缀转发到对应后端地址 eg:/api/| String | 是 | - | | WhiteRoutes | 路由白名单,匹配该路径的页面会显示该组件 eg:["/video/setting"]| Array\ | 是 | - | | UserInfo | 用户的所有信息,用户登入登出后需要手动更新该值 eg:{ userId:''}| Object & {userId:''} | 是 | - | | AlarmWebPath | 告警中心首页地址(外部系统集成需要配置,配置该项会新开页签并跳转) eg:http://localhost:9527/| String | 否 | - | | AlarmStreamPath | 流媒体服务接口Uri eg:http://ip:port/api/GetCameraPlayURL| String | 是 | - | | AlarmStreamDomain | 流媒体取流来源 | String | 否 | private | | AlarmStreamRate | 流媒体码流 | String | 否 | slaver |

0.1.5

9 months ago

0.1.4

9 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

11 months ago

0.1.0

11 months ago

0.0.9

11 months ago

0.0.8

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago