[ 'id' => '事件ID', 'userid' => '用户ID', 'total' => '金额', 'status' => '状态', 'gateway' => '支付网关', 'tradeno' => '网关单号', 'datetime' => '支付时间', 'invoice_id' => '关联账单ID', ], ]; /** * 后台网关记录页面 * * @throws Exception */ public function index(ServerRequest $request, Response $response, array $args): ResponseInterface { return $response->write( $this->view() ->assign('details', self::$details) ->fetch('admin/log/gateway.tpl') ); } /** * 后台网关记录页面 AJAX */ public function ajax(ServerRequest $request, Response $response, array $args): ResponseInterface { $paylists = (new Paylist())->orderBy('id', 'desc')->get(); foreach ($paylists as $paylist) { $paylist->status = $paylist->status(); $paylist->datetime = Tools::toDateTime((int) $paylist->datetime); } return $response->withJson([ 'paylists' => $paylists, ]); } }