diff --git a/extend/basic/WapBasic.php b/extend/basic/WapBasic.php index b45347a7..55e58a83 100755 --- a/extend/basic/WapBasic.php +++ b/extend/basic/WapBasic.php @@ -319,7 +319,7 @@ class WapBasic extends Controller if (!isset($userInfoCong['openid'])) { throw new ValidateException('openid获取失败'); } - +/* try { //解密获取用户信息 $userInfo = MiniProgramService::encryptor($session_key, $iv, $encryptedData); @@ -327,7 +327,7 @@ class WapBasic extends Controller if ($e->getCode() == '-41003') { throw new ValidateException('获取会话密匙失败'); } - } + }*/ $userInfo['unionId'] = isset($userInfoCong['unionid']) ? $userInfoCong['unionid'] : ''; $userInfo['openId'] = $openid = $userInfoCong['openid']; @@ -546,13 +546,13 @@ class WapBasic extends Controller */ public function routineOauth($routine) { - $routineInfo['nickname'] = filter_emoji($routine['nickName']); //姓名 + $routineInfo['nickname'] = filter_emoji($routine['nickName'] ?? ''); //姓名 $routineInfo['sex'] = isset($routine['gender']) ?? 0; //性别 $routineInfo['language'] = isset($routine['language']) ?? ''; //语言 $routineInfo['city'] = isset($routine['city']) ?? ''; //城市 $routineInfo['province'] = isset($routine['province']) ?? ''; //省份 $routineInfo['country'] = isset($routine['country']) ?? ''; //国家 - $routineInfo['headimgurl'] = $routine['avatarUrl']; //头像 + $routineInfo['headimgurl'] = $routine['avatarUrl'] ?? ''; //头像 $routineInfo['openid'] = $routine['openId']; $routineInfo['session_key'] = isset($routine['session_key']) ?? ''; //会话密匙 $routineInfo['unionid'] = $routine['unionId']; //用户在开放平台的唯一标识符