From 2ccadce34a89afcf98e4d41e85bcefdf135b4a4a Mon Sep 17 00:00:00 2001 From: jacy <18049821889@163.com> Date: Wed, 29 Jul 2026 11:31:02 +0800 Subject: [PATCH] feat(mini-user): show masked phone under nickname on mine page Co-authored-by: Cursor --- apps/mini-user/src/pages/mine/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/mini-user/src/pages/mine/index.tsx b/apps/mini-user/src/pages/mine/index.tsx index 0d230d1..9cbe707 100644 --- a/apps/mini-user/src/pages/mine/index.tsx +++ b/apps/mini-user/src/pages/mine/index.tsx @@ -23,6 +23,7 @@ import { } from '../../lib/mini-wechat-profile'; import { isLoggedIn, logout, request, toast, type UserProfile } from '../../lib/api'; import { isWechatEnv } from '../../lib/weixin'; +import { maskPhone } from '../../lib/phone'; import { DEFAULT_SHARE_DESC, DEFAULT_SHARE_TITLE, @@ -349,13 +350,12 @@ export default function MinePage() { const nickname = display.nickname || '用户'; const needProfileFill = isWeapp && needsWxProfileFill(display); const avatarProfileReady = isWeapp ? !needProfileFill : hasWechat; + const maskedPhone = profile?.phone ? maskPhone(String(profile.phone)) : ''; const memberLabel = needProfileFill ? '点击头像完善资料' - : isWeapp || hasWechat - ? '好客会员' - : canWxAuth - ? '点击头像授权' - : '好客会员'; + : !isWeapp && !hasWechat && canWxAuth + ? '点击头像授权' + : maskedPhone || '未绑定手机'; const avatarClickable = isWeapp || (!hasWechat && canWxAuth); const previewAvatar = draftAvatarUrl || display.avatarUrl;