keytops-game-framework 1.0.12 → 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.
Files changed (2) hide show
  1. package/dist/index.js +4 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2438,7 +2438,7 @@ class RemoteConfigStore {
2438
2438
  const configKey = this.getConfigKey(configClass);
2439
2439
  if (!this._snapshots[configKey]) {
2440
2440
  const config = this._registry.create(configClass);
2441
- const persisted = storage.getGValue(this.getStorageKey(configClass), undefined);
2441
+ const persisted = storage.getGValue(this.getStorageKey(configClass), {});
2442
2442
  // 首次读取时先构造默认对象,再把本地持久化内容 merge 回来,保证未请求时也能正常工作。
2443
2443
  this._snapshots[configKey] = persisted ? config.merge(config, persisted) : config;
2444
2444
  }
@@ -6341,8 +6341,9 @@ class ILoginAble {
6341
6341
  * 登录,helper内登录成功后,必须调用this._setOpenId();否则后续逻辑会有BUG
6342
6342
  */
6343
6343
  login(caller, onSuccess, onFail) {
6344
- console.log("登录", this._type);
6345
- this._setOpenID(storage.userId || "temp_" + StringUtils.random(16));
6344
+ const openID = storage.userId || "temp_" + StringUtils.random(16);
6345
+ this._setOpenID(openID);
6346
+ console.log("登录", this._type, "openID", openID, "this.openID", this.openID);
6346
6347
  onSuccess && onSuccess.apply(caller);
6347
6348
  }
6348
6349
  _setOpenID(openID) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keytops-game-framework",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
4
4
  "description": "cocos creator game framework library",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",