objLottery = new Lottery (); $this->operatorData = $this->getUser(); $this->setOutput('title', $title); } /** * 默认页面 * 1.获取当前操作员用户信息 * 2.获取平台公告10条信息 * 3.活动发布快捷通道 * 4.所有活动 * 地址:http://cas.lishuy.com/?c=Admin_Index */ public function doDefault(){ # 获取平台公告10条信息 $bulletinData = array(); $objPlatformBulletin = new PlatformBulletin(); $condition = array(); $limit = 6; $order = 'create_time desc'; $bulletinIds = $objPlatformBulletin -> findIdsBy($condition,$limit,$order); $bulletinData = $objPlatformBulletin -> gets($bulletinIds); # 活动发布快捷通道 ,这里为了方便直接硬编码了 $url = Request::schemeDomain().'/?c=Admin_Activity_SetBasics&a=PageCreate&type='; # 获取所有活动 $allActivityData = array(); $objDLotteryEvents = new LotteryEvents(); $limit = null; $order = 'id desc'; $condition = array( 'operator_uid' => $this->operatorData['uid'] ); $ids = $objDLotteryEvents->findIdsBy($condition,null,'id desc'); $allActivityData = $objDLotteryEvents -> gets($ids); $this->tpl = 'admin/index'; $title = '活动首页'; $this->setOutput('title', $title); $this->setOutput('menu_active', array('name' => 'platfromhome', 'item' => '')); //激活菜单 $this->addNavMenu($title, Request::url()); $allTypeData = $objDLotteryEvents ->getType(); $this->setOutput('allTypeData', $allTypeData); $this->setOutput('bulletinData', $bulletinData); // 获取平台公告10条信息 $this->setOutput('operatorData', $this->operatorData); // 当前操作者信息 $this->setOutput('myReleaseActivityData', $allActivityData); // 获取所有活动 $this->setOutput('pagePublicData', $this->getPagePublicData()); // 后台管理相关数据 } /** * 显示方法 * */ public function display() { return $this->render(); } /** * 临时创建二维码图片 * http://cas.lishuy.com/?c=Admin_Index&a=TMPCreateImg */ public function doTMPCreateImg(){ $url = Request::p('url'); $this -> createImgCodeUrl($url); $this->ajax_success_exit('ok'); } }