|
@@ -23,20 +23,23 @@ export class SDK extends BaseTrack {
|
|
protected _platform: PlatformType;
|
|
protected _platform: PlatformType;
|
|
protected _config: SDKInitConfig;
|
|
protected _config: SDKInitConfig;
|
|
|
|
|
|
- static _stopTrack = false;
|
|
|
|
-
|
|
|
|
public eventer = new Eventer(this);
|
|
public eventer = new Eventer(this);
|
|
public _history: IHistory;
|
|
public _history: IHistory;
|
|
|
|
|
|
constructor(params: SDKConfigType) {
|
|
constructor(params: SDKConfigType) {
|
|
super(params);
|
|
super(params);
|
|
console.log('params.appId', params.appId);
|
|
console.log('params.appId', params.appId);
|
|
|
|
+
|
|
this._history = new IHistory(this, params.appId);
|
|
this._history = new IHistory(this, params.appId);
|
|
super._history = this._history;
|
|
super._history = this._history;
|
|
if ('stopTrack' in params) {
|
|
if ('stopTrack' in params) {
|
|
- SDK._stopTrack = params.stopTrack;
|
|
|
|
|
|
+ BaseTrack._stopTrack = params.stopTrack;
|
|
}
|
|
}
|
|
this.setConfig(params.config);
|
|
this.setConfig(params.config);
|
|
|
|
+ //
|
|
|
|
+ }
|
|
|
|
+ get trackStatus() {
|
|
|
|
+ return BaseTrack._stopTrack;
|
|
}
|
|
}
|
|
public setConfig(config: SDKInitConfig): void {
|
|
public setConfig(config: SDKInitConfig): void {
|
|
this._config = Object.assign({ user: '', version: '' }, config);
|
|
this._config = Object.assign({ user: '', version: '' }, config);
|
|
@@ -44,9 +47,9 @@ export class SDK extends BaseTrack {
|
|
}
|
|
}
|
|
|
|
|
|
public stop(): void {
|
|
public stop(): void {
|
|
- SDK._stopTrack = true;
|
|
|
|
|
|
+ BaseTrack._stopTrack = true;
|
|
}
|
|
}
|
|
public resume(): void {
|
|
public resume(): void {
|
|
- SDK._stopTrack = false;
|
|
|
|
|
|
+ BaseTrack._stopTrack = false;
|
|
}
|
|
}
|
|
}
|
|
}
|