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

Function retryVendorAutoTask

static/js/payment.js:1554–1578  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1552}
1553
1554async function retryVendorAutoTask() {
1555 const taskId = Number(vendorProgressState.taskId || 0);
1556 if (!taskId) {
1557 toast.warning("当前没有可重测任务");
1558 return;
1559 }
1560 const fallbackConfig = collectEfunConfig();
1561 const config = {
1562 ...(vendorProgressState.lastConfig || {}),
1563 redeem_code: String((vendorProgressState.lastConfig || {}).redeem_code || fallbackConfig.code || "").trim(),
1564 api_url: String((vendorProgressState.lastConfig || {}).api_url || fallbackConfig.api_url || "").trim(),
1565 api_key: String((vendorProgressState.lastConfig || {}).api_key || fallbackConfig.api_key || "").trim(),
1566 checkout_url: String((vendorProgressState.lastConfig || {}).checkout_url || "").trim(),
1567 };
1568 if (!config.redeem_code) {
1569 toast.warning("请先填写兑换码");
1570 return;
1571 }
1572 try {
1573 await startVendorAutoBind({ id: taskId }, config);
1574 toast.success(`任务 #${taskId} 已重新开始测试`);
1575 } catch (error) {
1576 toast.error(`重新测试失败: ${formatErrorMessage(error)}`);
1577 }
1578}
1579
1580async function stopVendorAutoTask() {
1581 let taskId = Number(vendorProgressState.taskId || 0);

Callers

nothing calls this directly

Calls 6

collectEfunConfigFunction · 0.85
startVendorAutoBindFunction · 0.85
formatErrorMessageFunction · 0.85
warningMethod · 0.80
successMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected