@@ -421,6 +421,8 @@ class BillingService:
|
|||||||
'vip_expires_at': vip_expires_at.isoformat() if vip_expires_at else None,
|
'vip_expires_at': vip_expires_at.isoformat() if vip_expires_at else None,
|
||||||
'billing_enabled': config.get('enabled', False),
|
'billing_enabled': config.get('enabled', False),
|
||||||
'vip_bypass': config.get('vip_bypass', True),
|
'vip_bypass': config.get('vip_bypass', True),
|
||||||
|
# Public support link for credits recharge / VIP purchase
|
||||||
|
'recharge_telegram_url': os.getenv('RECHARGE_TELEGRAM_URL', '').strip() or 'https://t.me/your_support_bot',
|
||||||
# 功能费用(供前端显示)
|
# 功能费用(供前端显示)
|
||||||
'feature_costs': {
|
'feature_costs': {
|
||||||
'ai_analysis': config.get('cost_ai_analysis', 0),
|
'ai_analysis': config.get('cost_ai_analysis', 0),
|
||||||
|
|||||||
@@ -380,7 +380,8 @@ export default {
|
|||||||
vip_expires_at: null,
|
vip_expires_at: null,
|
||||||
billing_enabled: false,
|
billing_enabled: false,
|
||||||
vip_bypass: true,
|
vip_bypass: true,
|
||||||
feature_costs: {}
|
feature_costs: {},
|
||||||
|
recharge_telegram_url: ''
|
||||||
},
|
},
|
||||||
rechargeTelegramUrl: 'https://t.me/your_support_bot'
|
rechargeTelegramUrl: 'https://t.me/your_support_bot'
|
||||||
}
|
}
|
||||||
@@ -463,7 +464,6 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.loadProfile()
|
this.loadProfile()
|
||||||
this.loadRechargeUrl()
|
|
||||||
this.loadReferrals()
|
this.loadReferrals()
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
@@ -481,6 +481,10 @@ export default {
|
|||||||
// 提取计费信息
|
// 提取计费信息
|
||||||
if (res.data.billing) {
|
if (res.data.billing) {
|
||||||
this.billing = res.data.billing
|
this.billing = res.data.billing
|
||||||
|
// Prefer server-provided public recharge link
|
||||||
|
if (this.billing.recharge_telegram_url) {
|
||||||
|
this.rechargeTelegramUrl = this.billing.recharge_telegram_url
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.profileForm.setFieldsValue({
|
this.profileForm.setFieldsValue({
|
||||||
|
|||||||
Reference in New Issue
Block a user