From 5c572970ed04de35aa43641339b831a9c47bf993 Mon Sep 17 00:00:00 2001
From: zhaocheng <578322713@qq.com>
Date: Fri, 2 Sep 2022 19:04:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7=E5=BC=8F?=
=?UTF-8?q?=E8=B0=83=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/BaseController.php | 2 +-
app/controller/Index.php | 9 +-
app/view/index/index.html | 304 +++++++++++++++++++-------------------
3 files changed, 160 insertions(+), 155 deletions(-)
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"}
-