Răsfoiți Sursa

feat(gx): 添加冠新用户相关功能

- 新增 GXHomeView 组件,实现冠新首页功能
- 添加 GXAppPermissions组件,用于展示业务权限
- 在 AccountManager 中增加 refresh 方法,用于刷新用户信息
- 在 HttpHelper 中添加 clearHttp 和 cancel 方法,用于清理 HTTP 请求
- 更新 LoginView、RegisterView 和 VerificationView,集成冠新用户相关逻辑- 调整 HomeSwiperView,支持冠新首页轮播图显示
徐勤民 5 luni în urmă
părinte
comite
3a7d2b4605
2 a modificat fișierele cu 19 adăugiri și 2 ștergeri
  1. 2 2
      BuildProfile.ets
  2. 17 0
      src/main/ets/http/HttpHelper.ets

+ 2 - 2
BuildProfile.ets

@@ -2,8 +2,8 @@
  * Use these variables when you tailor your ArkTS code. They must be of the const type.
  */
 export const HAR_VERSION = '1.0.5';
-export const BUILD_MODE_NAME = 'release';
-export const DEBUG = false;
+export const BUILD_MODE_NAME = 'debug';
+export const DEBUG = true;
 export const TARGET_NAME = 'default';
 
 /**

+ 17 - 0
src/main/ets/http/HttpHelper.ets

@@ -296,4 +296,21 @@ export class HttpHelper {
     });
 
   }
+
+  clearHttp() {
+    for (let handler of this.httpHandlerList.keys()) {
+      this.cancel(handler)
+    }
+
+  }
+
+  cancel(apiNo: string) {
+    if (this.httpHandlerList.hasKey(apiNo)) {
+      this.httpHandlerList.get(apiNo).destroy()
+      this.httpHandlerList.remove(apiNo)
+      SZYXLocalStorageHelper.storage.setOrCreate(SZYXLocalStorageKeys.HttpHandlerList, this.httpHandlerList)
+      SZYXLocalStorageHelper.storage.setOrCreate(SZYXLocalStorageKeys.HttpHandlerListLength,
+        this.httpHandlerList.length)
+    }
+  }
 }