You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/app/api/controller/Wxserver.php

42 lines
1.0 KiB

10 months ago
<?php
10 months ago
declare (strict_types=1);
10 months ago
namespace app\api\controller;
use cores\BaseController;
9 months ago
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
10 months ago
10 months ago
class Wxserver extends BaseController
10 months ago
{
public function verifyTicket()
{
10 months ago
$xmlData = file_get_contents("php://input");
$obj = new \app\common\library\wxserver\Server();
$obj->getVerifyTicket($xmlData);
10 months ago
echo 'success';
}
10 months ago
9 months ago
/**
* @notes:授权回调
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
* @author: wanghousheng
*/
10 months ago
public function redirect()
{
10 months ago
$authorization_code = $this->request->get('auth_code');
10 months ago
if ($authorization_code) {
$obj = new \app\common\library\wxserver\Server();
$obj->authorizationInfo($authorization_code);
}
10 months ago
echo 'success';
10 months ago
}
10 months ago
public function callback($appid)
{
echo 'success';
}
10 months ago
}