()
| 1067 | |
| 1068 | |
| 1069 | async function loadAutoRegistrationSettings() { |
| 1070 | if (!elements.autoRegistrationEnabled) return; |
| 1071 | try { |
| 1072 | const data = await api.get('/settings'); |
| 1073 | const reg = data.registration || {}; |
| 1074 | elements.autoRegistrationEnabled.checked = reg.auto_enabled || false; |
| 1075 | elements.autoRegistrationCheckInterval.value = reg.auto_check_interval || 60; |
| 1076 | elements.autoRegistrationMinReady.value = reg.auto_min_ready_auth_files || 1; |
| 1077 | elements.autoRegistrationEmailServiceType.value = reg.auto_email_service_type || 'tempmail'; |
| 1078 | elements.autoRegistrationProxy.value = reg.auto_proxy || ''; |
| 1079 | elements.autoRegistrationMode.value = reg.auto_mode || 'pipeline'; |
| 1080 | elements.autoRegistrationConcurrency.value = reg.auto_concurrency || 1; |
| 1081 | elements.autoRegistrationIntervalMin.value = reg.auto_interval_min || 5; |
| 1082 | elements.autoRegistrationIntervalMax.value = reg.auto_interval_max || 30; |
| 1083 | handleConcurrencyModeChange( |
| 1084 | elements.autoRegistrationMode, |
| 1085 | elements.concurrencyHint, |
| 1086 | elements.autoRegistrationIntervalGroup |
| 1087 | ); |
| 1088 | elements.autoRegistrationEmailServiceId.dataset.selectedId = String(reg.auto_email_service_id || 0); |
| 1089 | elements.autoRegistrationCpaServiceId.dataset.selectedId = String(reg.auto_cpa_service_id || 0); |
| 1090 | populateAutoRegistrationEmailServiceOptions(reg.auto_email_service_id || 0); |
| 1091 | } catch (error) { |
| 1092 | console.error('加载自动注册设置失败:', error); |
| 1093 | } |
| 1094 | } |
| 1095 | |
| 1096 | async function loadAutoRegistrationCpaOptions() { |
| 1097 | if (!elements.autoRegistrationCpaServiceId) return; |
no test coverage detected