diff --git a/README.md b/README.md index 88dc9bc..fdecfab 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Oops Framework 基于 Cocos Creato 3.x 开发的一款游戏框架 #### 贡献榜 | 时间 | 开发者 | 贡献内容 | | ---------- | -------- | ------------------------------------------------------------------------------------------- | +| 2022-08-04 | Bz | 修复UrlParse对象解析腾讯游戏大厅的地址查询参数数据错误问题 | | 2022-06-02 | 羽毛先生 | 修复 UI 框架中界面无法不销毁移除的问题; 修复UI框架中从缓存获取界面时,传递新参数不更新问题 | | 2022-04-15 | Hess | 建议优化 ecs 框架所有生命周期事件在处理多实体时,将批处理逻辑移到框架层实现,减小业务代码量 | | 2021-10-13 | laret | 修复 Dialog 类型的 UI 不能连续触发 | diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 86f2a78..1c8ce5d 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -2,7 +2,7 @@ * @Author: dgflash * @Date: 2021-07-03 16:13:17 * @LastEditors: dgflash - * @LastEditTime: 2022-07-26 15:20:27 + * @LastEditTime: 2022-08-04 18:28:51 */ import { dynamicAtlasManager, macro, profiler, _decorator } from 'cc'; import { DEBUG, JSB } from 'cc/env'; diff --git a/assets/script/game/common/config/GameConfig.ts b/assets/script/game/common/config/GameConfig.ts index 4127150..cf28f20 100644 --- a/assets/script/game/common/config/GameConfig.ts +++ b/assets/script/game/common/config/GameConfig.ts @@ -2,7 +2,7 @@ * @Author: dgflash * @Date: 2021-07-03 16:13:17 * @LastEditors: dgflash - * @LastEditTime: 2022-08-02 14:25:50 + * @LastEditTime: 2022-08-04 13:51:36 */ import { Logger } from "../../../../../extensions/oops-plugin-framework/assets/core/common/log/Logger"; diff --git a/assets/script/game/common/config/UrlParse.ts b/assets/script/game/common/config/UrlParse.ts index 9b57920..654c5c6 100644 --- a/assets/script/game/common/config/UrlParse.ts +++ b/assets/script/game/common/config/UrlParse.ts @@ -2,7 +2,7 @@ * @Author: dgflash * @Date: 2022-07-26 15:27:57 * @LastEditors: dgflash - * @LastEditTime: 2022-08-02 14:26:06 + * @LastEditTime: 2022-08-04 18:21:41 */ import { sys } from "cc"; @@ -24,20 +24,23 @@ export class UrlParse { } private parseUrl() { - if (typeof window !== "object") { - return {}; - } - if (!window.document) { - return {}; - } + if (typeof window !== "object") return {}; + if (!window.document) return {}; + let url = window.document.location.href.toString(); let u = url.split("?"); if (typeof (u[1]) == "string") { u = u[1].split("&"); let get: any = {}; for (let i = 0, l = u.length; i < l; ++i) { - let j = u[i].split("="); - get[j[0]] = j[1]; + let j = u[i]; + let x = j.indexOf("="); + if (x < 0) { + continue; + } + let key = j.substring(0, x); + let value = j.substring(x + 1); + get[decodeURIComponent(key)] = value && decodeURIComponent(value); } return get; }