<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\CmsProperty\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\CmsProperty\Util\CmsPropertyUtil; class CmsPropertyController extends ModuleBaseController { private $api; public function __construct() { $this->api = app(\Module\CmsProperty\Api\Controller\CmsPropertyController::class); } public function index() { goto y43Rb; fN0M8: $g5RPQ = array(); goto pVNTu; ckv7P: $g5RPQ['categories'] = CmsPropertyUtil::listCategories(); goto gFuUa; qqwmH: return $this->view('cmsProperty.list', $g5RPQ); goto fXOpL; gFuUa: $g5RPQ['pageHtml'] = PageHtmlUtil::render($aNWPu['total'], $aNWPu['pageSize'], $aNWPu['page'], '?' . Request::mergeQueries(array('page' => array('{page}')))); goto qqwmH; kuSd1: $aNWPu = Response::tryGetData($this->api->paginate()); goto fN0M8; y43Rb: $Cj1F4 = InputPackage::buildFromInput(); goto kuSd1; sjSWO: $g5RPQ['categoryId'] = $Cj1F4->getInteger('categoryId'); goto ckv7P; pVNTu: $g5RPQ['records'] = $aNWPu['records']; goto sjSWO; fXOpL: } public function views($WXJys) { goto u2d6E; t0WF2: if (empty($Lu5WV)) { return Response::send(-1, '新闻不存在'); } goto YsB1n; YsB1n: $Lu5WV['_category'] = ModelUtil::get('cms_property_category', array('id' => $Lu5WV['categoryId'])); goto uilH2; qEUUT: $g5RPQ['record'] = $Lu5WV; goto qcgS3; u2d6E: $Lu5WV = CmsPropertyUtil::get($WXJys); goto t0WF2; uilH2: $g5RPQ = array(); goto qEUUT; qcgS3: return $this->view('cmsProperty.view', $g5RPQ); goto hUJCO; hUJCO: } }