我正在使用axios在Nuxt服务器init中获取数据,请求失败,状态码为401,并且createError
await $axios
.get("/shopping/get-wishlist")
.then(response => {
commit('setWishlist', response.data.payload.wishlist)
})
.catch(error => {
console.log(error);
});
await $axios
.get("/shopping/get-cart")
.then(response => {
commit('setBasketList', response.data.payload.cart.items)
})
.catch(err => {
console.log(err);
});
}, ```
```at createError (node_modules\axios\lib\core\createError.js:16:15)```