| // +------------------------------------------------+ 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(); } }