You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
apply-assistant-v3/pages/NEUIKit/utils/reporter.ts

21 lines
583 B
TypeScript

5 months ago
import { EventTracking } from '@xkit-yx/utils/dist/uniapp'
import imPkg from 'nim-web-sdk-ng/package.json'
export const trackInit = (
component: 'ChatUIKit' | 'ContactUIKit' | 'ConversationUIKit' | 'SearchUIKit'
): void => {
console.log('js init');
if (uni.$UIKitNIM && uni.$UIKitNIM.options.appkey) {
const eventTracking = new EventTracking({
appKey: uni.$UIKitNIM.options.appkey,
version: '10.2.0',
component,
imVersion: imPkg.version,
platform: 'UniApp',
})
eventTracking.track('init', '')
}else{
console.log('js 异常')
}
}