diff --git a/app/api/controller/Wxserver.php b/app/api/controller/Wxserver.php index 390d8697..b3b1cccf 100644 --- a/app/api/controller/Wxserver.php +++ b/app/api/controller/Wxserver.php @@ -15,11 +15,11 @@ class Wxserver extends BaseController public function index() { -// $appid = 'wx1814307a39775007'; -// $obj = new \app\common\library\wxserver\Server(); -// $arr = $obj->getPrivacySetting($appid); -// $arr2 = $obj->setDomain($appid, $this->request->domain(true)); -// return $this->renderSuccess(['arr' => $arr, 'arr2' => $arr2]); + $appid = 'wx35f6c598106b9149'; + $template_id = 6; + $obj = new \app\common\library\wxserver\Server(); + $arr = $obj->commit($appid, $template_id); + return $this->renderSuccess(['arr' => $arr]); } diff --git a/app/common/library/wxserver/Server.php b/app/common/library/wxserver/Server.php index 80c288c0..80a13d8b 100644 --- a/app/common/library/wxserver/Server.php +++ b/app/common/library/wxserver/Server.php @@ -229,6 +229,8 @@ 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); + dump($result); + exit(); if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { //体验码 $qr_code = $this->getQrcode($appid);