npm install envcloudmonitor --save
import envmonitor from 'envcloudmonitor';
envmonitor.sendMonitorMessage({
appKey: "appKey", // 应用key 必填
accessType: "pc", // 应用类型
userId: "userId", // 用户id 必填
name: "name", // 用户名称 必填
role: "role", // 用户角色 必填
module: "首页", 必填
route: hash,
event: 'routerChange',
eventDescribe: '页面切换',
remark: `当前页面路由为 ${hash}`,
param: ""
})
options 参数
Param | Type | Required | Description |
---|---|---|---|
*appKey | string |
必填 | 系统对应的 appKey |
*accessType | string |
必填,可选:pc (PC端)、 dingtalk_g (浙政钉)、 dingtalk (钉钉)、 wechat (微信)、 app (安卓app)、 ios (ios)、 pad (平板)、 zlb (浙里办) |
系统类型,默认值: pc |
*userId | string |
必填 | 用户id |
*name | string |
必填 | 用户名称 |
*role | string |
必填 | 用户角色 |
*module | string |
必填 | 模块或路由名称 |
route | string |
路由 | |
event | string |
可选:routerChange 、click 、 delete 、 save 、 search 、 login 、 logout
|
触发的事件 |
eventDescribe | string |
事件描述 | |
param | string |
触发事件所带的参数 | |
remark | string |
备注 |