wang hou sheng 8 months ago
parent afd00b43fb
commit bd9af0a4c2
  1. 5
      app/common/library/wxserver/Server.php

@ -176,7 +176,7 @@ class Server
* @throws BaseException
* @author: wanghousheng
*/
public function commit($appid, $template_id)
public function commit($appid, $template_id): bool
{
$version = '';
$access_token = $this->authorizerAccessToken($appid);
@ -196,7 +196,7 @@ class Server
$data['template_id'] = $template_id;
$data['user_version'] = $version;
$data['user_desc'] = 'updated';
// $ext_json['extEnable'] = true;
$ext_json['extEnable'] = true;
$ext_json['extAppid'] = $appid;
$ext_json['ext']['store_id'] = $this->storeId($appid);
$ext_json['window'] = [];
@ -204,7 +204,6 @@ 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