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.
30 lines
739 B
30 lines
739 B
import {Injectable} from '@angular/core';
|
|
import {Observable} from 'rxjs';
|
|
import {HttpInterface} from './interface/HttpInterface';
|
|
import {catchError} from 'rxjs/operators';
|
|
import {JSONRequest} from './interface/JSONRequest';
|
|
import {HttpClient} from '@angular/common/http';
|
|
import {EmailTypeResponse} from './interface/Response';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class AppService extends JSONRequest {
|
|
|
|
constructor(
|
|
private http: HttpClient,
|
|
) {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* 获取邮箱类型
|
|
*/
|
|
getEmailType(): Observable<EmailTypeResponse> {
|
|
return this.http.get<EmailTypeResponse>(HttpInterface.getEmailType)
|
|
.pipe(
|
|
catchError(this.handleError<any>('获取邮箱类型'))
|
|
);
|
|
}
|
|
|
|
}
|
|
|