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() public function index()
{ {
// $appid = 'wx1814307a39775007'; $appid = 'wx35f6c598106b9149';
// $obj = new \app\common\library\wxserver\Server(); $template_id = 6;
// $arr = $obj->getPrivacySetting($appid); $obj = new \app\common\library\wxserver\Server();
// $arr2 = $obj->setDomain($appid, $this->request->domain(true)); $arr = $obj->commit($appid, $template_id);
// return $this->renderSuccess(['arr' => $arr, 'arr2' => $arr2]); return $this->renderSuccess(['arr' => $arr]);
} }

@ -229,6 +229,8 @@ 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);
dump($result);
exit();
if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') { if ($result && !empty($result['errmsg']) && $result['errmsg'] == 'ok') {
//体验码 //体验码
$qr_code = $this->getQrcode($appid); $qr_code = $this->getQrcode($appid);

Loading…
Cancel
Save