<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\CmsProperty\Api\Controller; use Illuminate\Routing\Controller; use ModStart\Core\Dao\ModelUtil; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use ModStart\Core\Util\ArrayUtil; use ModStart\Core\Util\HtmlUtil; use Module\CmsProperty\Util\CmsPropertyUtil; class CmsPropertyController extends Controller { public function latest() { goto X61Jh; Xb1lT: $BMu21 = $Cj1F4->getInteger('limit', 5); goto md3iT; X61Jh: $Cj1F4 = InputPackage::buildFromInput(); goto Xb1lT; dUADR: return Response::generateSuccessPaginateData(1, count($vKRZ2), $vKRZ2, count($vKRZ2)); goto KyywI; md3iT: $vKRZ2 = CmsPropertyUtil::listLatest($BMu21); goto dUADR; KyywI: } public function paginate() { goto gVQQd; aAwBT: $aY5Ol['order'] = array('id', 'desc'); goto rMSXL; CMqhk: $JDSm5 = $Cj1F4->getPageSize(); goto kpUde; Bdk_D: $vKRZ2 = CmsPropertyUtil::buildRecords($aNWPu['records']); goto yq6mn; yq6mn: return Response::generateSuccessData(array('page' => $qDx9U, 'pageSize' => $JDSm5, 'total' => $aNWPu['total'], 'records' => $vKRZ2)); goto Vtj68; kpUde: $aY5Ol = array(); goto tz5Zu; tz5Zu: $aY5Ol['where'] = array(); goto aAwBT; G_ix5: $qDx9U = $Cj1F4->getPage(); goto CMqhk; IXa5S: if ($q2QN6) { $aY5Ol['where']['categoryId'] = $q2QN6; } goto vq5K1; gVQQd: $Cj1F4 = InputPackage::buildFromInput(); goto G_ix5; vq5K1: $aNWPu = ModelUtil::paginate('cms_property', $qDx9U, $JDSm5, $aY5Ol); goto Bdk_D; rMSXL: $q2QN6 = $Cj1F4->getInteger('categoryId'); goto IXa5S; Vtj68: } public function get() { goto iVeFI; tVSjx: $qgfZ7 = CmsPropertyUtil::buildRecord($Lu5WV); goto QMAif; QMAif: $qgfZ7['cover'] = $Lu5WV['cover']; goto avHFv; iVeFI: $WXJys = InputPackage::buildFromInput()->getInteger('id'); goto ZNbaB; ZNbaB: $Lu5WV = CmsPropertyUtil::get($WXJys); goto tVSjx; avHFv: $qgfZ7['content'] = $Lu5WV['content']; goto N3ZCG; N3ZCG: return Response::generateSuccessData($qgfZ7); goto eytWG; eytWG: } }