wx.login({success:function(res){if(res.code){// res.code是js_codeconsole.log('获取到的js_code:'+res.code);// 将js_code发送到后端fetch('/your-backend-endpoint',{method:'POST',body:JSON.stringify({code:res.code}),header
//获取code值 let code = req.query.code; //通过code换取网页授权access_token https.requestGet(`https://api.weixin.qq.com/sns/oauth2/access_token?appid=${config.appID}&secret=${config.appScrect}&code=${code}&grant_type=authorization_code`).then(function (data) { let {access_token,openid...