| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?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 Index extends Common
- {
- /**
- * 构造函数
- *
- * @access public
- */
- public function __construct()
- {
- parent::__construct();
- }// end__construct()
- /**
- * 主页管理
- *
- * @access public
- * @return array JsonString
- */
- public function index()
- {
- $getHomeInformation = model('homeinformation')->getHomeInformation();
- $incData = IncInfoModel::get(1);
- $this->assign('information', $getHomeInformation);
- $this->assign('incData', $incData);
- $location = json_decode($incData->inc_location);
- $this->assign('lng', $location->lng);
- $this->assign('lat', $location->lat);
- return $this->fetch();
- }
- public function isLogin()
- {
- $userId = session('user_id');
- if ($userId) {
- return ["success"=>true];
- } else {
- return ["success"=>false];
- }
- }//end index()
- }
|