fix(commonTable): 请求参数的传递
This commit is contained in:
@@ -6,7 +6,7 @@ export class RequestObj {
|
||||
method: 'GET' | 'POST' | 'PUT' | 'DELETE';
|
||||
data?: {};
|
||||
contentType?: 'application/json' | 'application/x-www-form-urlencoded';
|
||||
queryParam?: {};
|
||||
queryParam?: { [key: string]: any };
|
||||
header?: HttpHeaders | {
|
||||
[header: string]: string | string[];
|
||||
};
|
||||
|
||||
@@ -59,10 +59,13 @@ export class CommonTableComponent<T> implements OnInit, OnChanges {
|
||||
this.loading = true;
|
||||
const pageValue = this.dataList.pageNum ? this.dataList.pageNum : 1;
|
||||
const countValue = this.dataList.pageSize ? this.dataList.pageSize : 10
|
||||
this.request.queryParam = {
|
||||
page: pageValue,
|
||||
count: countValue
|
||||
}
|
||||
|
||||
this.request.queryParam.page = pageValue;
|
||||
this.request.queryParam.count = countValue;
|
||||
// this.request.queryParam = {
|
||||
// page: pageValue,
|
||||
// count: countValue
|
||||
// }
|
||||
this.pageInfo.emit({page: pageValue, pageSize: countValue})
|
||||
return this.httpService.Service<PageList<T>>(this.request).subscribe({
|
||||
next: resp => {
|
||||
|
||||
Reference in New Issue
Block a user