初始化项目:添加后端代码、ThinkPHP框架、前端资源
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\app\agent;
|
||||
|
||||
use app\common\controller\Api;
|
||||
|
||||
/**
|
||||
* 成员
|
||||
*/
|
||||
class Member extends Api
|
||||
{
|
||||
|
||||
protected $noNeedLogin = [];
|
||||
// 无需鉴权的接口,*表示全部
|
||||
protected $noNeedRight = ['*'];
|
||||
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
|
||||
\app\common\model\fill\Handle::check('app_config','agent');
|
||||
|
||||
$this->model = new \app\common\model\app\agent\Member();
|
||||
}
|
||||
|
||||
public function getMember(){
|
||||
$data = $this->model->getMember($this->auth->id);
|
||||
|
||||
|
||||
$this->success('获取成功',$data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户统计数据
|
||||
* @return void
|
||||
*/
|
||||
public function getMemberTotal(){
|
||||
|
||||
$data = (new \app\common\model\app\agent\Member)->getMemberStatistics($this->auth->id);
|
||||
|
||||
$this->success('获取成功',$data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user