diff --git a/assets/css/routes/user-center/settings.css b/assets/css/routes/user-center/settings.css index 5a8dac9f..27f461c3 100644 --- a/assets/css/routes/user-center/settings.css +++ b/assets/css/routes/user-center/settings.css @@ -405,9 +405,13 @@ .uc-auth-modal__body { padding: 22px; } .uc-auth-form { display: grid; gap: 17px; } -.uc-auth-form > label { display: grid; gap: 7px; color: var(--color-ink-2); font-size: 13px; font-weight: 600; } +.uc-auth-field { display: grid; gap: 7px; color: var(--color-ink-2); font-size: 13px; font-weight: 600; } +.uc-auth-enterprise-fields { display: grid; gap: 17px; } +.uc-auth-enterprise-fields[hidden] { display: none; } .uc-auth-form .form-control { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--color-line-soft, rgba(15, 23, 42, 0.1)); border-radius: 9px; background: var(--surface-1); color: var(--color-ink); font: inherit; font-weight: 400; box-sizing: border-box; } .uc-auth-form textarea.form-control { resize: vertical; } +.uc-auth-consent { display: flex; align-items: flex-start; gap: 8px; color: var(--color-ink-3); font-size: 13px; font-weight: 400; line-height: 1.6; } +.uc-auth-consent input { flex: 0 0 auto; margin-top: 3px; } .uc-auth-upload small { color: var(--color-ink-4); font-weight: 400; } .uc-auth-submit { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; } .uc-auth-form__message { min-height: 18px; color: var(--color-error, #dc2626); font-size: 12px; text-align: center; } diff --git a/assets/js/routes/user-center-auth.js b/assets/js/routes/user-center-auth.js index c2757c14..b852b939 100644 --- a/assets/js/routes/user-center-auth.js +++ b/assets/js/routes/user-center-auth.js @@ -87,10 +87,14 @@ if (createForm) { var typeSelect = createForm.querySelector('[name="type"]'); var enterprise = createForm.querySelector('[data-enterprise-fields]'); + var personLabel = createForm.querySelector('[data-auth-person-label]'); + var idLabel = createForm.querySelector('[data-auth-id-label]'); function syncEnterprise() { var enabled = typeSelect && typeSelect.value === 'enterprise'; if (enterprise) enterprise.hidden = !enabled; if (enterprise) enterprise.querySelectorAll('input').forEach(function (input) { input.required = enabled; }); + if (personLabel) personLabel.textContent = enabled ? '法定代表人姓名' : '真实姓名'; + if (idLabel) idLabel.textContent = enabled ? '法定代表人身份证号' : '身份证号码'; } if (typeSelect) typeSelect.addEventListener('change', syncEnterprise); syncEnterprise(); diff --git a/inc/helpers/user-center-renderers/profile-auth.php b/inc/helpers/user-center-renderers/profile-auth.php index 8f1a427a..125553e0 100644 --- a/inc/helpers/user-center-renderers/profile-auth.php +++ b/inc/helpers/user-center-renderers/profile-auth.php @@ -76,19 +76,17 @@ $config = [