import { Injectable } from '@angular/core'; import {HttpClient, HttpParams} from '@angular/common/http'; import {Message} from "../pojo/Message"; import {Observable} from "rxjs"; import {ParamDefine} from "../pojo/ParamDefine"; const app_hierarchy = '/apps/hierarchy'; @Injectable({ providedIn: 'root' }) export class AppDefineService { constructor(private http : HttpClient) { } public getAppParamsDefine(app: string | undefined | null) : Observable> { if (app === null || app === undefined) { console.log("getAppParamsDefine app can not null"); } const paramDefineUri = `/apps/${app}/params`; return this.http.get>(paramDefineUri); } public getAppHierarchy() : Observable> { let httpParams = new HttpParams().append("lang",'zh-CN'); const options = { params: httpParams }; return this.http.get>(app_hierarchy,options); } }