fix result format

This commit is contained in:
Easy 2022-02-06 13:01:56 +08:00
parent b197b6fb23
commit 16ccf6c247

View File

@ -114,11 +114,11 @@ class PushDeerUserController extends Controller
} else { } else {
$url = "https://api2.pushdeer.com/login/unoinid?code=".urlencode($validated['code']); $url = "https://api2.pushdeer.com/login/unoinid?code=".urlencode($validated['code']);
$ret = json_decode(file_get_contents($url), true); $ret = json_decode(file_get_contents($url), true);
if (!$ret || !isset($ret['data']) || !isset($ret['data']['unionid'])) { if (!$ret || !isset($ret['content']) || !isset($ret['content']['unionid'])) {
return send_error("错误的Code", ErrorCode('REMOTE')); return send_error("错误的Code", ErrorCode('REMOTE'));
} }
$code_info = ['unionid'=>$ret['data']['unionid']]; $code_info = ['unionid'=>$ret['content']['unionid']];
} }
// 现在拿到unionid了 // 现在拿到unionid了