摘要: angular5之后使用pipe this.http.get('url') .pipe( timeout(1000), catchError(e => { return of(null); }) ).toPromise().then( res => { //成功 }).catch(e => { // 阅读全文
posted @ 2022-09-16 21:16 chinadba 阅读(418) 评论(0) 推荐(0) 编辑