From 8b5556aaee1d6e56ffc4e49c25ddf3010ec5973b Mon Sep 17 00:00:00 2001 From: wang hou sheng <76928547+wanghousheng@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:08:25 +0800 Subject: [PATCH] 1 --- app/admin/controller/Wxserve.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/admin/controller/Wxserve.php b/app/admin/controller/Wxserve.php index e50cdfbd..ec802f44 100644 --- a/app/admin/controller/Wxserve.php +++ b/app/admin/controller/Wxserve.php @@ -176,11 +176,9 @@ class Wxserve extends Controller */ public function commit(): Json { - $appids = $this->request->get('appid'); - if (!is_array($appids)) { - $appids = [$appids]; - } + $appid = $this->request->get('appid'); $template_id = $this->request->get('template_id'); + $appids = explode(',', $appid); if ($appids && $template_id) { foreach ($appids as $item) { WxserverJob::dispatch(['appid' => $item, 'template_id' => $template_id]); @@ -214,10 +212,8 @@ class Wxserve extends Controller */ public function audit(): Json { - $appids = $this->request->get('appid'); - if (!is_array($appids) && $appids) { - $appids = [$appids]; - } + $appid = $this->request->get('appid'); + $appids = explode(',', $appid); if ($appids) { foreach ($appids as $item) { WxserverJob::dispatch(['appid' => $item]);