MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / handleServiceChange

Function handleServiceChange

static/js/app.js:562–635  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

560
561// 处理邮箱服务切换
562function handleServiceChange(e) {
563 const value = e.target.value;
564 if (!value) return;
565
566 const [type, id] = value.split(':');
567 // 处理 Outlook 批量注册模式
568 if (type === 'outlook_batch') {
569 isOutlookBatchMode = true;
570 elements.outlookBatchSection.style.display = 'block';
571 elements.regModeGroup.style.display = 'none';
572 elements.batchCountGroup.style.display = 'none';
573 elements.batchOptions.style.display = 'none';
574 loadOutlookAccounts();
575 addLog('info', '[系统] 已切换到 Outlook 批量注册模式');
576 return;
577 } else {
578 isOutlookBatchMode = false;
579 elements.outlookBatchSection.style.display = 'none';
580 elements.regModeGroup.style.display = 'block';
581 }
582
583 // 显示服务信息
584 if (type === 'outlook') {
585 const service = availableServices.outlook.services.find(s => s.id == id);
586 if (service) {
587 addLog('info', `[系统] 已选择 Outlook 账户: ${service.name}`);
588 }
589 } else if (type === 'yyds_mail') {
590 const service = availableServices.yyds_mail.services.find(s => (s.id || 'default') == id);
591 if (service) {
592 addLog('info', `[系统] 已选择 YYDS Mail 渠道: ${service.name}`);
593 }
594 } else if (type === 'web2') {
595 const service = availableServices.web2.services.find(s => s.id == id);
596 if (service) {
597 addLog('info', `[系统] 已选择 Web2 邮箱服务: ${service.name}`);
598 }
599 } else if (type === 'moe_mail') {
600 const service = availableServices.moe_mail.services.find(s => s.id == id);
601 if (service) {
602 addLog('info', `[系统] 已选择自定义域名服务: ${service.name}`);
603 }
604 } else if (type === 'temp_mail') {
605 const service = availableServices.temp_mail.services.find(s => s.id == id);
606 if (service) {
607 addLog('info', `[系统] 已选择 Temp-Mail 自部署服务: ${service.name}`);
608 }
609 } else if (type === 'cloudmail') {
610 const service = availableServices.cloudmail.services.find(s => s.id == id);
611 if (service) {
612 addLog('info', `[系统] 已选择 CloudMail 服务: ${service.name}`);
613 }
614 } else if (type === 'duck_mail') {
615 const service = availableServices.duck_mail.services.find(s => s.id == id);
616 if (service) {
617 addLog('info', `[系统] 已选择 DuckMail 服务: ${service.name}`);
618 }
619 } else if (type === 'luckmail') {

Callers 1

Calls 2

loadOutlookAccountsFunction · 0.85
addLogFunction · 0.85

Tested by

no test coverage detected