TheLogs.php 690 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace addons\cms\controller\api;
  3. use addons\cms\model\MoneyLog;
  4. use addons\cms\model\ScoreLog;
  5. class TheLogs extends Base
  6. {
  7. protected $noNeedLogin = [];
  8. /**
  9. * 余额日志
  10. * @return string
  11. */
  12. public function money()
  13. {
  14. $list = MoneyLog::where(['user_id' => $this->auth->id])
  15. ->order('id desc')
  16. ->paginate(10);
  17. $this->success('', $list);
  18. }
  19. /**
  20. * 积分日志
  21. * @return string
  22. */
  23. public function score()
  24. {
  25. $list = ScoreLog::where(['user_id' => $this->auth->id])
  26. ->order('id desc')
  27. ->paginate(10);
  28. $this->success('', $list);
  29. }
  30. }