wang hou sheng 8 months ago
parent c3733e04e2
commit 453cb71d43
  1. 32
      app/admin/controller/Wxserve.php

@ -176,16 +176,16 @@ class Wxserve extends Controller
*/ */
public function commit(): Json public function commit(): Json
{ {
$appid = $this->request->get('appid'); $appids = $this->request->get('appid');
if (!is_array($appids)) {
$appids = [$appids];
}
$template_id = $this->request->get('template_id'); $template_id = $this->request->get('template_id');
if ($appid && $template_id) { if ($appids && $template_id) {
$appids = explode(',', $appid); foreach ($appids as $item) {
if ($appids) { WxserverJob::dispatch(['appid' => $item, 'template_id' => $template_id]);
foreach ($appids as $item) {
WxserverJob::dispatch(['appid' => $item, 'template_id' => $template_id]);
}
return $this->renderSuccess('success');
} }
return $this->renderSuccess('success');
} }
return $this->renderError('操作失败'); return $this->renderError('操作失败');
} }
@ -214,15 +214,15 @@ class Wxserve extends Controller
*/ */
public function audit(): Json public function audit(): Json
{ {
$appid = $this->request->get('appid'); $appids = $this->request->get('appid');
if ($appid) { if (!is_array($appids) && $appids) {
$appids = explode(',', $appid); $appids = [$appids];
if ($appids) { }
foreach ($appids as $item) { if ($appids) {
WxserverJob::dispatch(['appid' => $item]); foreach ($appids as $item) {
} WxserverJob::dispatch(['appid' => $item]);
return $this->renderSuccess('success');
} }
return $this->renderSuccess('success');
} }
return $this->renderError('操作失败'); return $this->renderError('操作失败');
} }

Loading…
Cancel
Save