tf_web_log
v0.13.0
Published
tengface vue tf_web_log
Downloads
53
Readme
#tf_web_log
前端日志上报
#终端类型
1H5 2web 3老师端windows 4跟进页 5小程序 6安卓 7ios 8学员端PC端 9老师端Mac 10点播播放器
#介绍
###全局引入
在main.js 加入
import TFWebLog from 'TFWebLog';
var tfWebLog = TFWebLog.getInstance();
tfWebLog.init(终端类型<必须>,用户id<可选>,主题列表<可选>) // 示例 tfWebLog.init(1,434434343,["d2054c18-9760-4e4c-85e9-d967612fdd91","0a583343-c0f4-4f75-b4c2-fdc1a9312957"]);
Vue.prototype.$TFWebLog = tfWebLog
###通用字段设置
设置通用字段后,每次上报数据默认会带上通用字段参数
this.$TFWebLog.setCommonKeyValue(key,value);
###上报日志
this.$TFWebLog.putLogs(上报码<必须>,上报类型<必须>,上报数据<必须>);
// 示例 this.$TFWebLog.putLogs(1,1,{"time": new Date().valueOf(),"sendType":"immediately"});
sendType = "immediately" 立即发送日志