38 lines
1.2 KiB
PHP
38 lines
1.2 KiB
PHP
<?php
|
||
// +------------------------------------------------+
|
||
// |http://www.cjango.com |
|
||
// +------------------------------------------------+
|
||
// | 修复BUG不是一朝一夕的事情,等我喝醉了再说吧! |
|
||
// +------------------------------------------------+
|
||
// | Author: 小陈叔叔 <Jason.Chen> |
|
||
// +------------------------------------------------+
|
||
namespace app\mobile\controller;
|
||
|
||
use app\common\model\Score as ScoreModel;
|
||
use app\common\model\ScoreRules as ScoreRulesModel;
|
||
use tools\Time;
|
||
|
||
class Score extends _Init
|
||
{
|
||
public function _initialize()
|
||
{
|
||
parent::_initialize();
|
||
$this->nav = 5;
|
||
}
|
||
|
||
public function index()
|
||
{
|
||
$this->list = ScoreModel::where('uid', UID)->select();
|
||
$this->dayCount = ScoreModel::where('uid', UID)->where('create_time', 'between', Time::day())->sum('score');
|
||
$this->monthCount = ScoreModel::where('uid', UID)->where('create_time', 'between', Time::month())->sum('score');
|
||
$this->allCount = ScoreModel::where('uid', UID)->sum('score');
|
||
return $this->fetch();
|
||
}
|
||
public function info()
|
||
{
|
||
$this->list = ScoreRulesModel::where('')->select();
|
||
return $this->fetch();
|
||
}
|
||
|
||
}
|