From 2235e975b5cfa33d0f10d1ddb3c0c1a2d3410aaf Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 17 Aug 2023 15:15:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=8E=A8=E9=80=81=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/JgPush.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/common/service/JgPush.php b/app/common/service/JgPush.php index 0bd377d5..43cd3840 100644 --- a/app/common/service/JgPush.php +++ b/app/common/service/JgPush.php @@ -30,6 +30,9 @@ class JgPush $groupOrder = app()->make(StoreGroupOrderRepository::class)->get($data['id']); if ($groupOrder) { foreach ($groupOrder->orderList as $order) { + $this->client = new Client('b5f679f4357018605ea6fd2e', 'c4fb573758f8d7058d697c54'); + $this->push = $this->client->push(); + $this->setPlatform(); $route = "/pages/admin/orderDetail/index?id={$order['order_id']}&mer_id={$order['mer_id']}"; $merUserId = Merchant::where('mer_id', $order->mer_id)->value('uid'); $jgRegisterId = User::where('uid', $merUserId)->value('jg_register_id'); @@ -42,6 +45,7 @@ class JgPush $this->androidNotification($msg, ['extras' => ['route' => $route, 'type' => $msgType]]); $this->iosNotification($msg, ['extras' => ['route' => $route, 'type' => $msgType]]); $this->push->send(); + unset($this->client, $this->push); } } break;