()
| 322 | |
| 323 | // 加载可用的邮箱服务 |
| 324 | async function loadAvailableServices() { |
| 325 | try { |
| 326 | const data = await api.get('/registration/available-services'); |
| 327 | availableServices = data; |
| 328 | |
| 329 | // 更新邮箱服务选择框 |
| 330 | updateEmailServiceOptions(); |
| 331 | populateAutoRegistrationEmailServiceOptions(parseInt(elements.autoRegistrationEmailServiceId?.value || '0', 10) || 0); |
| 332 | |
| 333 | if (editingScheduleJobUuid) { |
| 334 | const currentJob = scheduledJobs.find(item => item.job_uuid === editingScheduleJobUuid); |
| 335 | if (currentJob) { |
| 336 | setRegistrationConfigToForm(currentJob.registration_config || {}); |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | addLog('info', '[系统] 邮箱服务列表已加载'); |
| 341 | } catch (error) { |
| 342 | console.error('加载邮箱服务列表失败:', error); |
| 343 | addLog('warning', '[警告] 加载邮箱服务列表失败'); |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | // 更新邮箱服务选择框 |
| 348 | function updateEmailServiceOptions() { |
no test coverage detected