function _run_action() { /* 只有登录的用户才可访问 */ if (!$this->visitor->has_login && !in_array(ACT, array('login', 'register', 'check_user'))) { if (!IS_AJAX) { header('Location:index.php?app=member&act=login&ret_url=' . rawurlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])); return; } else { $this->json_error('login_please'); return; } } parent::_run_action(); }
function _run_action() { /* 只有登录的用户才可访问 */ if (!$this->visitor->has_login && !in_array(ACT, array('login', 'register', 'check_user', 'check_phone_mob', 'check_email_info'))) { if (!IS_AJAX) { header('Location:index.php?app=member&act=login&ret_url=' . rawurlencode($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'])); return; } else { $this->json_error('login_please'); return; } } /* 如果是店小二登录,则不允许访问权限列表中的黑名单(如:我是买家菜单) */ if ($this->visitor->get('waiter_id') && $this->_in_waiter_black_privileges()) { $this->show_warning('no_permission'); return; } parent::_run_action(); }