feat(auth): 切换注册方式为手机验证码并添加客服功能

- 将注册表单从用户名改为手机号输入
- 集成短信验证码功能,添加验证码输入字段
- 实现发送短信验证码的API调用和倒计时逻辑
- 更新国际化配置以支持验证码相关文案
- 添加桌面端客服聊天弹窗功能
- 调整注册表单UI布局和样式优化
- 修改认证相关常量和类型定义以适配新流程
This commit is contained in:
JiaJun
2026-06-02 11:09:24 +08:00
parent 522b8a1f28
commit 68cf8c0be2
16 changed files with 410 additions and 72 deletions

View File

@@ -8,9 +8,11 @@ import {
Volume2,
VolumeX,
} from 'lucide-react'
import { motion } from 'motion/react'
import { useTranslation } from 'react-i18next'
import add from '@/assets/game/add.webp'
import avatar from '@/assets/system/avatar.webp'
import chatImage from '@/assets/system/chat.webp'
import diamond from '@/assets/system/diamond.webp'
import logo from '@/assets/system/logo.webp'
import { SmartImage } from '@/components/smart-image.tsx'
@@ -18,6 +20,7 @@ import {
useHeaderClockLabel,
useHeaderVm,
} from '@/features/game/hooks/use-header-vm'
import { useModalStore } from '@/store'
function HeaderClock() {
const systemTimeLabel = useHeaderClockLabel()
@@ -59,6 +62,7 @@ function SignalBars({
export function DesktopHeader() {
const { t } = useTranslation()
const setModalOpen = useModalStore((state) => state.setModalOpen)
const {
authStatus,
currentLanguageLabel,
@@ -173,6 +177,21 @@ export function DesktopHeader() {
)}
<div>{t('gameDesktop.header.fullscreen')}</div>
</button>
<motion.button
type="button"
onClick={() => setModalOpen('desktopSupport', true)}
whileTap={{
scale: 0.95,
}}
whileHover={{ scale: 1.05 }}
>
<SmartImage
className={'h-design-30 w-design-30 cursor-pointer'}
alt={'chatImage'}
src={chatImage}
/>
</motion.button>
</div>
{authStatus === 'authenticated' ? (