vconsole-feedback-plugin
v1.1.2
Published
vconsole-feedback-plugin
Downloads
18
Readme
versionPage
安装
$ npm install -S vconsole-feedback-plugin
使用
Quick Start
<!-- 特别注意一定要3.9.5版本,高版本移除了部分属性 -->
npm install [email protected] -S
import VConsoleFeedBackPlugin from 'version-page'
<!-- 定义一个函数,可以从本地缓存取值,没有考虑网络异步获取 -->
const getUserInfoFn = function() {
return {
id: '用户信息id',
uid: '用户信息uid',
data: '用户信息测试'
}
}
//VConsole
//vConsole(VConsole的实例)
//packageConfig(项目名和版本,可以直接传入package.json对象)
//getUserInfoFn(获取用户信息的函数)
//envMap(devServer的proxy对象)
//msgURL(钉钉机器人的Webhook给后端,需要后端提供一个跨域接口,h5调用上报信息,不需要功能可移除这个属性)
//ddToken(钉钉机器人的Webhook的access_token,关键字为feedback)
VConsoleFeedBackPlugin.install(
{
VConsole,
vConsole: Vue.prototype.$vConsole,
packageConfig: { name: '测试', version: '1.0.0' },
getUserInfoFn: getUserInfoFn,
envMap: envConfig.hjNetMap,
msgURL: '',
ddToken: ''
}
)