代码框架:

var t = [o, undefined];
n = Promise.resolve(e);
this.interceptors.request.forEach((function(e){
    t.unshift(e.fulfilled, e.rejected)
})),

t = [aa, bb, o, undefined]
this.interceptors.response.forEach((function(e){
    t.push(e.fulfilled, e.rejected)
}));

t = [aa, bb, o, undefined, cc, dd]
for (; t.length;) {
    n = n.then(t.shift(), t.shift());
    n = n.then(aa, bb); // 请求发送之前
    n = n.then(o, undefined); // 发请求
    n = n.then(cc, dd); // 响应回来之后,干什么
}

// 使用拦截器 -> 请求
axios.interceptors.request.use(function(){aa}, function(){bb})
// 使用拦截器 -> 响应
axios.interceptors.response.use(function(){cc}, function(){dd})

// t里面装的是完整的流程
// [请求拦截器,o, undefined, 响应拦截器]