feat: 分站在线充值功能
- 新增 dist_topup.go 控制器,支持易支付/Stripe/Creem/加密货币充值 - 分站模型新增 enable_topup 字段 - 分站前端新增充值页面和导航入口 - 分站设置页新增充值开关 - 添加中英文 i18n 翻译 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
a512c4c344
commit
e981315543
9 files changed
+515
-2
No files matched your search
+10
@@ -67,6 +67,16 @@ export const deleteToken = (id) => api.delete(`/api/dist/token/${id}`);
|
||||
export const redeemCode = (key) => api.post('/api/dist/topup/redeem', { key }); // backend field is "key"
|
||||
export const subscribePackage = (packageId) => api.post('/api/dist/package/subscribe', { package_id: packageId });
|
||||
|
||||
// ===== Online Topup =====
|
||||
export const getTopupInfo = () => api.get('/api/dist/topup/info');
|
||||
export const calculateAmount = (data) => api.post('/api/dist/topup/amount', data);
|
||||
export const createEpayOrder = (data) => api.post('/api/dist/topup/pay', data);
|
||||
export const createStripeOrder = (data) => api.post('/api/dist/topup/stripe/pay', data);
|
||||
export const createCreemOrder = (data) => api.post('/api/dist/topup/creem/pay', data);
|
||||
export const createCryptoOrder = (data) => api.post('/api/dist/topup/crypto/pay', data);
|
||||
export const getCryptoOrderStatus = (tradeNo) => api.get(`/api/dist/topup/crypto/status?trade_no=${tradeNo}`);
|
||||
export const getTopupHistory = (params) => api.get('/api/dist/topup/history', { params });
|
||||
|
||||
// ===== Helpers =====
|
||||
export const quotaToDollar = (quota) => (quota / Q).toFixed(4);
|
||||
export const quotaToDollar6 = (quota) => (quota / Q).toFixed(6);
|
||||
|
||||
Reference in new issue
Block a user