From 51b3110b9f72ee410b5834a1bb4b1a5e91ed02c3 Mon Sep 17 00:00:00 2001 From: wangxiangwen <1906413238@qq.com> Date: Fri, 25 Jul 2025 14:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=95=B0=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- activitylink/src/views/zhongchou/gift/importFixedList/index.vue | 4 ++-- activitylink/src/views/zhongchou/gift/importuser/index.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/activitylink/src/views/zhongchou/gift/importFixedList/index.vue b/activitylink/src/views/zhongchou/gift/importFixedList/index.vue index 96ffd3f..54cc367 100644 --- a/activitylink/src/views/zhongchou/gift/importFixedList/index.vue +++ b/activitylink/src/views/zhongchou/gift/importFixedList/index.vue @@ -265,8 +265,8 @@ const trimAddJwcode = (value) => { // 添加处理用户名输入的函数 const trimUsername = (value) => { - // 只允许中文、英文字符 - const filteredValue = value.replace(/[^\u4e00-\u9fa5a-zA-Z]/g, ''); + // 只允许中文、英文字符、0-9 + const filteredValue = value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, ''); // 限制最长30个字符 addObj.value.username = filteredValue.slice(0, 30); } diff --git a/activitylink/src/views/zhongchou/gift/importuser/index.vue b/activitylink/src/views/zhongchou/gift/importuser/index.vue index 376e7bc..643fa00 100644 --- a/activitylink/src/views/zhongchou/gift/importuser/index.vue +++ b/activitylink/src/views/zhongchou/gift/importuser/index.vue @@ -247,8 +247,8 @@ const trimAddJwcode = (value) => { // 添加处理用户名输入的函数 const trimUsername = (value) => { - // 只允许中文、英文字符 - const filteredValue = value.replace(/[^\u4e00-\u9fa5a-zA-Z]/g, ''); + // 只允许中文、英文字符和数字0-9 + const filteredValue = value.replace(/[^\u4e00-\u9fa5a-zA-Z0-9]/g, ''); // 限制最长30个字符 addObj.value.username = filteredValue.slice(0, 30); }