MemberController.php 947 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2013-2018 http://www.thinkcmf.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Released under the MIT License.
  8. // +----------------------------------------------------------------------
  9. // | Author: 老猫 <thinkcmf@126.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\index\controller;
  12. use cmf\controller\HomeBaseController;
  13. class MemberController extends HomeBaseController
  14. {
  15. public function __construct()
  16. {
  17. parent::__construct();
  18. if(!session('UID')){
  19. $this->redirect(url('/index/login/index'));
  20. }
  21. }
  22. public function index()
  23. {
  24. return $this->fetch();
  25. }
  26. }