feat(mobile): 接入实名认证与商品详情客服入口

This commit is contained in:
yml2213
2026-10-30 14:11:15 +08:00
parent f2552fe523
commit 395f056d64
8 changed files with 475 additions and 8 deletions
@@ -1,13 +1,22 @@
import { Button, List } from 'antd-mobile'
import { Button, List, Tag } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
import { BrandLogo } from '@/components/BrandLogo'
import { useSessionStore } from '@/stores/session'
const realnameLabel: Record<string, string> = {
verified: '已实名',
pending: '审核中',
rejected: '未通过',
}
export function MobileProfilePage() {
const navigate = useNavigate()
const user = useSessionStore(state => state.user)
const logout = useSessionStore(state => state.logout)
const realnameStatus = user?.realname_status || 'unverified'
const realnameTone =
realnameStatus === 'verified' ? 'success' : realnameStatus === 'rejected' ? 'danger' : 'default'
return (
<div className="mobile-profile">
@@ -21,7 +30,11 @@ export function MobileProfilePage() {
<List className="mobile-profile__list">
<List.Item extra={user ? '已登录' : '未登录'}>账号状态</List.Item>
<List.Item extra={user?.realname_status === 'verified' ? '已实名' : '未实名'}>
<List.Item
clickable
onClick={() => navigate(user ? '/m/realname' : '/m/login?redirect=/m/realname')}
extra={<Tag color={realnameTone}>{realnameLabel[realnameStatus] ?? '未实名'}</Tag>}
>
实名认证
</List.Item>
<List.Item onClick={() => navigate('/m/orders')}>我的订单</List.Item>