@cc-component/cc-core 1.3.7 → 1.3.8

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.
@@ -136,8 +136,8 @@ export class App {
136
136
  static OnLoading(param: { open: (finish: () => void) => void, close: () => void }) { App.gui.loading_call = param; }
137
137
  static OnProgess(param: { open: (finish: () => void) => void, close: () => void, progess: (progress: number) => void }) { App.gui.progess = param; }
138
138
 
139
- static async Requst<T>(config: IHttpConfig, params?: any, ext?: IExtData): Promise<HttpReturn<T>> {
140
- return new Promise<HttpReturn<any>>(async (originalResolve, originalReject) => {
139
+ static async Requst<T>(config: IHttpConfig, params?: any, ext?: IExtData): Promise<{ code: number, data: T, msg: string }> {
140
+ return new Promise<{ code: number, data: T, msg: string }>(async (originalResolve, originalReject) => {
141
141
  let retries = 0; // 当前重试次数
142
142
  const maxRetries = 5; // 最大重试次数
143
143
  // 内部辅助函数,用于执行请求逻辑
@@ -49,7 +49,7 @@ declare global {
49
49
  function OnRequstNet(param: { open: (finish: (isOk: boolean) => void) => void })
50
50
  /**=====================================✅✅Http请求======================= */
51
51
  /**网络接口 */
52
- function Requst<T>(config: IHttpConfig, params?: any, ext?: { is_show_alert?: boolean }): Promise<HttpReturn<T>>;
52
+ function Requst<T>(config: IHttpConfig, params?: any, ext?: { is_show_alert?: boolean }): Promise<{ code: number, data: T, msg: string }>;
53
53
  /**=====================================✅✅消息发送======================= */
54
54
  function Emit(eventName: string, params?: any);
55
55
  function On(eventName: string, callback: any, target?: any);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-core",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",