()
| 2063 | } |
| 2064 | |
| 2065 | function getCheckoutPayload() { |
| 2066 | const accountId = Number(document.getElementById("account-select")?.value || 0); |
| 2067 | if (!accountId) { |
| 2068 | throw new Error("请先选择账号"); |
| 2069 | } |
| 2070 | const payload = { |
| 2071 | account_id: accountId, |
| 2072 | plan_type: selectedPlan, |
| 2073 | country: (document.getElementById("country-select")?.value || "US").toUpperCase(), |
| 2074 | currency: (document.getElementById("currency-display")?.value || "USD").toUpperCase(), |
| 2075 | }; |
| 2076 | if (selectedPlan === "team") { |
| 2077 | payload.workspace_name = document.getElementById("workspace-name")?.value || "MyTeam"; |
| 2078 | payload.seat_quantity = Number(document.getElementById("seat-quantity")?.value || 5) || 5; |
| 2079 | payload.price_interval = document.getElementById("price-interval")?.value || "month"; |
| 2080 | } |
| 2081 | return payload; |
| 2082 | } |
| 2083 | |
| 2084 | function showGeneratedLink(data) { |
| 2085 | generatedLink = data.link || ""; |
no outgoing calls
no test coverage detected