|
|
@ -12,7 +12,7 @@ $redirect_uri = 'https://shop.heavenk.com/mobile/blank.php'; // 回调URL |
|
|
|
|
|
|
|
|
// 获取授权 code |
|
|
// 获取授权 code |
|
|
if (!isset($_GET['code'])) { |
|
|
if (!isset($_GET['code'])) { |
|
|
$url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $app_id . '&redirect_uri=' . urlencode($redirect_uri) . '&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'; |
|
|
$url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $appid . '&redirect_uri=' . urlencode($redirect_uri) . '&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect'; |
|
|
header('Location: ' . $url); |
|
|
header('Location: ' . $url); |
|
|
exit; |
|
|
exit; |
|
|
} |
|
|
} |
|
|
|