fix: 认证失败后允许重新提交
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7c9b4d1852
commit
333a7be64b
4 files changed
+13
-13
No files matched your search
@@ -17,13 +17,14 @@ $info = class_exists(AuthApply::class) ? AuthApply::get_auth_info($user_id) : []
|
||||
$apply = class_exists(AuthApply::class) ? AuthApply::get_apply_payload($user_id) : [];
|
||||
$record = is_array($apply['_application'] ?? null) ? $apply['_application'] : [];
|
||||
$stage = sanitize_key((string) ($record['status'] ?? ''));
|
||||
$locks_application = in_array($stage, ['created', 'provider_pending', 'provider_processing', 'manual_pending'], true);
|
||||
$reason = (string) ($record['review_note'] ?? $record['provider_result_summary'] ?? '');
|
||||
$can_apply = !empty($settings['enabled']) && !empty($settings['allow_apply']) && $status !== 'verified';
|
||||
$config = [
|
||||
'restBase' => untrailingslashit(rest_url('aksrt/v1/identity/applications')),
|
||||
'nonce' => wp_create_nonce('wp_rest'),
|
||||
'currentUuid' => (string) ($record['application_uuid'] ?? ''),
|
||||
'currentStage' => $stage,
|
||||
'currentUuid' => $locks_application ? (string) ($record['application_uuid'] ?? '') : '',
|
||||
'currentStage' => $locks_application ? $stage : '',
|
||||
'allowManual' => !empty($settings['allow_manual_fallback']),
|
||||
];
|
||||
?>
|
||||
@@ -64,7 +65,7 @@ $config = [
|
||||
<button type="button" class="aksrt-modal__close" data-auth-modal-close aria-label="<?php esc_attr_e('关闭', 'aksrt'); ?>"><i class="fas fa-times" aria-hidden="true"></i></button>
|
||||
</div>
|
||||
<div class="aksrt-modal__body uc-auth-modal__body">
|
||||
<div data-auth-status <?php echo $record === [] ? 'hidden' : ''; ?>>
|
||||
<div data-auth-status <?php echo !$locks_application ? 'hidden' : ''; ?>>
|
||||
<div class="uc-auth-pending">
|
||||
<span><i class="fas fa-shield-alt" aria-hidden="true"></i></span>
|
||||
<h3 data-auth-stage><?php echo esc_html($stage ?: __('准备认证', 'aksrt')); ?></h3>
|
||||
@@ -75,7 +76,7 @@ $config = [
|
||||
<?php if (!empty($settings['allow_manual_fallback'])) : ?><button type="button" class="button" data-auth-manual-open hidden><?php esc_html_e('上传材料转人工审核', 'aksrt'); ?></button><?php endif; ?>
|
||||
</div>
|
||||
|
||||
<form class="aksrt-user-auth-form uc-auth-form" data-auth-create <?php echo $record !== [] ? 'hidden' : ''; ?>>
|
||||
<form class="aksrt-user-auth-form uc-auth-form" data-auth-create <?php echo $locks_application ? 'hidden' : ''; ?>>
|
||||
<label class="uc-auth-field"><span><?php esc_html_e('认证类型', 'aksrt'); ?></span><select class="form-control" name="type" required><option value="personal"><?php esc_html_e('个人认证', 'aksrt'); ?></option><option value="enterprise"><?php esc_html_e('企业认证', 'aksrt'); ?></option></select></label>
|
||||
<div class="uc-auth-enterprise-fields" data-enterprise-fields hidden>
|
||||
<label class="uc-auth-field"><span><?php esc_html_e('企业全称', 'aksrt'); ?></span><input class="form-control" name="company_name" maxlength="191"></label>
|
||||
|
||||
Reference in new issue
Block a user