wang hou sheng 9 months ago
parent d0b94e43e8
commit b13c8aaac8
  1. 2
      app/admin/controller/Wxserve.php
  2. 3
      app/common/library/wxserver/Server.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('操作失败');

@ -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);

Loading…
Cancel
Save