小程序登录code拿不到uoionid,即使是同一个用户关注了同账号主体的公众号也拿不到unionid;还有前端wx.getUserInfo拿到encryptedData,iv 两个字段后端解密也不能拿到unionid字段;返回结果如下:
{"country":"China","watermark":{"appid":"wx8717d9fda7378685","timestamp":1591251265},"gender":1,"province":"Zhejiang","city":"Hangzhou","avatarUrl":"https://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTJw8uygf1dGIhPE1SBIicKib1oudLfhXGMVib03IXiaPvZYeQLXMOibxyicpb4Q8dyohepq9ZPhT2lPzElw/132","openId":"odZSg4kQ1gMgX5ZRxfMMy3YTu1vk","nickName":"👺一只羊","language":"zh_CN"}
需要用到微信开放平台,然后在开放平台上关联小程序和公众号才行
微信开发平台 配置是不是出问题了,