Closed enjoyfans closed 7 years ago
本地tomcat安装ssl 参考https://tomcat.apache.org/tomcat-9.0-doc/ssl-howto.html#Configuration
登录https://mp.weixin.qq.com/ 微信公众平台,生成AppSecret(小程序密钥),然后更新会话服务器db(cauth),设置小程序ID,和密钥 update cAppinfo set secret='生成的密钥' where appid='你的小程序ID'; 执行完毕后,#40029 - WEIXIN_CODE_ERR 错误不再出现。
本地部署之后(业务服务器,会话管理服务器都在本地localhost),调用微信服务器jscode2session之后报错 log如下: \mina_auth\index.php:13|{"returnCode":40029,"returnMessage":"WEIXIN_CODE_ERR","returnData":"","version":1,"componentName":"MA"}
这是怎么回事? 微信小程序客户端使用客户端示例Demo和qcloud-weapp-client-sdk。 小程序已经有appId,没有起名,没有发布,仅仅是在编码测试阶段,小程序使用http方式登录会话。 是因为http调用么?必须使用https方式?
var host = 'localhost:8080/com.qcloud.weapp.demo'; // 登录地址,用于建立会话 //loginUrl:
https://${host}/login
, loginUrl:http://${host}/login
,