mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-10-08 08:10:10 +08:00
36 lines
775 B
TypeScript
36 lines
775 B
TypeScript
/**
|
|
*
|
|
* @author Ray <https://github.com/XiaoDaiGua-Ray>
|
|
*
|
|
* @date 2023-10-23
|
|
*
|
|
* @workspace ray-template
|
|
*
|
|
* @remark 今天也是元气满满撸代码的一天
|
|
*/
|
|
|
|
import { useAxiosInterceptor } from '@/axios/utils/interceptor'
|
|
import implement from './provider'
|
|
|
|
const { setImplement } = useAxiosInterceptor()
|
|
|
|
export const setupRequestInterceptor = () => {
|
|
const { implementRequestInterceptorArray } = implement
|
|
|
|
setImplement(
|
|
'implementRequestInterceptorArray',
|
|
implementRequestInterceptorArray,
|
|
'ok',
|
|
)
|
|
}
|
|
|
|
export const setupRequestErrorInterceptor = () => {
|
|
const { implementRequestInterceptorErrorArray } = implement
|
|
|
|
setImplement(
|
|
'implementRequestInterceptorErrorArray',
|
|
implementRequestInterceptorErrorArray,
|
|
'error',
|
|
)
|
|
}
|