测呃呃

This commit is contained in:
Flatlogic Bot 2026-02-22 13:45:40 +00:00
parent d45c0ed029
commit f242953d94

View File

@ -414,7 +414,10 @@ window.lastRechargeStatus = null;
// Helper to get relative API path correctly regardless of subdir
const getApiPath = () => {
return 'api/';
// Determine the path to the api directory relative to current location
const loc = window.location.pathname;
const isRoot = loc.endsWith('/') || loc.endsWith('index.php') || loc.endsWith('recharge.php');
return isRoot ? 'api/' : '../api/';
};
async function updateRate() {