From d4923b8e56b5e04e6900186109fda34d9d92ba65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 17 Sep 2025 19:51:39 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9C=B0=E5=9D=80=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/User.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/api/model/User.php b/application/api/model/User.php index e3530ef..22eb957 100644 --- a/application/api/model/User.php +++ b/application/api/model/User.php @@ -825,6 +825,10 @@ class User extends Model //更新用户ip public function update_user_ip($user_id,$ip){ + //判断$ip是否是汉字 + if(preg_match('/[\x{4e00}-\x{9fa5}]+/u', $ip)){ + $ip = '未知'; + } $data = [ 'address_ip' => $ip ]; From 68ff3cfdea1694ad771d75c9a90c4df5c09c5f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 17 Sep 2025 20:40:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BA=A4=E5=8F=8B=E7=BB=93=E6=9D=9F?= =?UTF-8?q?=E5=90=8E=20=E5=8D=A1=E9=A1=BF=E9=80=A0=E6=88=90=E7=9A=84?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E6=94=B6=E5=88=B0=E6=8E=A8=E9=80=81=EF=BC=8C?= =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cron/controller/FriendEnd.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/cron/controller/FriendEnd.php b/application/cron/controller/FriendEnd.php index 6ab504d..52e4e8b 100644 --- a/application/cron/controller/FriendEnd.php +++ b/application/cron/controller/FriendEnd.php @@ -33,7 +33,7 @@ class FriendEnd $friending_info = db::name('vs_user_friending')->where('room_id', $room['id'])->where('status', 1)->order('id', 'desc')->find(); if($friending_info){ //判断结束时间是否到期 - if($friending_info['end_time'] <= time()){ + if($friending_info['end_time'] <= time() || $room['step'] == 3){ model('Friend')->end_friend(0,$room['id'],$friending_info['id'],1); } }