测呃呃
This commit is contained in:
parent
d45c0ed029
commit
f242953d94
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user