diff --git a/app/admin/controller/Wxserve.php b/app/admin/controller/Wxserve.php index 1f3f5545..5dea8d36 100644 --- a/app/admin/controller/Wxserve.php +++ b/app/admin/controller/Wxserve.php @@ -166,7 +166,7 @@ class Wxserve extends Controller $obj = new Server(); $res = $obj->commit($appid, $template_id); if ($res) { - return $this->renderSuccess('success'); + return $this->renderSuccess($res); } } return $this->renderError('操作失败'); diff --git a/app/common/library/wxserver/Server.php b/app/common/library/wxserver/Server.php index 9a7cd23b..e6319c26 100644 --- a/app/common/library/wxserver/Server.php +++ b/app/common/library/wxserver/Server.php @@ -176,7 +176,7 @@ class Server * @throws BaseException * @author: wanghousheng */ - public function commit($appid, $template_id): bool + public function commit($appid, $template_id) { $version = ''; $access_token = $this->authorizerAccessToken($appid); @@ -204,6 +204,7 @@ class Server $url = 'https://api.weixin.qq.com/wxa/commit?access_token=' . $access_token; $result = $this->curlPost($url, json_encode($data)); $result = json_decode($result, true); + return $result; if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { //体验码 $qr_code = $this->getQrcode($appid);