code无效,给你方法

public function login(Request $request){        request->getContent();        if(empty($json_code)){            return ‘Code不能为空’;        }                $code = json_decode($json_code);

       $re_session = json_decode($this->request_http(‘https://api.weixin.qq.com/sns/jscode2session?appid=‘.APPLET\_APPID.’&secret=‘.APPLET\_APPSECRET.’&js\_code=‘.$code->code.’&grant\_type=authorization\_code’));                if(!empty($re_session->errcode)){            return code->code;        }        return re_session->session_key;    }

php laravel框架代码 APPLET_APPSECRET和APPLET_APPID常量准确无错!心态都没了

开发工具中调试返回 invalid code, hints: [ req_id: 9g1hIA0793th45 ]

如果第二次使用同一code,51小 程序:置顶的小程序,用户退出微信(或系统强退)后,再进微信,置顶的小程序会 …。又正常显示code已被使用,真心难搞

 

爱盈利-运营小咖秀(www.aiyingli.com) 始终坚持研究分享移动互联网App运营推广经验、策略、全案、渠道等纯干货知识内容;是广大App运营从业者的知识启蒙、成长指导、进阶学习的集聚平台;

想了解更多移动互联网干货知识,请关注微信公众号运营小咖秀(ID: yunyingshow)