drgame-cc 1.0.24 → 1.0.26

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.
@@ -94,7 +94,6 @@ export default class GameAnalytics {
94
94
  }
95
95
 
96
96
  public static setUserId(userId: string): void {
97
- this.init();
98
97
  if (!this.initialized) return;
99
98
  try {
100
99
  Reporter.setCommonInfo({ user_id: userId || "" });
@@ -120,7 +119,6 @@ export default class GameAnalytics {
120
119
  action: AnalyticsAction,
121
120
  adRequestId?: string
122
121
  ): void {
123
- this.init();
124
122
  if (!this.initialized) return;
125
123
 
126
124
  const definition = this.definitions[event];
@@ -1,10 +1,8 @@
1
- import { pinyin } from "./pinyin/pinyin";
1
+ declare const pinyinPro: any;
2
2
 
3
- export class Util {
3
+ export class InternalUitl {
4
4
  public static getChineseInitials(str: string): string {
5
-
6
-
7
- return pinyin(str, {
5
+ return pinyinPro.pinyin(str, {
8
6
  pattern: 'first',
9
7
  toneType: 'none',
10
8
  type: 'array'
@@ -6,7 +6,7 @@ import GameAnalytics, { AnalyticsAction, AnalyticsEvent, GameAnalyticsPlatform }
6
6
  import { showRewardVideo } from "./Info";
7
7
  import { Loader } from "./Loader";
8
8
  import ToastManager from "./toast/ToastManager";
9
- import { Util } from "./Util";
9
+ import { InternalUitl } from "./InternalUitl";
10
10
  /** 平台适配器,名字有点长防止和Platform,Adapter冲突 */
11
11
  export class PlatformAdapter {
12
12
  private static readonly cpId = "xhbj";
@@ -17,7 +17,7 @@ export class PlatformAdapter {
17
17
  public static async init(cnName: string) {
18
18
  var platform = GameAnalyticsPlatform.XiaomiTv;//平台由sdk处理
19
19
  var appItem = GameAnalytics.getAppItem(platform);
20
- var contentId = Util.getChineseInitials(cnName);
20
+ var contentId = InternalUitl.getChineseInitials(cnName);
21
21
  await ToastManager.Inst.init();
22
22
  TvUi.init({
23
23
  cpId: contentId,
@@ -1,5 +1,9 @@
1
- export function pinyin(word: string, options?: {
1
+ declare const pinyin: (word: string, options?: {
2
2
  pattern?: 'first' | 'final' | 'num' | 'tone' | 'initial';
3
3
  toneType?: 'none' | 'symbol' | 'num';
4
4
  type?: 'array' | 'string' | 'object';
5
- }): string[];
5
+ }) => string | string[] | { zh: string; py: string;[key: string]: any }[];
6
+
7
+ declare const pinyinPro: {
8
+ pinyin: typeof pinyin;
9
+ };