42 lines
771 B
PHP
42 lines
771 B
PHP
<?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);
|
|
|
|
}
|
|
|
|
|
|
} |