初始化项目:添加后端代码、ThinkPHP框架、前端资源
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\app\sign;
|
||||
|
||||
use app\common\controller\Api;
|
||||
|
||||
/**
|
||||
* 签到
|
||||
*/
|
||||
class Log extends Api
|
||||
{
|
||||
protected $noNeedLogin = [];
|
||||
protected $noNeedRight = ['*'];
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
|
||||
\app\common\model\fill\Handle::check('app_config','sign');
|
||||
}
|
||||
|
||||
|
||||
// 按月份获取签到记录
|
||||
public function getList()
|
||||
{
|
||||
$limit = input('limit',10);
|
||||
$page = input('page',1);
|
||||
|
||||
$where = [
|
||||
'user_id'=>$this->auth->id
|
||||
];
|
||||
$list = \app\api\model\app\sign\Log::where($where)
|
||||
->limit($limit)->page($page)
|
||||
->order('createtime','desc')
|
||||
->select();
|
||||
|
||||
$this->success('获取成功', $list);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user