<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Web\Controller; use Illuminate\Support\Facades\View; use ModStart\App\Web\Layout\WebPage; use ModStart\Core\Input\Request; use ModStart\Field\AbstractField; use ModStart\Field\AutoRenderedFieldValue; use ModStart\Grid\Grid; use ModStart\Grid\GridFilter; use ModStart\Module\ModuleBaseController; use ModStart\Module\ModuleManager; use ModStart\Repository\Filter\RepositoryFilter; use Module\Member\Auth\MemberUser; use Module\Member\Support\MemberLoginCheck; class MemberCreditController extends ModuleBaseController implements MemberLoginCheck { private $api; public function __construct() { goto nnvCN; qmRBS: View::share('_viewMemberFrame', $this->viewMemberFrame); goto TD48Y; nnvCN: list($this->viewMemberFrame, $plloB) = $this->viewPaths('member.frame'); goto qmRBS; TD48Y: $this->api = app(\Module\Member\Api\Controller\MemberCreditController::class); goto hVEaV; hVEaV: } public function index(WebPage $JcqUq) { goto DnXfa; DnXfa: $gwmIt = Grid::make('member_credit_log'); goto xQlSc; xQlSc: $gwmIt->repositoryFilter(function (RepositoryFilter $bu01d) { $bu01d->where(array('memberUserId' => MemberUser::id())); }); goto W6W2F; W6W2F: $gwmIt->gridFilter(function (GridFilter $bu01d) { $bu01d->range('created_at', '时间')->datetime(); }); goto xbSui; d_Oq3: $gwmIt->useSimple(function (AbstractField $pZ_lR, $jIWZA, $aaYHa) { return AutoRenderedFieldValue::makeView('module::Member.View.pc.memberCredit.item', array('item' => $jIWZA)); }); goto fZDCh; Us6uL: $JcqUq->pageTitle('我的' . ModuleManager::getModuleConfig('Member', 'creditName', '积分')); goto scBKb; fZDCh: if (Request::isPost()) { return $gwmIt->request(); } goto t0pxb; xbSui: $gwmIt->disableCUD()->disableItemOperate(); goto d_Oq3; t0pxb: list($qVdRh, $plloB) = $this->viewPaths('memberCredit.index'); goto Us6uL; scBKb: return $JcqUq->view($qVdRh)->body($gwmIt); goto BhcUY; BhcUY: } }