小程序unionid有的时候能获取到,有的时候获取不到是怎么回事?
发布于 6 年前 作者 xfang 1941 次浏览 来自 问答
String userInfo = WXCore.decrypt(appid, encryptedData, sessionKey, ivs);			
JSONObject user = ((JSONObject) JSONObject.parse(userInfo));
String phoneNumber = user.getString("phoneNumber");
Map<String, Object> sessionKeyMap = miniprogramSessionRedis.getMiniprogramSession(sessionKey);
Log.debug("decryptWxEncryptedData,sessionKeyMap={}", sessionKeyMap);

 小程序获取openid和unionid  有的时候unionid是有的,有的时候没有有的时候 连续请求四五次  有一次能有,有的时候每次都能拿到
 请问下官方这是什么问题
回到顶部