(id)
| 1415 | } |
| 1416 | |
| 1417 | async function testCpaServiceById(id) { |
| 1418 | try { |
| 1419 | const result = await api.post(`/cpa-services/${id}/test`); |
| 1420 | if (result.success) { |
| 1421 | toast.success(result.message); |
| 1422 | } else { |
| 1423 | toast.error(result.message); |
| 1424 | } |
| 1425 | } catch (e) { |
| 1426 | toast.error('测试失败: ' + e.message); |
| 1427 | } |
| 1428 | } |
| 1429 | |
| 1430 | async function handleTestCpaService() { |
| 1431 | const apiUrl = document.getElementById('cpa-service-url').value.trim(); |