Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axios与mock冲突导致responseType失效 #226

Closed
1 task
caoxiaotong opened this issue Dec 21, 2022 · 1 comment
Closed
1 task

Axios与mock冲突导致responseType失效 #226

caoxiaotong opened this issue Dec 21, 2022 · 1 comment

Comments

@caoxiaotong
Copy link

Basic Info

  • Package Name And Version: arco-design-pro-vue@2.5.14
  • Browser: chrome107.0.0.0

Steps to reproduce

return axios.get("/public/code", {
params: params,
responseType:'arraybuffer'
});
已设置responseType但是在axios.interceptors.request.use并不生效,axios.interceptors.response.use返回的里面也不生效。然后在请求拦截器里面手动设置也不生效。 最终在PanJiaChen/vue-element-admin#1466 这个里面也发现类似的问题。
我这边目前的解决办法是吧mock给注释了 就可以正常使用了

@sHow8e
Copy link
Member

sHow8e commented Dec 22, 2022

@caoxiaotong 这个好像是mockjs的问题。不过如果你有自己的接口可以替换mockjs。

@sHow8e sHow8e closed this as completed Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants