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

@@ -295,8 +295,8 @@ export default {
},
fields: {
username: {
label: 'Account / Phone:',
placeholder: 'Enter account or mobile number',
label: 'Mobile:',
placeholder: 'Enter mobile number',
},
password: {
label: 'Password:',
@@ -317,9 +317,13 @@ export default {
submit: 'Register',
},
fields: {
username: {
label: 'Account / Phone:',
placeholder: 'Enter account or mobile number',
mobile: {
label: 'Mobile:',
placeholder: 'Enter mobile number',
},
captcha: {
label: 'Code:',
placeholder: 'Enter verification code',
},
password: {
label: 'Password:',
@@ -342,8 +346,20 @@ export default {
submitFailed: 'Registration failed. Please try again later.',
unauthorized: 'Registration is not authorized. Please try again later.',
},
sms: {
countdown: '{{seconds}}s',
errors: {
submitFailed: 'Failed to send code. Please try again later.',
},
send: 'Get code',
sending: 'Sending...',
success: 'Verification code sent.',
},
},
validation: {
captcha: {
required: 'Please enter the verification code.',
},
username: {
required: 'Please enter your mobile number.',
invalidPhone: 'Please enter a valid mobile number.',

View File

@@ -295,8 +295,8 @@ export default {
},
fields: {
username: {
label: 'Akun / Telepon:',
placeholder: 'Masukkan akun atau nomor ponsel',
label: 'Nomor Ponsel:',
placeholder: 'Masukkan nomor ponsel',
},
password: {
label: 'Kata Sandi:',
@@ -317,9 +317,13 @@ export default {
submit: 'Daftar',
},
fields: {
username: {
label: 'Akun / Telepon:',
placeholder: 'Masukkan akun atau nomor ponsel',
mobile: {
label: 'Nomor Ponsel:',
placeholder: 'Masukkan nomor ponsel',
},
captcha: {
label: 'Kode:',
placeholder: 'Masukkan kode verifikasi',
},
password: {
label: 'Kata Sandi:',
@@ -342,8 +346,20 @@ export default {
submitFailed: 'Pendaftaran gagal. Silakan coba lagi nanti.',
unauthorized: 'Pendaftaran tidak diizinkan. Silakan coba lagi nanti.',
},
sms: {
countdown: '{{seconds}}d',
errors: {
submitFailed: 'Gagal mengirim kode. Silakan coba lagi nanti.',
},
send: 'Ambil kode',
sending: 'Mengirim...',
success: 'Kode verifikasi telah dikirim.',
},
},
validation: {
captcha: {
required: 'Silakan masukkan kode verifikasi.',
},
username: {
required: 'Silakan masukkan nomor ponsel.',
invalidPhone: 'Silakan masukkan nomor ponsel yang valid.',

View File

@@ -300,8 +300,8 @@ export default {
},
fields: {
username: {
label: 'Akaun / Telefon:',
placeholder: 'Masukkan akaun atau nombor telefon',
label: 'Nombor Telefon:',
placeholder: 'Masukkan nombor telefon',
},
password: {
label: 'Kata Laluan:',
@@ -322,9 +322,13 @@ export default {
submit: 'Daftar',
},
fields: {
username: {
label: 'Akaun / Telefon:',
placeholder: 'Masukkan akaun atau nombor telefon',
mobile: {
label: 'Nombor Telefon:',
placeholder: 'Masukkan nombor telefon',
},
captcha: {
label: 'Kod:',
placeholder: 'Masukkan kod pengesahan',
},
password: {
label: 'Kata Laluan:',
@@ -347,8 +351,20 @@ export default {
submitFailed: 'Pendaftaran gagal. Sila cuba lagi kemudian.',
unauthorized: 'Pendaftaran tidak dibenarkan. Sila cuba lagi kemudian.',
},
sms: {
countdown: '{{seconds}}s',
errors: {
submitFailed: 'Gagal menghantar kod. Sila cuba lagi kemudian.',
},
send: 'Dapatkan kod',
sending: 'Menghantar...',
success: 'Kod pengesahan telah dihantar.',
},
},
validation: {
captcha: {
required: 'Sila masukkan kod pengesahan.',
},
username: {
required: 'Sila masukkan nombor telefon anda.',
invalidPhone: 'Sila masukkan nombor telefon yang sah.',

View File

@@ -283,8 +283,8 @@ export default {
},
fields: {
username: {
label: '账号/电话:',
placeholder: '请输入账号或手机号',
label: '手机号:',
placeholder: '请输入手机号',
},
password: {
label: '密码:',
@@ -305,9 +305,13 @@ export default {
submit: '注册',
},
fields: {
username: {
label: '账号/电话:',
placeholder: '请输入账号或手机号',
mobile: {
label: '手机号:',
placeholder: '请输入手机号',
},
captcha: {
label: '验证码:',
placeholder: '请输入验证码',
},
password: {
label: '密码:',
@@ -330,8 +334,20 @@ export default {
submitFailed: '注册失败,请稍后重试',
unauthorized: '注册未授权,请稍后重试',
},
sms: {
countdown: '{{seconds}}秒',
errors: {
submitFailed: '验证码发送失败,请稍后重试',
},
send: '获取验证码',
sending: '发送中...',
success: '验证码已发送',
},
},
validation: {
captcha: {
required: '请输入验证码',
},
username: {
required: '请输入手机号',
invalidPhone: '请输入正确的手机号',