修改文档

This commit is contained in:
Harry 2021-05-08 20:07:57 +08:00
parent 2927915a6c
commit 9d78bc439d

View File

@ -230,12 +230,13 @@ this.FesApi.setImportant({
```js ```js
// 参数支持: function, [function, function] // 参数支持: function, [function, function]
// 请求拦截 // 请求拦截
const eject = api.setReqInterceptor(function (config) { const eject = this.FesApi.setReqInterceptor(function (config) {
// do something // do something
return config
}) })
// 取消请求拦截 // 取消请求拦截
api.ejectReqInterceptor(eject); this.FesApi.ejectReqInterceptor(eject);
``` ```
### setResInterceptor & ejectResInterceptor ### setResInterceptor & ejectResInterceptor
@ -243,14 +244,15 @@ api.ejectReqInterceptor(eject);
```js ```js
// 参数支持: function, [function, function] // 参数支持: function, [function, function]
// 响应拦截 // 响应拦截
const eject = api.setResInterceptor((response) => { const eject = this.FesApi.setResInterceptor((response) => {
// do something // do something
return response
}, (error) => { }, (error) => {
// do somthing for error // do somthing for error
}) })
// 取消响应拦截 // 取消响应拦截
api.ejectResInterceptor(eject); this.FesApi.ejectResInterceptor(eject);
``` ```
## FesFesx ## FesFesx