正在显示
1 个修改的文件
包含
7 行增加
和
6 行删除
@@ -29,14 +29,15 @@ class Login extends Base | @@ -29,14 +29,15 @@ class Login extends Base | ||
29 | $encryptedData = $post['encryptedData'];//I('post.encryptedData'); | 29 | $encryptedData = $post['encryptedData'];//I('post.encryptedData'); |
30 | $iv = $post['iv'];//I('post.iv'); | 30 | $iv = $post['iv'];//I('post.iv'); |
31 | 31 | ||
32 | - if ($post['type'] == 1) { | 32 | +// if ($post['type'] == 1) { |
33 | +// $encryptedData = urldecode($encryptedData); | ||
34 | +// $iv = urldecode($iv); | ||
35 | +//// file_put_contents("ccc.txt", "授权A:" . date("Y-m-d H:i:s") . ":" . $encryptedData . PHP_EOL, FILE_APPEND); | ||
36 | +//// file_put_contents("ccc.txt", "授权B:" . date("Y-m-d H:i:s") . ":" . $iv . PHP_EOL, FILE_APPEND); | ||
37 | +// | ||
38 | +// } | ||
33 | $encryptedData = urldecode($encryptedData); | 39 | $encryptedData = urldecode($encryptedData); |
34 | $iv = urldecode($iv); | 40 | $iv = urldecode($iv); |
35 | -// file_put_contents("ccc.txt", "授权A:" . date("Y-m-d H:i:s") . ":" . $encryptedData . PHP_EOL, FILE_APPEND); | ||
36 | -// file_put_contents("ccc.txt", "授权B:" . date("Y-m-d H:i:s") . ":" . $iv . PHP_EOL, FILE_APPEND); | ||
37 | - | ||
38 | - } | ||
39 | - | ||
40 | $url = "https://api.weixin.qq.com/sns/jscode2session?appid=" . $appid . "&secret=" . $AppSecret . "&js_code=" . $code . "&grant_type=authorization_code"; | 41 | $url = "https://api.weixin.qq.com/sns/jscode2session?appid=" . $appid . "&secret=" . $AppSecret . "&js_code=" . $code . "&grant_type=authorization_code"; |
41 | $res = json_decode(http_request($url), true); | 42 | $res = json_decode(http_request($url), true); |
42 | if (!$res) { | 43 | if (!$res) { |
-
请 注册 或 登录 后发表评论