@chiyou/minigame-framework 1.2.64 → 1.2.66
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
CHANGED
|
@@ -27,14 +27,9 @@ export abstract class BaseMgr extends Component {
|
|
|
27
27
|
private onInit(): void {
|
|
28
28
|
BaseMgr.Instance = this;
|
|
29
29
|
|
|
30
|
-
let sysPlatform: any = sys.platform;
|
|
31
|
-
LogUtils.Instance.info(BaseMgr.TAG, "系统平台检测", {
|
|
32
|
-
operation: "onInit",
|
|
33
|
-
sysPlatform: sysPlatform
|
|
34
|
-
});
|
|
35
|
-
|
|
36
30
|
BaseMgr.currentPlatformID = PlatformID.ID_UNKNOWN;
|
|
37
31
|
|
|
32
|
+
let sysPlatform: any = sys.platform;
|
|
38
33
|
if (sysPlatform === sys.Platform.DESKTOP_BROWSER) {
|
|
39
34
|
BaseMgr.currentPlatformID = PlatformID.ID_H5_DesktopBrowser;
|
|
40
35
|
}
|
|
@@ -85,13 +80,23 @@ export abstract class BaseMgr extends Component {
|
|
|
85
80
|
|
|
86
81
|
try {
|
|
87
82
|
if (window["qg"]) {
|
|
88
|
-
|
|
83
|
+
let provider: string = "";
|
|
84
|
+
if (window["qg"].getProvider) {
|
|
85
|
+
provider = window["qg"].getProvider().toLowerCase();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
LogUtils.Instance.info(BaseMgr.TAG, "qg.getProvider", {
|
|
89
|
+
provider: provider
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
if (provider === "xiaomi" || provider === "redmi" || provider === "blackshark" ||
|
|
93
|
+
sysPlatform === sys.Platform.XIAOMI_QUICK_GAME) {
|
|
89
94
|
BaseMgr.currentPlatformID = PlatformID.ID_QuickGame_XiaoMi;
|
|
90
|
-
} else if (sysPlatform === sys.Platform.OPPO_MINI_GAME) {
|
|
95
|
+
} else if (provider === "oppo" || sysPlatform === sys.Platform.OPPO_MINI_GAME) {
|
|
91
96
|
BaseMgr.currentPlatformID = PlatformID.ID_QuickGame_Oppo;
|
|
92
|
-
} else if (sysPlatform === sys.Platform.HONOR_MINI_GAME) {
|
|
97
|
+
} else if (provider === "honor" || sysPlatform === sys.Platform.HONOR_MINI_GAME) {
|
|
93
98
|
BaseMgr.currentPlatformID = PlatformID.ID_QuickGame_Honor;
|
|
94
|
-
} else if (sysPlatform === sys.Platform.VIVO_MINI_GAME) {
|
|
99
|
+
} else if (provider === "vivo" || sysPlatform === sys.Platform.VIVO_MINI_GAME) {
|
|
95
100
|
BaseMgr.currentPlatformID = PlatformID.ID_QuickGame_Vivo;
|
|
96
101
|
} else if (sysPlatform === sys.Platform.HUAWEI_QUICK_GAME) {
|
|
97
102
|
BaseMgr.currentPlatformID = PlatformID.ID_QuickGame_HuaWei;
|
|
@@ -100,7 +105,10 @@ export abstract class BaseMgr extends Component {
|
|
|
100
105
|
} catch (e) {
|
|
101
106
|
}
|
|
102
107
|
|
|
103
|
-
LogUtils.Instance.info(BaseMgr.TAG, "初始化完成"
|
|
108
|
+
LogUtils.Instance.info(BaseMgr.TAG, "初始化完成", {
|
|
109
|
+
currentPlatform: PlatformID[BaseMgr.currentPlatformID],
|
|
110
|
+
currentPlatformID: BaseMgr.currentPlatformID
|
|
111
|
+
});
|
|
104
112
|
}
|
|
105
113
|
|
|
106
114
|
/**
|
|
@@ -834,7 +834,7 @@ export class UserMgr extends BaseMgr {
|
|
|
834
834
|
}
|
|
835
835
|
|
|
836
836
|
if (this.adMgr && this.socialMgr) {
|
|
837
|
-
if (this.adMgr.isRewardedVideoAdShowing()
|
|
837
|
+
if (this.adMgr.isRewardedVideoAdShowing() || this.socialMgr.isSharing()) {
|
|
838
838
|
return;
|
|
839
839
|
}
|
|
840
840
|
}
|