在angular2中對接口的健壯性處理(錯誤處理)

以前的處理 在寫接口調用處理數據時,我以前一直用的是async/await,即便返回非200,我也能處理,就像這樣:web const { data: res } = await this.$http.get('categories', { params: this.querInfo }) if (res.meta.status !== 200) { return th
相關文章
相關標籤/搜索