@cc-component/cc-core 1.3.4 → 1.3.6

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.
@@ -9,7 +9,6 @@ export class BaseModuleConfig {
9
9
  this.modules.set(name, factory());
10
10
  const comp: any = js.getClassByName(`${name}Manager`)
11
11
  if (comp) ecs.getSingleton(comp)
12
-
13
12
  }
14
13
  return this.modules.get(name);
15
14
  }
@@ -219,6 +219,7 @@ export class App {
219
219
  if (!param) {
220
220
  param = {}
221
221
  }
222
+ //界面回调方法
222
223
  const call = param?.callBack;
223
224
  const backCallback = (arg1: any, arg2: any) => {
224
225
  call?.(arg1, arg2)
@@ -323,7 +324,14 @@ export class App {
323
324
  });
324
325
  destroyPromises.push(destroyPromise); // 将 Promise 添加到集合中
325
326
  if (view && view.node && isValid(view.node, true)) {
326
- view.node.destroy(); // 关闭窗口
327
+ /**关闭事件-当系统级关闭所有打开的界面时。如果关闭界面时需要执行自己的业务逻辑,使用此属性
328
+ * eventName:关闭方法名称
329
+ * param:参数
330
+ */
331
+ const closeEvent: { eventName: string, param?: any } = view.closeEvent
332
+ const close: Function = view[closeEvent.eventName]
333
+ if (close) { close.call(view, closeEvent.param) }
334
+ if (view && view.node && view.node.isValid) view.node.destroy(); // 关闭窗口
327
335
  }
328
336
  }
329
337
  })
@@ -163,7 +163,9 @@ export class HttpManager {
163
163
  let url: string = r[0];
164
164
  let key: string = r[1];
165
165
  let pss: string = r[2];
166
-
166
+ if (method == HttpMethod.POST) {
167
+ pss = JSON.stringify(params);
168
+ }
167
169
  let hrd = urls.get(key);
168
170
  if (hrd && hrd.pss == pss) {
169
171
  Logger.warn(`地址【${key}】已正在请求中,不能重复请求`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-core",
3
- "version": "1.3.4",
3
+ "version": "1.3.6",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",