update pay function
This commit is contained in:
4
app.py
4
app.py
@@ -579,7 +579,7 @@ class User(UserMixin, db.Model):
|
||||
'billing_cycle': subscription.billing_cycle,
|
||||
'start_date': subscription.start_date.isoformat() if subscription.start_date else None,
|
||||
'end_date': subscription.end_date.isoformat() if subscription.end_date else None,
|
||||
'auto_renew': subscription.auto_renew
|
||||
'auto_renewal': subscription.auto_renewal
|
||||
})
|
||||
else:
|
||||
# 无订阅时使用默认值
|
||||
@@ -589,7 +589,7 @@ class User(UserMixin, db.Model):
|
||||
'billing_cycle': None,
|
||||
'start_date': None,
|
||||
'end_date': None,
|
||||
'auto_renew': False
|
||||
'auto_renewal': False
|
||||
})
|
||||
|
||||
# 敏感信息只在需要时包含
|
||||
|
||||
@@ -634,11 +634,14 @@ export default function SubscriptionContentNew() {
|
||||
<Text color="white" fontSize="lg" fontWeight="bold">
|
||||
当前订阅: {user.subscription_type === 'max' ? 'Max 旗舰版' : 'Pro 专业版'}
|
||||
</Text>
|
||||
{user.billing_cycle && (
|
||||
<Text color="rgba(255, 255, 255, 0.6)" fontSize="xs">
|
||||
{user.billing_cycle === 'monthly' ? '月付' :
|
||||
user.billing_cycle === 'quarterly' ? '季付' :
|
||||
user.billing_cycle === 'semiannual' ? '半年付' : '年付'}
|
||||
user.billing_cycle === 'semiannual' ? '半年付' :
|
||||
user.billing_cycle === 'yearly' ? '年付' : user.billing_cycle}
|
||||
</Text>
|
||||
)}
|
||||
</VStack>
|
||||
</HStack>
|
||||
<Badge
|
||||
|
||||
Reference in New Issue
Block a user