优化打手注册和列表筛选
This commit is contained in:
@@ -155,10 +155,8 @@ export default function WorkerLoginPage() {
|
||||
}) {
|
||||
setLoading(true)
|
||||
try {
|
||||
const response = await registerWorker(values)
|
||||
message.success(
|
||||
response.data.reviewRequired ? '注册成功,请等待后台审核' : '注册成功,请使用手机号登录',
|
||||
)
|
||||
await registerWorker(values)
|
||||
message.success('注册成功,请使用手机号登录')
|
||||
registerForm.resetFields()
|
||||
} catch (error) {
|
||||
message.error(error instanceof Error ? error.message : '注册失败')
|
||||
|
||||
@@ -944,7 +944,7 @@ export default function WorkerProfilePage() {
|
||||
</span>
|
||||
</div>
|
||||
<div className="worker-profile-mobile-account-item">
|
||||
<span className="worker-profile-mobile-acc-label">审核状态</span>
|
||||
<span className="worker-profile-mobile-acc-label">账号状态</span>
|
||||
<span className="worker-profile-mobile-acc-val">
|
||||
<Tag color={resolveWorkerStatusColor(worker.status)}>
|
||||
{formatWorkerStatus(worker.status)}
|
||||
@@ -1184,7 +1184,7 @@ export default function WorkerProfilePage() {
|
||||
<Descriptions.Item label="手机号">
|
||||
{worker.phone || '-'}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="审核状态">
|
||||
<Descriptions.Item label="账号状态">
|
||||
<Tag color={resolveWorkerStatusColor(worker.status)}>
|
||||
{formatWorkerStatus(worker.status)}
|
||||
</Tag>
|
||||
@@ -1814,7 +1814,7 @@ export default function WorkerProfilePage() {
|
||||
<Descriptions.Item label="手机号">
|
||||
<Typography.Text copyable>{worker?.phone || '-'}</Typography.Text>
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="审核状态">
|
||||
<Descriptions.Item label="账号状态">
|
||||
{formatWorkerStatus(worker?.status || '')}
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label="当前余额">
|
||||
@@ -1852,9 +1852,9 @@ function formatMoney(value: number | undefined) {
|
||||
}
|
||||
|
||||
function formatWorkerStatus(status: string) {
|
||||
if (status === 'active') return '已审核'
|
||||
if (status === 'pending_review') return '待审核'
|
||||
if (status === 'rejected') return '审核未通过'
|
||||
if (status === 'active') return '已启用'
|
||||
if (status === 'pending_review') return '待处理'
|
||||
if (status === 'rejected') return '已冻结'
|
||||
if (status === 'disabled') return '已停用'
|
||||
return status || '-'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user