From bbe192697370185c21d49fe72806da125f6ca29f Mon Sep 17 00:00:00 2001 From: leiyun Date: Tue, 28 Apr 2026 15:55:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=BA=E5=8F=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AE=A1=E6=A0=B8=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controller/admin/system/sms.js | 10 ++++++++++ view/admin/patient_detail.html | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/controller/admin/system/sms.js b/src/controller/admin/system/sms.js index 02cee03..7ce50f8 100644 --- a/src/controller/admin/system/sms.js +++ b/src/controller/admin/system/sms.js @@ -45,6 +45,16 @@ module.exports = class extends Base { .page(page, pageSize) .countSelect(); + // 验证码脱敏:6位验证码中间4位替换为**** + const codeBizTypes = ['real_name_auth', 'login', 'change_phone']; + if (list.data && list.data.length) { + list.data.forEach(item => { + if (item.code && codeBizTypes.includes(item.biz_type)) { + item.code = item.code.slice(0, 1) + '****' + item.code.slice(-1); + } + }); + } + return this.json({ code: 0, data: list }); } diff --git a/view/admin/patient_detail.html b/view/admin/patient_detail.html index 22e3b9b..98414f5 100644 --- a/view/admin/patient_detail.html +++ b/view/admin/patient_detail.html @@ -156,8 +156,8 @@
返 回 - 审核通过 - 驳 回 + 审核通过 + 驳 回