个人案例
- 国奥职校
学校官网专用小程序,喜欢的可以进来交流学习
国奥职校扫码体验
- openid获取失败?data: {errcode: 40066, errmsg: "invalid
前端发送code到后端 wx.login({ success: (res) => { const usercode=res.code myrequest({url:'/getopenid',data: {usercode:usercode},method: 'POST'}).then(res1=>{ console.log(res1) }) 后端正常接收 [Object: null prototype] { usercode: '0e3p9p1w3uYLA03L3k4w3wiXaF3p9p1J' } 后端代码 exports.getopenid=async (req,res)=>{ const code=req.body console.log(code) var params = { grant_type:'authorization_code', appid: '正确在详情里复制', //secret 更新时间20230504 secret: '已经于20230504重置并更新', js_code:code } params=JSON.stringify(params) axios({ method:'GET', url:'https://api.weixin.qq.com/sns/jscode2session'+params }).then(res2=>{ res.send(res2.data) }) } 前端收到的返回信息 {data: {…}, header: {…}, statusCode: 200, cookies: Array(0), errMsg: "request:ok"}cookies: []data: {errcode: 40066, errmsg: "invalid url, rid: 6453aca1-0ab89620-2cd6e1ce"}errMsg: "request:ok"header: {X-Powered-By: "Express", Access-Control-Allow-Origin: "*", Content-Type: "application/json; charset=utf-8", Content-Length: "73", ETag: "W/"49-BmpGmYt4SlV421N/g74TFXpWHNA"", …}statusCode: 200__proto__: Object请求大师指点,不想开云
2023-05-04 - 如何更换开发者?我的微信更换了
如何更换开发者?我的微信更换了
2022-10-19