Browse Source

feat(env): 新增多域名环境管理功能

- 在GlobalValue中新增envStatus属性用于记录环境状态- 支持TEST环境的自定义域名配置- 优化环境切换逻辑,支持多域名自动适配
- 新增EnvManager类统一管理环境同步和检测
- 实现用户登录前的环境状态同步机制
- 完善登录流程中的用户存在性校验
- 注册流程支持多环境验证码发送
- 首页及各个业务模块集成环境同步机制- HttpHelper支持批量添加并发请求白名单
- 新增checkUserLocal接口用于用户本地化判断
-修复环境URL获取逻辑,提高系统稳定性
徐勤民 1 month ago
parent
commit
da5a1675f1
1 changed files with 14 additions and 0 deletions
  1. 14 0
      src/main/ets/http/HttpHelper.ets

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

@@ -44,12 +44,26 @@ export class HttpHelper {
       this.concurrentList.add(apiNo)
       this.concurrentList.add(apiNo)
     }
     }
   }
   }
+  public addConcurrents(apiNo: string[]) {
+    for (let apiNoElement of apiNo) {
+      if (this.concurrentList.getIndexOf(apiNoElement) === -1) {
+        this.concurrentList.add(apiNoElement)
+      }
+    }
+  }
 
 
   public removeConcurrent(apiNo: string) {
   public removeConcurrent(apiNo: string) {
     if (this.concurrentList.getIndexOf(apiNo) !== -1) {
     if (this.concurrentList.getIndexOf(apiNo) !== -1) {
       this.concurrentList.remove(apiNo)
       this.concurrentList.remove(apiNo)
     }
     }
   }
   }
+  public removeConcurrents(apiNo: string[]) {
+    for (let apiNoElement of apiNo) {
+      if (this.concurrentList.getIndexOf(apiNoElement) !== -1) {
+        this.concurrentList.remove(apiNoElement)
+      }
+    }
+  }
 
 
   /**
   /**
    * postJson请求
    * postJson请求