()
| 1801 | } |
| 1802 | |
| 1803 | function collectEfunConfig() { |
| 1804 | const apiUrl = String(getInputValue("efun-base-url-input") || "").trim(); |
| 1805 | const apiKey = String(getInputValue("efun-api-key-input") || "").trim(); |
| 1806 | const code = normalizeEfunCode(getInputValue("efun-code-input")); |
| 1807 | setInputValue("efun-code-input", code); |
| 1808 | return { |
| 1809 | api_url: apiUrl || undefined, |
| 1810 | // 兼容旧逻辑:仍保留 base_url 别名,映射到同一地址。 |
| 1811 | base_url: apiUrl || undefined, |
| 1812 | api_key: apiKey || undefined, |
| 1813 | code, |
| 1814 | }; |
| 1815 | } |
| 1816 | |
| 1817 | async function callEfunApi(path, payload) { |
| 1818 | return api.post(`/payment/efun/${path}`, payload); |
no test coverage detected