♻️ refactor: Refactor API endpoints to use dynamic API prefix from environment variables
- Updated all service files to replace hardcoded API paths with `${import.meta.env.VITE_API_PREFIX}` for better configurability.
- Ensured consistency across user, common, and gateway services by applying the new API prefix format.
- Removed unnecessary comments and maintained ESLint disable directives where applicable.
This commit is contained in:
@@ -86,7 +86,7 @@ export default function Recharge(
|
||||
const response = await recharge(params);
|
||||
const orderNo = response.data.data?.order_no;
|
||||
if (orderNo) {
|
||||
window.location.href = `/payment?order_no=${orderNo}`;
|
||||
window.location.href = `/#/payment?order_no=${orderNo}`;
|
||||
setOpen(false);
|
||||
}
|
||||
} catch (_error) {
|
||||
|
||||
@@ -90,7 +90,7 @@ export default function Renewal({ id, subscribe }: Readonly<RenewalProps>) {
|
||||
const orderNo = response.data.data?.order_no;
|
||||
if (orderNo) {
|
||||
getUserInfo();
|
||||
window.location.href = `/payment?order_no=${orderNo}`;
|
||||
window.location.href = `/#/payment?order_no=${orderNo}`;
|
||||
}
|
||||
} catch (_error) {
|
||||
/* empty */
|
||||
|
||||
@@ -88,7 +88,7 @@ export default function ResetTraffic({
|
||||
const orderNo = response.data.data?.order_no;
|
||||
if (orderNo) {
|
||||
getUserInfo();
|
||||
window.location.href = `/payment?order_no=${orderNo}`;
|
||||
window.location.href = `/#/payment?order_no=${orderNo}`;
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
Reference in New Issue
Block a user