After axios has set up the global interceptor, he wants to log in and request to cancel the interceptor. After reading the document, he can't use it.

the document is like this

var myInterceptor = axios.interceptors.request.use(function () {/*...*/});
axios.interceptors.request.eject(myInterceptor);

my Vue.prototype.$http = axios
is in login.vue, so is this correct?

var myInterceptor = this.$http.interceptors.request.use(function () {/*...*/});
this.$http.interceptors.request.eject(myInterceptor);

then request where to put it, function?

Mar.23,2021

the url, that determines the login request in the interceptor will not perform the following operation if it is the login url,.

Menu