微信小程序请求wx.request报400(Bad Request)解决
问题:使用微信小程序用户授权登录要去后台请求openid时,POST请求一直报错。微信小程序wx.request使用GET请求时请求头默认自带header:{"Content-Type": "application/json"}wx.getUserProfile({ desc:"用于完善会员资料", success: (res) => { console.log(res) this.hasUserInfo = true; this.userInfo = res.us
原创
2022-04-14 15:32:26 ·
6069 阅读 ·
2 评论