@haluo/util 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,8 +9,6 @@ var xhr_1 = __importDefault(require("./lib/xhr"));
|
|
|
9
9
|
var tracker_1 = __importDefault(require("./utils/tracker"));
|
|
10
10
|
exports.Tracker = tracker_1.default;
|
|
11
11
|
// import timing from './lib/timing'
|
|
12
|
-
jsError_1.injectJsError();
|
|
13
|
-
xhr_1.default();
|
|
14
12
|
function setup(data) {
|
|
15
13
|
jsError_1.injectJsError(data);
|
|
16
14
|
xhr_1.default(data);
|
|
@@ -16,7 +16,6 @@ var uuidv4 = require('uuid').v4;
|
|
|
16
16
|
var SendTracker = /** @class */ (function () {
|
|
17
17
|
function SendTracker() {
|
|
18
18
|
this.url = '';
|
|
19
|
-
this.xhr = new XMLHttpRequest();
|
|
20
19
|
}
|
|
21
20
|
SendTracker.prototype.send = function (data) {
|
|
22
21
|
if (data === void 0) { data = {}; }
|
|
@@ -41,7 +40,7 @@ function getExtraData() {
|
|
|
41
40
|
errorType: 3,
|
|
42
41
|
channel: 'h5',
|
|
43
42
|
bundle: 'com.jdd.motorfans',
|
|
44
|
-
title:
|
|
43
|
+
title: '',
|
|
45
44
|
frontStatus: 3,
|
|
46
45
|
occurTimeStamp: Date.now(),
|
|
47
46
|
};
|
package/package.json
CHANGED
|
@@ -2,10 +2,8 @@ const { v4: uuidv4 } = require('uuid')
|
|
|
2
2
|
// const Parser = require('ua-parser-js');
|
|
3
3
|
class SendTracker {
|
|
4
4
|
url: string
|
|
5
|
-
xhr: XMLHttpRequest
|
|
6
5
|
constructor() {
|
|
7
6
|
this.url = ''
|
|
8
|
-
this.xhr = new XMLHttpRequest()
|
|
9
7
|
}
|
|
10
8
|
send(data:any = {}) {
|
|
11
9
|
const log = { ...getExtraData(), ...data}
|
|
@@ -28,7 +26,7 @@ function getExtraData() {
|
|
|
28
26
|
errorType: 3,
|
|
29
27
|
channel: 'h5',
|
|
30
28
|
bundle: 'com.jdd.motorfans',
|
|
31
|
-
title:
|
|
29
|
+
title: '',
|
|
32
30
|
frontStatus: 3,
|
|
33
31
|
occurTimeStamp: Date.now(),
|
|
34
32
|
// userAgent: new Parser().getResult()
|