| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace app\home\controller;
- use think\Lang;
- use think\Cache;
- use think\Request;
- use think\Controller;
- use think\Validate;
- use app\admin\model\IncInfo as IncInfoModel;
- /**
- * 主页管理类
- */
- class Common extends Controller
- {
- /**
- * 构造函数
- *
- * @access public
- */
- public function __construct()
- {
- parent::__construct();
- $incData = IncInfoModel::get(1);
- $this->assign('incData', $incData);
- $location = json_decode($incData->inc_location);
- $this->assign('lng', $location->lng);
- $this->assign('lat', $location->lat);
- $this->assign('user_info', $this->systemLogin());
- }// end__construct()
- protected final function systemLogin()
- {
- $user_info = array(
- 'user_id' => session('user_id'),
- 'user_email' => session('user_email'),
- );
- return $user_info;
- }
- }
|