mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
前端代码适配springboot3微调
This commit is contained in:
@@ -82,7 +82,11 @@ export class BaseService<T> {
|
||||
}
|
||||
|
||||
get(id: String): Observable<Message<T>> {
|
||||
return this.http.get<Message<T>>(`${this.server.urls.base + this.server.urls.get}/${id}`);
|
||||
if (id === null || id === '') {
|
||||
return this.http.get<Message<T>>(`${this.server.urls.base + this.server.urls.get}`);
|
||||
} else {
|
||||
return this.http.get<Message<T>>(`${this.server.urls.base + this.server.urls.get}/${id}`);
|
||||
}
|
||||
}
|
||||
|
||||
getByParams(params: NzSafeAny, getURL?: string): Observable<Message<T>> {
|
||||
|
||||
@@ -84,6 +84,9 @@ export class BaseService<T> {
|
||||
}
|
||||
|
||||
get(id: String): Observable<Message<T>> {
|
||||
if (id === null || id === '') {
|
||||
return this.http.get<Message<T>>(`${this.server.urls.base + this.server.urls.get}`);
|
||||
}
|
||||
return this.http.get<Message<T>>(`${this.server.urls.base + this.server.urls.get}/${id}`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user