()
| 1921 | } |
| 1922 | |
| 1923 | async function cancelEfunCard() { |
| 1924 | const config = collectEfunConfig(); |
| 1925 | if (!config.code) { |
| 1926 | toast.warning("请先填写 CDK 激活码"); |
| 1927 | return; |
| 1928 | } |
| 1929 | const ok = await confirm(`确认销卡 ${config.code} 吗?`, "EFun 销卡"); |
| 1930 | if (!ok) return; |
| 1931 | try { |
| 1932 | const data = await callEfunApi("cancel", { |
| 1933 | code: config.code, |
| 1934 | base_url: config.base_url, |
| 1935 | api_key: config.api_key, |
| 1936 | }); |
| 1937 | setEfunResult(data?.data || data); |
| 1938 | toast.success("销卡完成"); |
| 1939 | } catch (error) { |
| 1940 | setEfunResult(`销卡失败: ${formatErrorMessage(error)}`, true); |
| 1941 | toast.error(`销卡失败: ${formatErrorMessage(error)}`); |
| 1942 | } |
| 1943 | } |
| 1944 | |
| 1945 | function updateBindModeSpecificUi(mode) { |
| 1946 | const bindMode = mode || getBindMode(); |
nothing calls this directly
no test coverage detected