From d3a82807f0d76b46f3da5eeed0142160b3884f17 Mon Sep 17 00:00:00 2001 From: kenyanghui Date: Sun, 15 Nov 2026 03:07:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(login):=20=E9=82=AE=E7=AE=B1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=96=87=E6=A1=88=E6=94=B9=E4=B8=BA=E6=8B=86=E4=B9=A6?= =?UTF-8?q?=E5=B8=AE=E6=B3=A8=E5=86=8C=E9=82=AE=E7=AE=B1=E5=94=AF=E4=B8=80?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主按钮文案改为「微信手机号快速登录」 - 切换入口改为「使用拆书帮注册邮箱登录」 - placeholder/提示语/前端校验同步为仅邮箱 --- wechat-miniprogram/pages/login/index.js | 9 ++++----- wechat-miniprogram/pages/login/index.wxml | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/wechat-miniprogram/pages/login/index.js b/wechat-miniprogram/pages/login/index.js index ba1ddea..d50f0f4 100644 --- a/wechat-miniprogram/pages/login/index.js +++ b/wechat-miniprogram/pages/login/index.js @@ -94,19 +94,18 @@ Page({ async handleIdentifierLogin() { const raw = (this.data.identifier || '').trim(); if (!raw) { - wx.showToast({ title: '请输入手机号、微信号或邮箱', icon: 'none' }); + wx.showToast({ title: '请输入拆书帮注册邮箱', icon: 'none' }); return; } if (this.data.loading) return; this.setData({ loading: true }); try { const isEmail = /^[\w.+-]+@[\w-]+(\.[\w-]+)+$/.test(raw); - const isCnPhone = /^1\d{10}$/.test(raw); - if (!isEmail && !isCnPhone) { - wx.showToast({ title: '请输入正确的手机号或邮箱', icon: 'none' }); + if (!isEmail) { + wx.showToast({ title: '请输入正确的邮箱地址', icon: 'none' }); return; } - const payload = isEmail ? { email: raw } : { phone: raw }; + const payload = { email: raw }; const res = await post('/auth/login', payload, { showLoading: false }); if (res.success && res.data) { diff --git a/wechat-miniprogram/pages/login/index.wxml b/wechat-miniprogram/pages/login/index.wxml index 126f4b5..4b1a037 100644 --- a/wechat-miniprogram/pages/login/index.wxml +++ b/wechat-miniprogram/pages/login/index.wxml @@ -22,7 +22,7 @@ bindgetphonenumber="handleWechatLogin" disabled="{{loading}}" > - {{loading ? '登录中...' : '手机号快速验证'}} + {{loading ? '登录中...' : '微信手机号快速登录'}} @@ -36,7 +36,7 @@ class="identifier-input" type="text" value="{{identifier}}" - placeholder="手机号 / 微信号 / 邮箱" + placeholder="拆书帮注册邮箱" placeholder-class="identifier-placeholder" bindinput="onIdentifierInput" confirm-type="done" @@ -50,11 +50,11 @@ {{loading ? '登录中...' : '登录'}} - 邮箱为拆书帮会员身份认定凭证;非会员用手机号或微信号登录 + 邮箱为拆书帮会员身份认定凭证 - +