@tmsfe/tms-core 0.0.38 → 0.0.39
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.
- package/package.json +1 -1
- package/src/report/helper.ts +0 -6
- package/src/report/sender.ts +2 -2
package/package.json
CHANGED
package/src/report/helper.ts
CHANGED
|
@@ -118,11 +118,6 @@ function getAppScene(): string {
|
|
|
118
118
|
return scene.toString();
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
// 给非空字段都encodeURIComponent一下
|
|
122
|
-
function encodeItems(arr: DataItem[]): DataItem[] {
|
|
123
|
-
return arr.map(t => (t ? encodeURIComponent(t) : t));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
121
|
// 是否爬虫
|
|
127
122
|
let isCrawler: boolean | null = null;
|
|
128
123
|
|
|
@@ -208,7 +203,6 @@ function getDeviceData(): Promise<IDeviceData> {
|
|
|
208
203
|
export default {
|
|
209
204
|
init,
|
|
210
205
|
getTms,
|
|
211
|
-
encodeItems,
|
|
212
206
|
getInitOptions,
|
|
213
207
|
getSystemInfo,
|
|
214
208
|
getSystemInfoString,
|
package/src/report/sender.ts
CHANGED
|
@@ -73,7 +73,7 @@ function requestFail(batch: DataItem[][]): void {
|
|
|
73
73
|
*/
|
|
74
74
|
function send(arr: DataItem[]): void {
|
|
75
75
|
stopTimer();
|
|
76
|
-
cacheArr.unshift(
|
|
76
|
+
cacheArr.unshift(arr); // 如果队列中很多,排前面比较稳妥
|
|
77
77
|
batchSendData();
|
|
78
78
|
}
|
|
79
79
|
|
|
@@ -82,7 +82,7 @@ function send(arr: DataItem[]): void {
|
|
|
82
82
|
* @param arr
|
|
83
83
|
*/
|
|
84
84
|
function queue(arr: DataItem[]): void {
|
|
85
|
-
cacheArr.push(
|
|
85
|
+
cacheArr.push(arr);
|
|
86
86
|
checkQueue(false);
|
|
87
87
|
}
|
|
88
88
|
|