envcloudmonitor

0.0.39 • Public • Published

前端监控插件

安装命令

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: ""
})

sendMonitorMessage(options = {})

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 可选:routerChangeclickdeletesavesearchloginlogout 触发的事件
eventDescribe string 事件描述
param string 触发事件所带的参数
remark string 备注

Readme

Keywords

Package Sidebar

Install

npm i envcloudmonitor

Weekly Downloads

1

Version

0.0.39

License

ISC

Unpacked Size

8.2 kB

Total Files

6

Last publish

Collaborators

  • zhangyudong_vortex