From caa86ef3c944073b8cfb6440268d857e5365b6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D?= <邮箱> Date: Mon, 31 Jul 2023 15:25:53 +0800 Subject: [PATCH] get_openid --- mobile/get_openid.php | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 mobile/get_openid.php diff --git a/mobile/get_openid.php b/mobile/get_openid.php new file mode 100644 index 0000000..079fadc --- /dev/null +++ b/mobile/get_openid.php @@ -0,0 +1,68 @@ +openid); + + + // $client = new \GuzzleHttp\Client(); + // $response = $client->request('GET', $token_url); + // $result = json_decode($response->getBody(), true); + // $openid = $result['openid']; + + // // 在这里处理获取到的openid + // echo $openid; +} else { + // 如果没有授权,则重定向到授权页面 + header('Location: ' . $auth_url); + var_dump($_GET['code']); + exit(); +} +?> \ No newline at end of file