消息警示添加内容及航班列表优化

This commit is contained in:
zhouyuejun
2019-01-08 09:48:58 +08:00
parent 2af5e30184
commit c3027e4948
11 changed files with 316 additions and 151 deletions
+10 -10
View File
@@ -21,7 +21,7 @@ export class HttpClientService {
private toastService: ToastService,
) { }
header: HttpHeaders = new HttpHeaders().set('x-requested-with', 'XMLHttpRequest')
/**
* request
@@ -29,7 +29,7 @@ export class HttpClientService {
* @return any
*/
request(method: string, url: string, options?): Observable<any> {
return this.commonProcess(this.httpClient.request(method, url, options));
return this.commonProcess(this.httpClient.request(method, url, { headers: this.header }));
}
@@ -40,7 +40,7 @@ export class HttpClientService {
* @param options
*/
delete(url: string, options?): Observable<any> {
return this.commonProcess(this.httpClient.delete(url, options));
return this.commonProcess(this.httpClient.delete(url, { headers: this.header }));
}
/**
@@ -58,9 +58,9 @@ export class HttpClientService {
paramsString.push([key, params[key]].join('='))
}
}
return this.commonProcess(this.httpClient.get(encodeURI(url + paramsString.join('&') + '&t=' + t), options));
return this.commonProcess(this.httpClient.get(encodeURI(url + paramsString.join('&') + '&t=' + t), { headers: this.header }));
} else {
return this.commonProcess(this.httpClient.get(url + 't=' + t, options));
return this.commonProcess(this.httpClient.get(url + 't=' + t, { headers: this.header }));
}
}
@@ -70,7 +70,7 @@ export class HttpClientService {
* @param options
*/
head(url: string, options?): Observable<any> {
return this.commonProcess(this.httpClient.head(url, options));
return this.commonProcess(this.httpClient.head(url, { headers: this.header }));
}
/**
@@ -79,7 +79,7 @@ export class HttpClientService {
* @param options
*/
options(url: string, options?): Observable<any> {
return this.commonProcess(this.httpClient.options(url, options));
return this.commonProcess(this.httpClient.options(url, { headers: this.header }));
}
/**
@@ -88,7 +88,7 @@ export class HttpClientService {
* @param options
*/
patch(url: string, body?, options?): Observable<any> {
return this.commonProcess(this.httpClient.patch(url, body, options));
return this.commonProcess(this.httpClient.patch(url, body, { headers: this.header }));
}
@@ -99,7 +99,7 @@ export class HttpClientService {
* @param options
*/
post(url: string, body?, options?): Observable<any> {
return this.commonProcess(this.httpClient.post(url, body, options));
return this.commonProcess(this.httpClient.post(url, body, { headers: this.header }));
}
/**
@@ -108,7 +108,7 @@ export class HttpClientService {
* @param options
*/
put(url: string, body?, options?): Observable<any> {
return this.commonProcess(this.httpClient.put(url, body, options));
return this.commonProcess(this.httpClient.put(url, body, { headers: this.header }));
}
/**