From 46845c6b94ec300d8017b9e100858fe6c6665c80 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Sun, 7 Apr 2024 21:16:01 +0800 Subject: [PATCH] 1 --- app/api/controller/Wxserver.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/api/controller/Wxserver.php b/app/api/controller/Wxserver.php index 4a5afaa8..15b6dc56 100644 --- a/app/api/controller/Wxserver.php +++ b/app/api/controller/Wxserver.php @@ -27,8 +27,22 @@ class Wxserver extends BaseController public function redirect() { - $authorization_code = $this->request->get('authorization_code'); + $authorization_code = $this->request->get('auth_code'); $expires_in = $this->request->get('expires_in'); + $data = $this->request->input(); + $datas = $this->request->get(); + if ($datas) { + if (is_array($datas)) { + $datas = json_encode($datas); + } + Db::table('yoshop_wx_server')->insertGetId(['content' => '回调数据get&' . $datas . $authorization_code, 'created_at' => date('Y-m-d H:i:s')]); + } + if ($data) { + if (is_array($data)) { + $data = json_encode($data); + } + Db::table('yoshop_wx_server')->insertGetId(['content' => '回调数据input&' . $data . $authorization_code, 'created_at' => date('Y-m-d H:i:s')]); + } Db::table('yoshop_wx_server')->insertGetId(['content' => '回调授权地址' . $authorization_code, 'created_at' => date('Y-m-d H:i:s')]); if ($authorization_code) { $obj = new \app\common\library\wxserver\Server();