diff --git a/app/BaseController.php b/app/BaseController.php index 2b89bb5..390d281 100644 --- a/app/BaseController.php +++ b/app/BaseController.php @@ -70,7 +70,7 @@ abstract class BaseController protected function initialize() { if($this->request->isAjax() && $this->request->action() != 'login'){ - $lastAction = session('last_action'); + $lastAction = session('last_action') ?: time(); if (session('login_time') === null || time() - $lastAction > 600) { session('login_time', null); $this->json_data['code'] = '-1'; diff --git a/app/controller/Index.php b/app/controller/Index.php index b1d1ef6..2f7fa0e 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -240,7 +240,14 @@ class Index extends BaseController public function deletes() { // - $params = $this->request->param(); + $params = array_filter($this->request->param()); + $params_1 = $params; + unset($params_1['car_phone_empty'], $params['data_check'], $params['car_frame_check']); + if (empty($params_1)) { + $this->json_data['code'] = 0; + $this->json_data['msg'] = '搜索条件不能为空'; + return json($this->json_data); + } $map = $this->getQueryCondition($params); if($this->model->where($map)->delete()){ $this->json_data['msg'] = '删除成功'; diff --git a/app/view/index/index.html b/app/view/index/index.html index 4e30cce..aefa376 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -8,160 +8,157 @@ {/block} {block name="body"}
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-
- -
- -
-
-
-
- -
-
-
- -
- 月 - 日 -
-
-
-
- 月 - 日 -
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - -
- - -
-
-
-
-
-
- -
- 万 -
-
-
-
- 万 -
-
-
- -
- - - -
-
-
- -
- - {if $repeat_frame_count > 0 } - - {/if} - {if $peer_phone_count > 0 } - - {/if} +
+
+
+

筛选

+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
-
+
+ +
+
+
+ +
+ 月 + 日 +
+
-
+
+ 月 + 日 +
+
+
+ +
+ +
+
-
+
+ +
+
+
+ +
+ + + +
+
+
+ +
+ + {if $repeat_frame_count > 0 } + + {/if} + {if $peer_phone_count > 0 } + + {/if} +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+ + 重置条件 + +
-
- - 重置条件 - -
-
-
@@ -226,6 +223,7 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, + height: 'full - 45', page: true, //开启分页 limit: 20, loading: true, @@ -349,7 +347,7 @@ }); }); $('#search-btn').on('click', function(){ - var param = $('.layui-card-header').find(':input').serializeObject(); + var param = $('.layui-colla-content').find(':input').serializeObject(); param['data_filter[]'] = param['data_filter[]']?param['data_filter[]']:''; param = Object.assign(param, urlParams); //执行重载 @@ -365,7 +363,7 @@ layer.close(index); index = layer.load(); //向服务端发送删除指令 - $.post('{:url("index/deletes/")}', $('.layui-card-header').find(':input').serialize(), function (ret) { + $.post('{:url("/index/deletes/")}', $('.layui-colla-content').find(':input').serialize(), function (ret) { layer.close(index); layer.msg(ret.msg, function () { layui.table.reload('carInfo');