Invite.php 704 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\index\controller;
  3. use app\common\controller\Frontend;
  4. class Invite extends Frontend
  5. {
  6. protected $noNeedLogin = [];
  7. protected $noNeedRight = '*';
  8. protected $layout = 'default';
  9. public function index()
  10. {
  11. $inviteList = \addons\invite\model\Invite::
  12. where(['user_id' => $this->auth->id])
  13. ->with('invited')
  14. ->order('id desc')
  15. ->paginate(10);
  16. $inviteConfig = get_addon_config('invite');
  17. $this->view->assign('title', "邀请好友");
  18. $this->view->assign('inviteList', $inviteList);
  19. $this->view->assign('inviteConfig', $inviteConfig);
  20. return $this->view->fetch();
  21. }
  22. }