From 803aac070e12c4b76c1c98af3e1ff561f470116d Mon Sep 17 00:00:00 2001 From: kungfuboy <17kungfuboy@gmail.com> Date: Tue, 22 Feb 2022 18:20:21 +0800 Subject: [PATCH] fix: query type params is not exist in request --- src/app/pages/api/test/api-test.component.html | 2 +- src/app/pages/api/test/api-test.component.ts | 4 ++-- src/app/pages/api/test/query/api-test-query.component.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/pages/api/test/api-test.component.html b/src/app/pages/api/test/api-test.component.html index b815811b3..fba243a42 100644 --- a/src/app/pages/api/test/api-test.component.html +++ b/src/app/pages/api/test/api-test.component.html @@ -90,7 +90,7 @@ diff --git a/src/app/pages/api/test/api-test.component.ts b/src/app/pages/api/test/api-test.component.ts index a3ca3ae12..41f90db22 100644 --- a/src/app/pages/api/test/api-test.component.ts +++ b/src/app/pages/api/test/api-test.component.ts @@ -106,8 +106,8 @@ export class ApiTestComponent implements OnInit, OnDestroy { window.sessionStorage.setItem('apiDataWillbeSave', JSON.stringify(apiData)); this.messageService.send({ type: 'addApiFromTest', data: apiData }); } - changeQuery() { - this.apiData.uri = this.apiTest.transferUrlAndQuery(this.apiData.uri, this.apiData.queryParams, { + changeQuery(queryParams) { + this.apiData.uri = this.apiTest.transferUrlAndQuery(this.apiData.uri, queryParams, { base: 'query', replaceType: 'replace', }).url; diff --git a/src/app/pages/api/test/query/api-test-query.component.ts b/src/app/pages/api/test/query/api-test-query.component.ts index 8cfff23e4..7c61dbcec 100644 --- a/src/app/pages/api/test/query/api-test-query.component.ts +++ b/src/app/pages/api/test/query/api-test-query.component.ts @@ -27,7 +27,7 @@ export class ApiTestQueryComponent implements OnInit, OnChanges, OnDestroy { constructor(private editService: ApiTestService) { this.modelChange$.pipe(debounceTime(500), takeUntil(this.destroy$)).subscribe(() => { - this.modelChange.emit(); + this.modelChange.emit(this.model); }); }