1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php
- namespace app\manage\controller;
- use app\manage\model\ExamClassModel;
- use app\manage\model\InstitutionModel;
- use app\manage\model\TemplateModel;
- use think\Controller;
- use think\Db;
- use think\Session;
- use think\Config;
- use think\Cookie;
- use think\Request;
- use app\common\library\SysLogs;
- use app\common\library\UUIDs;
- /**
- * 模版管理
- */
- class Syslog extends Base {
- public function index() {
- return $this->fetch('index');
- }
- public function datas() {
- $request = Request::instance();
- $params = $request->param();
- $page = empty($params["page"]) ? 1 : $params["page"];
- $pagesize = empty($params["rows"]) ? 1 : $params["rows"];
- if (empty($page) || $page < 1) {
- $page = 1;
- }
- if (empty($pagesize) || $pagesize < 1) {
- $pagesize = 30;
- }
- $whereArr = array();
- if (!empty($params["module"])) {
- $whereArr["module"] = $params["module"];
- }
- if (!empty($params["type"])) {
- $whereArr["type"] = $params["type"];
- }
- if (!empty($params["uid"])) {
- $whereArr["uid"] = $params["uid"];
- }
- $info = DB::table('sys_logs')->where($whereArr)->order( [ "cdate" => "desc" ] )->page($page, $pagesize)->select();
- $num = DB::table('sys_logs')->where($whereArr)->count();
- $data = array();
- $data['total'] = $num;
- $data['rows'] = $info;
- echo json_encode($data);
- }
- }
|