From 96d241ff19c261e4bc380ad9e71b6d60af7e04f1 Mon Sep 17 00:00:00 2001 From: Wisp X <1591788658@qq.com> Date: Tue, 7 May 2019 14:23:27 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=9B=BE=E7=89=87=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=A2=9E=E5=8A=A0IP=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/index/controller/User.php | 2 +- application/index/controller/admin/Images.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/index/controller/User.php b/application/index/controller/User.php index c599eb1a..d0752e07 100644 --- a/application/index/controller/User.php +++ b/application/index/controller/User.php @@ -24,7 +24,7 @@ class User extends Base $model = $this->user->images()->order('create_time', 'desc'); $folders = $this->user->folders()->where('parent_id', $folderId)->select(); if (!empty($keyword)) { - $model = $model->where('pathname', 'like', "%{$keyword}%"); + $model = $model->where('pathname|sha1|md5|ip', 'like', "%{$keyword}%"); } if (is_numeric($folderId)) { $model = $model->where('folder_id', $folderId); diff --git a/application/index/controller/admin/Images.php b/application/index/controller/admin/Images.php index 6365051a..dc7ee819 100644 --- a/application/index/controller/admin/Images.php +++ b/application/index/controller/admin/Images.php @@ -46,7 +46,7 @@ class Images extends Base $model = $model->where($field, $value); } if (!empty($keyword)) { - $model = $model->where('pathname|sha1|md5', 'like', "%{$keyword}%"); + $model = $model->where('pathname|sha1|md5|ip', 'like', "%{$keyword}%"); } $images = $model->order('id', 'desc')->paginate($limit, false, [ 'query' => [