diff --git a/src/main/ets/http/HttpHelper.ets b/src/main/ets/http/HttpHelper.ets index 0d999aa..55e11a1 100644 --- a/src/main/ets/http/HttpHelper.ets +++ b/src/main/ets/http/HttpHelper.ets @@ -44,12 +44,26 @@ export class HttpHelper { 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) { if (this.concurrentList.getIndexOf(apiNo) !== -1) { this.concurrentList.remove(apiNo) } } + public removeConcurrents(apiNo: string[]) { + for (let apiNoElement of apiNo) { + if (this.concurrentList.getIndexOf(apiNoElement) !== -1) { + this.concurrentList.remove(apiNoElement) + } + } + } /** * postJson请求