first commit
This commit is contained in:
32
application/openapi/controller/Wechat.php
Normal file
32
application/openapi/controller/Wechat.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
// +------------------------------------------------+
|
||||
// |http://www.cjango.com |
|
||||
// +------------------------------------------------+
|
||||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||||
// +------------------------------------------------+
|
||||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||||
// +------------------------------------------------+
|
||||
namespace app\openapi\controller;
|
||||
|
||||
use cjango\Wechat as Wx;
|
||||
use think\Config;
|
||||
use think\Request;
|
||||
|
||||
class Wechat
|
||||
{
|
||||
|
||||
private $request;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$config = Config::get('wechat');
|
||||
Wx::instance($config);
|
||||
Wx::valid();
|
||||
$this->request = Wx\Reply::request();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
Wx\Reply::response($this->request['content']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user