You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
pocketcommunityweb/src/app/app.service.ts

30 lines
738 B

import {Injectable} from '@angular/core';
import {Observable} from 'rxjs';
import {JSONResponse} from './interface/JSONResponse';
import {HttpInterface} from './interface/HttpInterface';
import {catchError} from 'rxjs/operators';
import {JSONRequest} from './interface/JSONRequest';
import {HttpClient} from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class AppService extends JSONRequest {
constructor(
private http: HttpClient,
) {
super();
}
/**
* 获取邮箱类型
*/
getEmailType(): Observable<JSONResponse<any>> {
return this.http.get<JSONResponse<any>>(HttpInterface.getEmailType)
.pipe(
catchError(this.handleError<any>('获取邮箱类型'))
);
}
}