diff options
author | cyuamber <xuranyjy@chinamobile.com> | 2019-08-29 18:43:08 +0800 |
---|---|---|
committer | xu ran <xuranyjy@chinamobile.com> | 2019-08-30 02:20:49 +0000 |
commit | 0c1e82ccbfa6dcb8ee5d11220a93fefc61465374 (patch) | |
tree | dbd894bc5909df38bde9a2738e366d7913627195 /usecaseui-portal/src/app/core/services/text.service.ts | |
parent | cbb4b91ad39b44a76d1b1d4b745ef2b38fab74ce (diff) |
feat: change the mock data path config file
Change-Id: I5ca301d8ff0b084f64366312543c9036d8e76de8
Issue-ID: USECASEUI-307
Signed-off-by: cyuamber <xuranyjy@chinamobile.com>
Diffstat (limited to 'usecaseui-portal/src/app/core/services/text.service.ts')
-rw-r--r-- | usecaseui-portal/src/app/core/services/text.service.ts | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/usecaseui-portal/src/app/core/services/text.service.ts b/usecaseui-portal/src/app/core/services/text.service.ts index 9ccea18a..9698ee64 100644 --- a/usecaseui-portal/src/app/core/services/text.service.ts +++ b/usecaseui-portal/src/app/core/services/text.service.ts @@ -20,14 +20,16 @@ import { HttpClient } from '@angular/common/http'; export class TextService { constructor(private http: HttpClient) { } //--------------------------------------------------------------------------------------- - /* line up*/ baseUrl = "/api"; + url = { textInterface: this.baseUrl + "/user/login", singleInterface: this.baseUrl + "/home", doubleInterface: this.baseUrl + "/customer/info", - multipleInterface: this.baseUrl + "/alarm/formdata/multiple", + multipleInterface: this.baseUrl + "/alarm/form/data", jsonInterface: this.baseUrl + "/xuran/test/data", + currentLanguage: "/api/portal-auxapi/languageSetting/user/", + creatensData: this.baseUrl + "_jsonData", //POST } //-----------------------------------Function-local-start------------------------------------------------------ @@ -35,8 +37,15 @@ export class TextService { getfakeData() { return this.http.get<any>(this.url["singleInterface"]); } - getjsonData() { - return this.http.get<any>(this.url["multipleInterface"]); + getjsonData(user) { + return this.http.get<any>(this.url["multipleInterface"], user); + } + getCurrentLanguage(currentloginId) { + let url = this.url.currentLanguage + currentloginId; + return this.http.get<any>(url); + } + getCreatensData(url_upId: string, requestBody: object) { + return this.http.post<any>(this.url.creatensData.replace("_jsonData", url_upId), requestBody); } //------------------------------------------------------------------------------------- |