@cc-component/cc-core 1.7.8 → 1.7.9

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.
@@ -107,6 +107,11 @@ export class LayerUI {
107
107
  // }
108
108
  }
109
109
 
110
+ /**重置网络配置 */
111
+ ResetHttpServer(config: EnvironmentConfig) {
112
+ Object.assign(config, this.current_config);
113
+ }
114
+
110
115
 
111
116
 
112
117
 
@@ -200,6 +200,8 @@ export class App {
200
200
  attemptRequest();
201
201
  });
202
202
  }
203
+ /**重置网络配置 */
204
+ ResetHttpServer(config: EnvironmentConfig) { App.instance._gui.ResetHttpServer(config); }
203
205
 
204
206
 
205
207
  static async OpenWindow<T extends Component>(config: IBundleConfig, param?: IWindowParam): Promise<T> {
@@ -14,6 +14,7 @@ import { EventManager } from "../home/EventManager";
14
14
  import { AudioUtil } from "../home/AudioUtil";
15
15
  import { Tools } from "../home/Tools";
16
16
  import { EffectSingleCase } from "../home/EffectSingleCase";
17
+ import { EnvironmentConfig } from "../config/IConfig";
17
18
 
18
19
  declare global {
19
20
  /** 日志打印类 */
@@ -61,6 +62,8 @@ declare global {
61
62
  /**=====================================✅✅Http请求======================= */
62
63
  /**网络接口 */
63
64
  function Requst<T>(config: IHttpConfig, params?: any, ext?: { is_show_alert?: boolean }): Promise<{ code: number, data: T, msg: string }>;
65
+ /**重置网络配置 */
66
+ function ResetHttpServer(config: EnvironmentConfig)
64
67
  /**=====================================✅✅消息发送======================= */
65
68
  function Emit(eventName: string, params?: any);
66
69
  function On(eventName: string, callback: any, target?: any);
@@ -130,6 +133,7 @@ declare global {
130
133
  function Debug(isDebug: boolean);
131
134
  function GetDebug(): boolean;
132
135
 
136
+
133
137
  /**=======================================✅✅常用工具======================= */
134
138
  // function TwoBezier(param1, param2, param3, param4);
135
139
  // function CustomEaseOutInWithSpeed(param)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-core",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",