axios发送请求报错:Cannot read property 'cancelToken' of undefined

 

 

 原因:

  在使用axios的拦截器时,没有添加返回值  return  config

方法:

  在请求拦截器中添加 return config,  (!!!注意响应拦截器中也要添加返回值)

 

 

 

posted @ 2020-05-20 15:00  葡萄想柠檬  Views(9743)  Comments(0Edit  收藏  举报
目录代码