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

支持uni-app吗,我在uni-app上使用了,小程序那边请求无法添加请求头信息 #57

Open
XinjieDang opened this issue Jul 11, 2024 · 1 comment

Comments

@XinjieDang
Copy link

问题是什么

请求头添加token config.headers['Authorization'] = userStore.getToken() ,请求实际打印config header里面有值,但是小程序无法识别,请求信息里面看不到设置的值

环境

  • 微信开发者工具:调试基础库:3.4.8
  • 微信版本:8.0.49
  • axios-miniprogram-adapter版本:0.3.5
  • uni-app 版本:3.0.0-4000820240401001
  • vue版本:3.4.21

在线例子

请求本地一个接口,需要token,发现设置了Authorization值,微信开发者工具那边请求头上没有设置上这个值,控制台打印 请求拦截器上有该值

报错信息

image
image
image
image

@gegehook
Copy link

我也遇到这个问题了。。。

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