...
|
...
|
@@ -83,7 +83,9 @@ class Api |
|
|
public function __construct(Request $request = null)
|
|
|
{
|
|
|
$this->request = is_null($request) ? Request::instance() : $request;
|
|
|
|
|
|
$lang = $this->request->header('lang');
|
|
|
if (empty($lang)) $this->lang = 'ch'; //$this->error('缺少lang!');
|
|
|
else $this->lang = $lang;
|
|
|
// 控制器初始化
|
|
|
$this->_initialize();
|
|
|
|
...
|
...
|
@@ -120,9 +122,7 @@ class Api |
|
|
$this->user = $user;
|
|
|
$this->userId = $user['id'];
|
|
|
}
|
|
|
$lang = $this->request->header('lang');
|
|
|
if (empty($lang)) $this->lang = 'ch'; //$this->error('缺少lang!');
|
|
|
else $this->lang = $lang;
|
|
|
|
|
|
/*if (Config::get('url_domain_deploy')) {
|
|
|
$domain = Route::rules('domain');
|
|
|
if (isset($domain['api'])) {
|
...
|
...
|
|