fix: query type params is not exist in request

This commit is contained in:
kungfuboy 2022-02-22 18:20:21 +08:00
parent 07a9ec8eee
commit 803aac070e
3 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@
<eo-api-test-query
class="eo_theme_iblock bbd"
[model]="apiData.queryParams"
(modelChange)="changeQuery()"
(modelChange)="changeQuery($event)"
></eo-api-test-query>
</nz-tab>
<nz-tab [nzTitle]="restTitleTmp" [nzForceRender]="true">

View File

@ -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;

View File

@ -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);
});
}