12345678910111213141516171819202122232425262728293031323334 |
- // import { getGlobalObject } from '@medici/utils';
- // import { BehaviorSubject } from 'rxjs';
- import { BaseTrack } from './basicTrack';
- import { IHistory } from './history';
- import { Eventer } from './event';
- export type PlatformType = 'web' | 'miniApp';
- export interface SDKInitConfig {
- user?: string;
- version?: string; //client version
- }
- export interface SDKConfigType {
- endPoint: string;
- appId: string;
- platform?: PlatformType;
- autoTrack?: boolean;
- config?: SDKInitConfig;
- }
- export class SDK extends BaseTrack {
- protected _platform: PlatformType;
- protected _config: SDKInitConfig;
- public eventer = new Eventer(this);
- public _history: IHistory;
- constructor(params: SDKConfigType) {
- super(params);
- console.log('params.appId', params.appId);
- this._history = new IHistory(this, params.appId);
- super._history = this._history;
- }
- }
|