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

Function loadAutoRegistrationCpaOptions

static/js/app.js:1096–1109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1094}
1095
1096async function loadAutoRegistrationCpaOptions() {
1097 if (!elements.autoRegistrationCpaServiceId) return;
1098 try {
1099 const services = await api.get('/cpa-services?enabled=true');
1100 const options = ['<option value="0">请选择 CPA 服务</option>'];
1101 services.forEach(service => {
1102 options.push(`<option value="${service.id}">${escapeHtml(service.name)} (#${service.id})</option>`);
1103 });
1104 elements.autoRegistrationCpaServiceId.innerHTML = options.join('');
1105 elements.autoRegistrationCpaServiceId.value = elements.autoRegistrationCpaServiceId.dataset.selectedId || '0';
1106 } catch (error) {
1107 console.error('加载 CPA 服务失败:', error);
1108 }
1109}
1110
1111function populateAutoRegistrationEmailServiceOptions(selectedId = 0) {
1112 if (!elements.autoRegistrationEmailServiceId || !elements.autoRegistrationEmailServiceType) return;

Callers 1

app.jsFile · 0.85

Calls 3

errorMethod · 0.80
escapeHtmlFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected