去除测试标签

This commit is contained in:
wucongxing 2023-02-20 08:46:10 +08:00
parent a0b57c3dfc
commit 00e42df556

View File

@ -31,19 +31,19 @@ class LoginService extends BaseService
$weChat = $this->container->get(WeChat::class);
// // 获取手机号
// $phone_info = $weChat->getPhone($phone_code);
// if (empty($phone_info) || empty($phone_info['phone_info']) || empty($phone_info['phone_info']['purePhoneNumber'])){
// return fail(HttpEnumCode::GET_WX_ERROR);
// }
$phone_info['phone_info']['purePhoneNumber'] = "18221234161";
// 获取手机号
$phone_info = $weChat->getPhone($phone_code);
if (empty($phone_info) || empty($phone_info['phone_info']) || empty($phone_info['phone_info']['purePhoneNumber'])){
return fail(HttpEnumCode::GET_WX_ERROR);
}
// $phone_info['phone_info']['purePhoneNumber'] = "18221234161";
// 获取用户openid
// $wx_info_data = $weChat->codeToSession($wx_code);
$wx_info_data = array(
"session_key" => "SWfpkHtKZRq/G0ONoxigaQ==",
"openid" => "o9gYG441zEAHuYoNX7lwFKiQBzKE",
);
$wx_info_data = $weChat->codeToSession($wx_code);
// $wx_info_data = array(
// "session_key" => "SWfpkHtKZRq/G0ONoxigaQ==",
// "openid" => "o9gYG441zEAHuYoNX7lwFKiQBzKE",
// );
if (empty($wx_info_data['session_key']) || empty($wx_info_data['openid'])) {
return fail(HttpEnumCode::GET_WX_ERROR);
}