|
@@ -2,6 +2,8 @@ import { View, Text, ScrollView } from '@tarojs/components'
|
|
|
import { navigateBack, navigateTo, useRouter } from '@tarojs/taro'
|
|
import { navigateBack, navigateTo, useRouter } from '@tarojs/taro'
|
|
|
import { useState, useEffect } from 'react'
|
|
import { useState, useEffect } from 'react'
|
|
|
import { useQuery, useMutation } from '@tanstack/react-query'
|
|
import { useQuery, useMutation } from '@tanstack/react-query'
|
|
|
|
|
+import { format } from 'date-fns'
|
|
|
|
|
+import { zhCN } from 'date-fns/locale'
|
|
|
import { orderClient, paymentClient, routeClient, passengerClient, authClient } from '@/api'
|
|
import { orderClient, paymentClient, routeClient, passengerClient, authClient } from '@/api'
|
|
|
import { Navbar, NavbarPresets } from '@/components/ui/navbar'
|
|
import { Navbar, NavbarPresets } from '@/components/ui/navbar'
|
|
|
import { Button } from '@/components/ui/button'
|
|
import { Button } from '@/components/ui/button'
|
|
@@ -545,7 +547,7 @@ export default function OrderPage() {
|
|
|
<View className="space-y-4 mb-6">
|
|
<View className="space-y-4 mb-6">
|
|
|
<View className="flex justify-between items-center">
|
|
<View className="flex justify-between items-center">
|
|
|
<Text className={`text-sm font-medium ${isCharter ? 'text-gray-300' : 'text-gray-600'}`}>出发时间</Text>
|
|
<Text className={`text-sm font-medium ${isCharter ? 'text-gray-300' : 'text-gray-600'}`}>出发时间</Text>
|
|
|
- <Text className={`text-sm font-semibold ${isCharter ? 'text-white' : 'text-gray-900'}`}>{schedule.departureTime}</Text>
|
|
|
|
|
|
|
+ <Text className={`text-sm font-semibold ${isCharter ? 'text-white' : 'text-gray-900'}`}>{schedule.departureTime ? format(new Date(schedule.departureTime), 'yyyy-MM-dd HH:mm', { locale: zhCN }) : '未知时间'}</Text>
|
|
|
</View>
|
|
</View>
|
|
|
<View className="flex justify-between items-center">
|
|
<View className="flex justify-between items-center">
|
|
|
<Text className={`text-sm font-medium ${isCharter ? 'text-gray-300' : 'text-gray-600'}`}>车辆型号</Text>
|
|
<Text className={`text-sm font-medium ${isCharter ? 'text-gray-300' : 'text-gray-600'}`}>车辆型号</Text>
|