|
|
@@ -181,24 +181,24 @@ const ScheduleListPage: React.FC = () => {
|
|
|
return (
|
|
|
<View className="min-h-screen bg-gray-50">
|
|
|
{/* 头部信息 */}
|
|
|
- <View className="bg-white p-4 border-b border-gray-200">
|
|
|
+ <View className="bg-gradient-to-r from-primary to-primary-dark p-card">
|
|
|
{activityName && (
|
|
|
- <Text className="text-lg font-bold text-gray-800 block">
|
|
|
+ <Text className="text-lg font-bold text-white block">
|
|
|
{activityName}
|
|
|
</Text>
|
|
|
)}
|
|
|
- <Text className="text-base text-gray-600 mt-1 block">
|
|
|
+ <Text className="text-base text-white/90 mt-1 block">
|
|
|
{routes[0]?.startLocation.name} → {routes[0]?.endLocation.name}
|
|
|
</Text>
|
|
|
<View className="mt-2">
|
|
|
- <Text className="text-sm bg-blue-100 text-blue-800 px-2 py-1 rounded-full">
|
|
|
+ <Text className="text-sm bg-white/20 text-white px-2 py-1 rounded-small">
|
|
|
{getRouteTypeLabel()}
|
|
|
</Text>
|
|
|
</View>
|
|
|
</View>
|
|
|
|
|
|
{/* 日期选择 */}
|
|
|
- <View className="bg-white p-4 border-b border-gray-200">
|
|
|
+ <View className="bg-white p-card border-b border-gray-200 shadow-light">
|
|
|
<Text className="text-base font-medium text-gray-800 mb-3 block">
|
|
|
选择出发日期
|
|
|
</Text>
|
|
|
@@ -207,16 +207,16 @@ const ScheduleListPage: React.FC = () => {
|
|
|
{dateOptions.map(date => (
|
|
|
<View
|
|
|
key={date}
|
|
|
- className={`inline-flex flex-col items-center px-4 py-2 rounded-lg border-2 min-w-20 ${
|
|
|
+ className={`inline-flex flex-col items-center px-4 py-2 rounded-medium border-2 min-w-20 ${
|
|
|
selectedDate === date
|
|
|
- ? 'border-blue-500 bg-blue-50'
|
|
|
+ ? 'border-primary bg-primary/10'
|
|
|
: 'border-gray-200 bg-white'
|
|
|
}`}
|
|
|
onClick={() => handleDateChange(date)}
|
|
|
>
|
|
|
<Text
|
|
|
className={`text-sm ${
|
|
|
- selectedDate === date ? 'text-blue-600 font-bold' : 'text-gray-600'
|
|
|
+ selectedDate === date ? 'text-primary font-bold' : 'text-gray-600'
|
|
|
}`}
|
|
|
>
|
|
|
{date}
|
|
|
@@ -247,20 +247,30 @@ const ScheduleListPage: React.FC = () => {
|
|
|
{filteredRoutes.map((route: Route) => (
|
|
|
<View
|
|
|
key={route.id}
|
|
|
- className="bg-white rounded-lg border border-gray-200 p-4 shadow-sm"
|
|
|
+ className={`bg-white rounded-card border p-card shadow-medium ${
|
|
|
+ route.vehicleType === 'charter'
|
|
|
+ ? 'border-charter bg-gradient-to-r from-charter-dark to-charter-bg'
|
|
|
+ : 'border-gray-200'
|
|
|
+ }`}
|
|
|
>
|
|
|
{/* 时间信息和价格 */}
|
|
|
<View className="flex justify-between items-start mb-3">
|
|
|
<View>
|
|
|
- <Text className="text-xl font-bold text-gray-800">
|
|
|
+ <Text className={`text-xl font-bold ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white' : 'text-gray-800'
|
|
|
+ }`}>
|
|
|
{formatTime(route.departureTime)}
|
|
|
</Text>
|
|
|
- <Text className="text-sm text-gray-500 mt-1 block">
|
|
|
+ <Text className={`text-sm mt-1 block ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white/80' : 'text-gray-500'
|
|
|
+ }`}>
|
|
|
预计时长:约2小时
|
|
|
</Text>
|
|
|
</View>
|
|
|
<View className="text-right">
|
|
|
- <Text className="text-2xl font-bold text-orange-500">
|
|
|
+ <Text className={`text-2xl font-bold ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-charter' : 'text-orange-500'
|
|
|
+ }`}>
|
|
|
{formatPrice(route.price, route.vehicleType)}
|
|
|
</Text>
|
|
|
</View>
|
|
|
@@ -268,10 +278,16 @@ const ScheduleListPage: React.FC = () => {
|
|
|
|
|
|
{/* 车辆信息 */}
|
|
|
<View className="flex justify-between items-center mb-3">
|
|
|
- <Text className="text-sm text-gray-600">
|
|
|
+ <Text className={`text-sm ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white/90' : 'text-gray-600'
|
|
|
+ }`}>
|
|
|
{getVehicleTypeName(route.vehicleType)}
|
|
|
</Text>
|
|
|
- <View className="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">
|
|
|
+ <View className={`text-xs px-2 py-1 rounded-small ${
|
|
|
+ route.vehicleType === 'charter'
|
|
|
+ ? 'bg-charter/20 text-charter'
|
|
|
+ : 'bg-primary/10 text-primary'
|
|
|
+ }`}>
|
|
|
{route.vehicleType === 'charter' ? '包车' : '拼车'}
|
|
|
</View>
|
|
|
</View>
|
|
|
@@ -279,18 +295,26 @@ const ScheduleListPage: React.FC = () => {
|
|
|
{/* 地点信息 */}
|
|
|
<View className="space-y-2 mb-3">
|
|
|
<View className="flex items-start">
|
|
|
- <Text className="text-sm text-gray-500 w-12 flex-shrink-0">
|
|
|
+ <Text className={`text-sm w-12 flex-shrink-0 ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white/80' : 'text-gray-500'
|
|
|
+ }`}>
|
|
|
上车:
|
|
|
</Text>
|
|
|
- <Text className="text-sm text-gray-800 flex-1">
|
|
|
+ <Text className={`text-sm flex-1 ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white' : 'text-gray-800'
|
|
|
+ }`}>
|
|
|
{route.pickupPoint}
|
|
|
</Text>
|
|
|
</View>
|
|
|
<View className="flex items-start">
|
|
|
- <Text className="text-sm text-gray-500 w-12 flex-shrink-0">
|
|
|
+ <Text className={`text-sm w-12 flex-shrink-0 ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white/80' : 'text-gray-500'
|
|
|
+ }`}>
|
|
|
下车:
|
|
|
</Text>
|
|
|
- <Text className="text-sm text-gray-800 flex-1">
|
|
|
+ <Text className={`text-sm flex-1 ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white' : 'text-gray-800'
|
|
|
+ }`}>
|
|
|
{route.dropoffPoint}
|
|
|
</Text>
|
|
|
</View>
|
|
|
@@ -298,16 +322,26 @@ const ScheduleListPage: React.FC = () => {
|
|
|
|
|
|
{/* 座位信息 */}
|
|
|
<View className="flex justify-between items-center mb-3">
|
|
|
- <Text className="text-sm text-gray-500">
|
|
|
+ <Text className={`text-sm ${
|
|
|
+ route.vehicleType === 'charter' ? 'text-white/80' : 'text-gray-500'
|
|
|
+ }`}>
|
|
|
{route.vehicleType === 'charter'
|
|
|
? `可载${route.seatCount}人`
|
|
|
: `剩余${route.availableSeats}/${route.seatCount}座`}
|
|
|
</Text>
|
|
|
<View className="flex space-x-1">
|
|
|
- <Text className="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">
|
|
|
+ <Text className={`text-xs px-2 py-1 rounded-small ${
|
|
|
+ route.vehicleType === 'charter'
|
|
|
+ ? 'bg-charter/20 text-charter'
|
|
|
+ : 'bg-success/10 text-success'
|
|
|
+ }`}>
|
|
|
空调
|
|
|
</Text>
|
|
|
- <Text className="text-xs bg-green-100 text-green-800 px-2 py-1 rounded-full">
|
|
|
+ <Text className={`text-xs px-2 py-1 rounded-small ${
|
|
|
+ route.vehicleType === 'charter'
|
|
|
+ ? 'bg-charter/20 text-charter'
|
|
|
+ : 'bg-success/10 text-success'
|
|
|
+ }`}>
|
|
|
免费WiFi
|
|
|
</Text>
|
|
|
</View>
|
|
|
@@ -315,12 +349,12 @@ const ScheduleListPage: React.FC = () => {
|
|
|
|
|
|
{/* 预订按钮 */}
|
|
|
<Button
|
|
|
- className={`w-full py-3 rounded-lg text-base font-medium ${
|
|
|
+ className={`w-full py-button rounded-button text-base font-medium shadow-primary ${
|
|
|
route.availableSeats === 0
|
|
|
? 'bg-gray-300 text-gray-500'
|
|
|
: route.vehicleType === 'charter'
|
|
|
- ? 'bg-green-500 text-white'
|
|
|
- : 'bg-blue-500 text-white'
|
|
|
+ ? 'bg-gradient-to-r from-charter to-charter-light text-white'
|
|
|
+ : 'bg-gradient-to-r from-primary to-primary-dark text-white'
|
|
|
}`}
|
|
|
onClick={() => handleBookRoute(route)}
|
|
|
disabled={route.availableSeats === 0}
|
|
|
@@ -335,7 +369,7 @@ const ScheduleListPage: React.FC = () => {
|
|
|
))}
|
|
|
</View>
|
|
|
) : (
|
|
|
- <View className="bg-white rounded-lg border border-gray-200 p-8 text-center">
|
|
|
+ <View className="bg-white rounded-card border border-gray-200 p-8 text-center shadow-light">
|
|
|
<Text className="text-4xl mb-4">🚌</Text>
|
|
|
<Text className="text-lg text-gray-600 block mb-2">暂无班次</Text>
|
|
|
<Text className="text-sm text-gray-500">请选择其他日期查看</Text>
|