【问题标题】:Using store in interceptors axios? nuxt js在拦截器axios中使用商店? nuxt js
【发布时间】:2020-06-04 10:10:05
【问题描述】:

我使用interceptors 来捕获应用程序中的错误。如果捕获 401 错误,我想改变我的变量之一的状态。如何在 axios 拦截器中使用我的store?我在我的 nuxt-app 中使用类似 axios 的插件

【问题讨论】:

    标签: axios nuxt.js


    【解决方案1】:

    // inside my axios configuration
    export default function({ $axios, store }) {}

    【讨论】:

      猜你喜欢
      • 2020-06-19
      • 2020-10-01
      • 2020-07-26
      • 2018-11-06
      • 2019-06-26
      • 2018-06-05
      • 2020-11-28
      • 2019-03-15
      • 1970-01-01
      相关资源
      最近更新 更多