https://api.weixin.qq.com/sns/component/jscode2session
请求该接口返回结果:{"session_key":"E4pm01JrWDL2Wmh+rx6WvQ==","openid":"ojtgp5EJVYKwBxyI6u93HxL9HGQw"}
可是文档里明明说返回的数据结构是:
{
"openid": "OPENID",
"session_key": "SESSIONKEY",
"unionid":"oHAUs6LSuwgHq-mlnFrffKXw3QYM"
}
你好,小程序绑定open帐号(开放平台帐号)才会返回 unionid。参考https://developers.weixin.qq.com/doc/oplatform/Third-party_Platforms/2.0/product/Open_Platform_Account_Management.html