daq-sdk-js
v1.0.3
Published
Data Acquisition JS SDK of Monster
Downloads
20
Readme
漫斯特数据采集工具 DAQ-SDK-JS
小程序需要先配置服务接口白名单 小程序引入
import daq from 'daq-sdk-js/lib/weapp'
// 初始化工具
daq.initial({
// server_url: "http://10.10.2.63:8073",
// prefix: '/mst-solar-api/data/coll',
server_url: "http://10.10.2.69:8073",
prefix:"/hw-merchant-admin/home/test",
token: "1231",
project: "chuangrong", // 项目名称
channel: "4", // PC: 1 Android 2 IOS 3 微信小程序 4 H5
showLog: true,
});
// 埋点事件发送
daq.sendEvent({
event: "saveFruit",
data: {
product_id: 12345,
product_name: "苹果",
product_classify: "水果",
product_price: 14.0,
},
});
工具说明
- flyio 请求工具 https://www.npmjs.com/package/flyio
- md5 数据加密 https://www.npmjs.com/package/md5