update pay function

This commit is contained in:
2025-11-20 08:09:34 +08:00
parent d5a55c4e02
commit 691c4f6eb1

View File

@@ -668,8 +668,8 @@ export default function SubscriptionContentNew() {
</Text> </Text>
</HStack> </HStack>
<Text color="#D4AF37" fontSize="md" fontWeight="bold"> <Text color="#D4AF37" fontSize="md" fontWeight="bold">
{user.end_date {user.subscription_end_date
? new Date(user.end_date).toLocaleDateString('zh-CN', { ? new Date(user.subscription_end_date).toLocaleDateString('zh-CN', {
year: 'numeric', year: 'numeric',
month: 'long', month: 'long',
day: 'numeric' day: 'numeric'
@@ -679,8 +679,8 @@ export default function SubscriptionContentNew() {
</Text> </Text>
</Flex> </Flex>
{user.end_date && (() => { {user.subscription_end_date && (() => {
const endDate = new Date(user.end_date); const endDate = new Date(user.subscription_end_date);
const today = new Date(); const today = new Date();
const daysLeft = Math.ceil((endDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24)); const daysLeft = Math.ceil((endDate.getTime() - today.getTime()) / (1000 * 60 * 60 * 24));