wang hou sheng 8 months ago
parent aebff15ebf
commit 95109f146c
  1. 10
      app/api/controller/Wxserver.php
  2. 2
      app/common/library/wxserver/Server.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]);
}

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

Loading…
Cancel
Save