From 8c910d8034531c479123cb168017e96afa1c9c95 Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Fri, 30 Jan 2026 09:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96whatsApp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/WordpressVisitorService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/common/service/WordpressVisitorService.php b/app/common/service/WordpressVisitorService.php index c0336b6..7c2ed45 100644 --- a/app/common/service/WordpressVisitorService.php +++ b/app/common/service/WordpressVisitorService.php @@ -46,8 +46,7 @@ class WordpressVisitorService $visitor->updated_at = time(); $visitor->save(); $user = User::where('id',$visitor['user_id'])->first(); - //return $user['phone']; - return $this->url($user['phone'], $referer); + return $this->url($user['whatsapp'], $referer); } $lastId = Redis::get('wp_whatsApp_user'); @@ -59,7 +58,8 @@ class WordpressVisitorService $userIds = User::where('role',1) ->where('whatsapp','!=','') ->orderBy('id','asc') - ->get(); + ->get() + ->toArray(); $userIds = array_column($userIds, 'id'); $userIds = array_values($userIds); $id = 0; @@ -82,7 +82,7 @@ class WordpressVisitorService WordpressVisitor::create($data); $user = User::where('id',$id)->first(); //return $user['phone']; - return $this->url($user['phone'], $referer); + return $this->url($user['whatsapp'], $referer); } public function url($phone,$referer){