mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
commit
9d99fef0d0
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user