File size: 574 Bytes
a4a352b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<?php
namespace app\api\controller;
use think\Controller;
use app\common\util\WechatPublic as wcOper;
class Wechat extends Base
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$config = config('maccms.weixin');
if($config['status'] ==0){
echo 'closed';
exit;
}
$wechatObj = new wcOper($config);
if (isset($_GET['echostr'])) {
$wechatObj->valid();
}
else {
$wechatObj->responseMsg();
}
}
}
|