修复显示问题

dev
GeekQu 7 years ago
parent 90958f2aa1
commit a984e01afb
No known key found for this signature in database
GPG Key ID: F0EEABFCD04A5891

@ -64,7 +64,10 @@ class GConfigController extends AdminController
public function telegram_ajax($request, $response, $args)
{
$configs = GConfig::where('key', 'LIKE', "%Telegram%")->get();
$start = $request->getParam("start");
$limit_length = $request->getParam('length');
$configs = GConfig::skip($start)->where('key', 'LIKE', "%Telegram%")->limit($limit_length)->get();
$total_conut = GConfig::where('key', 'LIKE', "%Telegram%")->count();
$data = [];
foreach ($configs as $config) {
$tempdata = [];
@ -88,13 +91,15 @@ class GConfigController extends AdminController
$tempdata['value'] = '未知';
break;
}
} else {
$tempdata['value'] = '(请在编辑页面查看)';
}
$data[] = $tempdata;
}
$info = [
'draw' => $request->getParam('draw'),
'recordsTotal' => count($configs),
'recordsFiltered' => count($configs),
'recordsTotal' => $total_conut,
'recordsFiltered' => $total_conut,
'data' => $data
];

Loading…
Cancel
Save