wang hou sheng 8 months ago
parent 075bf1dd05
commit 556ab296a6
  1. 2
      app/admin/controller/Wxserve.php
  2. 2
      app/common/library/wxserver/Server.php

@ -154,7 +154,7 @@ class Wxserve extends Controller
$obj = new Server(); $obj = new Server();
$res = $obj->commit($appid, $template_id); $res = $obj->commit($appid, $template_id);
if ($res) { if ($res) {
return $this->renderSuccess('success'); return $this->renderSuccess([$res]);
} }
} }
return $this->renderError('操作失败'); return $this->renderError('操作失败');

@ -168,11 +168,13 @@ class Server
$url = 'https://api.weixin.qq.com/wxa/commit?access_token=' . $access_token; $url = 'https://api.weixin.qq.com/wxa/commit?access_token=' . $access_token;
$result = $this->curlPost($url, json_encode($data)); $result = $this->curlPost($url, json_encode($data));
$result = json_decode($result, true); $result = json_decode($result, true);
return $result;
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') {
$model->update(['version' => $version . $desc], ['id' => $info['id']]); $model->update(['version' => $version . $desc], ['id' => $info['id']]);
return true; return true;
} }
} }
return false;
} }
/** /**

Loading…
Cancel
Save