class BaseController extends Controller { //当前用户 protected $customer_id = 0; protected $country_code = 'US'; public function __construct() { parent::__construct(); } // 初始化 protected function _initialize() { parent::_initialize(); $this->country_code = 'US'; $this->customer_id = is_session_login('customer'); } }