<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\CmsJob\Web\Controller; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use ModStart\Core\Util\PageHtmlUtil; use ModStart\Module\ModuleBaseController; use ModStart\Module\ModuleManager; use Module\Ad\Util\AdUtil; use Module\CmsJob\Util\CmsJobUtil; class CmsJobController extends ModuleBaseController { private $api; public function __construct() { $this->api = app(\Module\CmsJob\Api\Controller\CmsJobController::class); } public function index() { goto ufrsJ; ufrsJ: $aNWPu = Response::tryGetData($this->api->paginate()); goto PCJZ7; PCJZ7: $g5RPQ = array(); goto nOGfE; K_8Uu: return $this->view('cmsJob.list', $g5RPQ); goto JXRpw; oUkSH: $g5RPQ['pageHtml'] = PageHtmlUtil::render($aNWPu['total'], $aNWPu['pageSize'], $aNWPu['page'], '?' . Request::mergeQueries(array('page' => array('{page}')))); goto pyL_d; pyL_d: if (ModuleManager::isModuleInstalled('Ad')) { $g5RPQ['ads'] = AdUtil::listByPositionWithCache('pcCmsJobListRight'); } goto K_8Uu; nOGfE: $g5RPQ['records'] = $aNWPu['records']; goto oUkSH; JXRpw: } public function views($WXJys) { goto s1ixs; s1ixs: $Lu5WV = CmsJobUtil::get($WXJys); goto raY_E; EzNRv: return $this->view('cmsJob.view', $g5RPQ); goto h90s6; v3mFA: $g5RPQ = array(); goto SQgoN; T_4Z2: if (ModuleManager::isModuleInstalled('Ad')) { $g5RPQ['ads'] = AdUtil::listByPositionWithCache('pcCmsJobViewRight'); } goto EzNRv; SQgoN: $g5RPQ['record'] = $Lu5WV; goto T_4Z2; raY_E: if (empty($Lu5WV)) { return Response::send(-1, '新闻不存在'); } goto v3mFA; h90s6: } }