// +---------------------------------------------------------------------- namespace app\index\controller; use cmf\controller\HomeBaseController; class MemberController extends HomeBaseController { public function __construct() { parent::__construct(); if(!session('UID')){ $this->redirect(url('/index/login/index')); } } public function index() { return $this->fetch(); } }