You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
634 B
24 lines
634 B
1 year ago
|
const {
|
||
|
createApi
|
||
|
} = require('./shared/index')
|
||
|
|
||
|
let reportDataReceiver, dataStatCron
|
||
|
module.exports = {
|
||
|
//uni统计数据上报数据接收器初始化
|
||
|
initReceiver: (options = {}) => {
|
||
|
if(!reportDataReceiver) {
|
||
|
reportDataReceiver = require('./stat/receiver')
|
||
|
}
|
||
|
options.clientType = options.clientType || __ctx__.PLATFORM
|
||
|
return createApi(reportDataReceiver, options)
|
||
|
},
|
||
|
//uni统计数据统计模块初始化
|
||
|
initStat: (options = {}) => {
|
||
|
if(!dataStatCron) {
|
||
|
dataStatCron = require('./stat/stat')
|
||
|
}
|
||
|
options.clientType = options.clientType || __ctx__.PLATFORM
|
||
|
return createApi(dataStatCron, options)
|
||
|
}
|
||
|
}
|