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

43 lines
1.0 KiB

11 months ago
<?php
11 months ago
declare (strict_types=1);
11 months ago
namespace app\api\controller;
use cores\BaseController;
11 months ago
class Wxserver extends BaseController
11 months ago
{
11 months ago
public function index()
{
$obj = new \app\common\library\wxserver\Server();
11 months ago
$img = $obj->getQrcode('wxe3ed157849bd07b5');
$img_url = '';
if ($img) {
$img_url = $this->request->domain(true) . $img;
}
11 months ago
return $this->renderSuccess(['url' => $img_url]);
11 months ago
}
11 months ago
public function verifyTicket()
{
11 months ago
$xmlData = file_get_contents("php://input");
$obj = new \app\common\library\wxserver\Server();
$obj->getVerifyTicket($xmlData);
11 months ago
echo 'success';
}
11 months ago
public function redirect()
{
11 months ago
$authorization_code = $this->request->get('auth_code');
11 months ago
if ($authorization_code) {
$obj = new \app\common\library\wxserver\Server();
$obj->authorizationInfo($authorization_code);
}
11 months ago
echo 'success';
11 months ago
}
11 months ago
public function callback($appid)
{
echo 'success';
}
11 months ago
}