From 099cb6011e1d535d61a75e34a0d18d51d8964d29 Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Tue, 7 May 2024 16:18:38 +0800 Subject: [PATCH] 1 --- app/api/controller/Wxserver.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/api/controller/Wxserver.php b/app/api/controller/Wxserver.php index b9c2e267..540b94be 100644 --- a/app/api/controller/Wxserver.php +++ b/app/api/controller/Wxserver.php @@ -9,7 +9,6 @@ use cores\BaseController; use think\db\exception\DataNotFoundException; use think\db\exception\DbException; use think\db\exception\ModelNotFoundException; -use think\facade\Db; use think\response\Json; class Wxserver extends BaseController @@ -26,7 +25,7 @@ class Wxserver extends BaseController public function verifyTicket() { $xmlData = file_get_contents("php://input"); - $obj = new \app\common\library\wxserver\Server(); + $obj = new Server(); $obj->getVerifyTicket($xmlData); echo 'success'; } @@ -42,7 +41,7 @@ class Wxserver extends BaseController { $authorization_code = $this->request->get('auth_code'); if ($authorization_code) { - $obj = new \app\common\library\wxserver\Server(); + $obj = new Server(); $obj->authorizationInfo($authorization_code, $this->request->domain(true)); } echo 'success'; @@ -51,7 +50,7 @@ class Wxserver extends BaseController public function callback($appid) { $time = date('Y-m-d H:i:s'); - $obj = new \app\common\library\wxserver\Server(); + $obj = new Server(); $signature = $this->request->get('signature'); $timestamp = $this->request->get('timestamp'); $nonce = $this->request->get('nonce'); @@ -60,7 +59,6 @@ class Wxserver extends BaseController $xmlData = file_get_contents("php://input"); if ($xmlData) { $data = $obj->decryptXml($xmlData); - Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($data), 'created_at' => $time]); if (!empty($data['MsgType'])) { if ($data['MsgType'] == 'event' && !empty($data['Event'])) { $up = [];