@yysports/tools 1.0.1 → 1.0.3
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/dist/Track/index.d.ts +1 -0
- package/dist/Track/index.js +15 -1
- package/lib/Track/index.d.ts +1 -0
- package/lib/Track/index.js +13 -0
- package/package.json +1 -1
package/dist/Track/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare class Track {
|
|
|
14
14
|
static setUserProfile(userProfile: UserProfile): void;
|
|
15
15
|
static initAuthCenterData({ getAuth, menuBuild, getDataScopeZonePermissions, menuNameMap, routes, }: Pick<TrackConfig, 'getAuth' | 'menuBuild' | 'menuNameMap' | 'routes' | 'getDataScopeZonePermissions'>): Promise<AuthCenterUserProfile>;
|
|
16
16
|
static init({ userProfile, menuNameMap, routes, getAuth, menuBuild, getDataScopeZonePermissions, ...restConfig }: TrackConfig): Promise<AuthCenterUserProfile>;
|
|
17
|
+
static registerAppInfo(): void;
|
|
17
18
|
static pushQueue({ type, log, }: {
|
|
18
19
|
type: TrackType;
|
|
19
20
|
log: ErrorProfile | CustomizeProfile;
|
package/dist/Track/index.js
CHANGED
|
@@ -272,6 +272,9 @@ var Track = /*#__PURE__*/function () {
|
|
|
272
272
|
}
|
|
273
273
|
this.setUserProfile(currentUserProfile);
|
|
274
274
|
this.mountAutoTask();
|
|
275
|
+
|
|
276
|
+
// 注册应用版本
|
|
277
|
+
// this.registerAppInfo();
|
|
275
278
|
return _context3.abrupt("return", this.authCenterUserProfile);
|
|
276
279
|
case 12:
|
|
277
280
|
case "end":
|
|
@@ -283,7 +286,18 @@ var Track = /*#__PURE__*/function () {
|
|
|
283
286
|
return _init.apply(this, arguments);
|
|
284
287
|
}
|
|
285
288
|
return init;
|
|
286
|
-
}() //
|
|
289
|
+
}() // 注册更新应用信息
|
|
290
|
+
}, {
|
|
291
|
+
key: "registerAppInfo",
|
|
292
|
+
value: function registerAppInfo() {
|
|
293
|
+
var appId = this.config.appId;
|
|
294
|
+
navigator.sendBeacon("https://track.yysports.com/pousheng-guard/api/conf/updateAppVersion", pako.deflate(JSON.stringify({
|
|
295
|
+
appId: appId,
|
|
296
|
+
version: VERSION
|
|
297
|
+
})));
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// 推送埋点信息进入队列
|
|
287
301
|
}, {
|
|
288
302
|
key: "pushQueue",
|
|
289
303
|
value: function pushQueue(_ref4) {
|
package/lib/Track/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ declare class Track {
|
|
|
14
14
|
static setUserProfile(userProfile: UserProfile): void;
|
|
15
15
|
static initAuthCenterData({ getAuth, menuBuild, getDataScopeZonePermissions, menuNameMap, routes, }: Pick<TrackConfig, 'getAuth' | 'menuBuild' | 'menuNameMap' | 'routes' | 'getDataScopeZonePermissions'>): Promise<AuthCenterUserProfile>;
|
|
16
16
|
static init({ userProfile, menuNameMap, routes, getAuth, menuBuild, getDataScopeZonePermissions, ...restConfig }: TrackConfig): Promise<AuthCenterUserProfile>;
|
|
17
|
+
static registerAppInfo(): void;
|
|
17
18
|
static pushQueue({ type, log, }: {
|
|
18
19
|
type: TrackType;
|
|
19
20
|
log: ErrorProfile | CustomizeProfile;
|
package/lib/Track/index.js
CHANGED
|
@@ -212,6 +212,19 @@ var Track = class {
|
|
|
212
212
|
this.mountAutoTask();
|
|
213
213
|
return this.authCenterUserProfile;
|
|
214
214
|
}
|
|
215
|
+
// 注册更新应用信息
|
|
216
|
+
static registerAppInfo() {
|
|
217
|
+
const { appId } = this.config;
|
|
218
|
+
navigator.sendBeacon(
|
|
219
|
+
`https://track.yysports.com/pousheng-guard/api/conf/updateAppVersion`,
|
|
220
|
+
import_pako.default.deflate(
|
|
221
|
+
JSON.stringify({
|
|
222
|
+
appId,
|
|
223
|
+
version: VERSION
|
|
224
|
+
})
|
|
225
|
+
)
|
|
226
|
+
);
|
|
227
|
+
}
|
|
215
228
|
// 推送埋点信息进入队列
|
|
216
229
|
static pushQueue({
|
|
217
230
|
type,
|