From e21a56322266ba3ab8a99f2686bd304021dda37a Mon Sep 17 00:00:00 2001 From: zhaoruhui Date: Sat, 1 Nov 2025 19:30:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=B7=BB=E5=8A=A0whatsapp?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=AE=9E=E7=8E=B0=E5=8A=A8=E6=80=81=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hcdbqb-management.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hcdbqb-management.html b/hcdbqb-management.html index 665621a..880b0a3 100644 --- a/hcdbqb-management.html +++ b/hcdbqb-management.html @@ -301,8 +301,9 @@ const statusClass = item.isRelated ? "status-1" : "status-0"; const statusText = item.isRelated ? "已联系" : "未联系"; - // 构建WhatsApp链接 - const whatsappPhone = (item.code || '') + (item.telephone || ''); + // 构建WhatsApp链接 - 移除国家代码中的+号 + const cleanCode = (item.code || '').replace(/\+/g, ''); + const whatsappPhone = cleanCode + (item.telephone || ''); const whatsappUrl = `https://api.whatsapp.com/send?phone=${encodeURIComponent(whatsappPhone)}&text=${encodeURIComponent('hello欢迎来到赢在美股')}`; return ` @@ -363,7 +364,9 @@ const item = state.items.find((it) => String(it.id) === String(id)); if (!item) return; - const whatsappPhone = (item.code || '') + (item.telephone || ''); + // 移除国家代码中的+号 + const cleanCode = (item.code || '').replace(/\+/g, ''); + const whatsappPhone = cleanCode + (item.telephone || ''); const whatsappUrl = `https://api.whatsapp.com/send?phone=${encodeURIComponent(whatsappPhone)}&text=${encodeURIComponent('hello欢迎来到赢在美股')}`; window.open(whatsappUrl, '_blank');