init
This commit is contained in:
33
app/api/controller/BaseController.php
Executable file
33
app/api/controller/BaseController.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
|
||||
use think\Lang;
|
||||
use think\Loader;
|
||||
use think\Config;
|
||||
use think\Session;
|
||||
use app\common\controller\BaseController as Controller;
|
||||
|
||||
//<!--#include file="([0-9a-zA-Z/._-]+?)\.html" -->
|
||||
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');
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user