Browse Source

feat: 按客户要求注释掉没用的功能

zengkunsen 4 months ago
parent
commit
22e46be109

+ 0 - 0
app/(auth)/(tabs)/(account)/(wallet)/settingPage.tsx


+ 0 - 0
app/(auth)/(tabs)/(charging)/sss.tsx


+ 3 - 3
app/hooks/usePushNotifications.ts

@@ -13,8 +13,8 @@ export const usePushNotifications = (): PushNotificationState => {
   const [expoPushToken, setExpoPushToken] = useState<Notifications.ExpoPushToken | undefined>();
   const [notification, setNotification] = useState<Notifications.Notification | undefined>();
 
-  const notificationListener = useRef<Notifications.Subscription>();
-  const responseListener = useRef<Notifications.Subscription>();
+  const notificationListener = useRef<Notifications.EventSubscription>();
+  const responseListener = useRef<Notifications.EventSubscription>();
 
   useEffect(() => {
     Notifications.setNotificationHandler({
@@ -24,7 +24,7 @@ export const usePushNotifications = (): PushNotificationState => {
         shouldSetBadge: true,
         vibrate: true,
         shouldShowWhenInForeground: true
-      })
+      } as any)
     });
 
     registerForPushNotificationAsync().then((token) => {

+ 3 - 3
component/accountPages/accountMainPageComponent.tsx

@@ -125,14 +125,14 @@ const AccountMainPageComponent = () => {
                         <Text className="text-black dark:text-[#36DFFF]">充電記錄</Text>
                     </Pressable>
                 </View>
-                <View className="my-4  ">
-                    <Pressable onPress={() => router.push('uberVerificationPage')}>
+                <View className="my-4">
+                    {/* <Pressable onPress={() => router.push('uberVerificationPage')}>
                         <Image
                             resizeMode="contain"
                             source={require('../../assets/uber20008.png')}
                             style={{ width: imageWidth, height: imageWidth * aspectRatio, alignSelf: 'center' }}
                         />
-                    </Pressable>
+                    </Pressable> */}
                 </View>
                 <View className="w-full h-1 bg-[#DBE4E8] dark:bg-[#253336]" />
                 <View>

+ 1 - 3
component/global/bookingTabViewComponent.tsx

@@ -77,14 +77,12 @@ const processReservations = (reservations, allStations, isFuture): TabItem[] =>
             } catch (e) {
                 console.warn('Error parsing snapshot:', e);
             }
-            
             let stationInfo = null;
             if (snapshot?.stationID) {
                 stationInfo = validStations.find((station) => station?.id === snapshot.stationID);
             } else if (snapshot?.connector) {
                 stationInfo = findStationByConnectorId(validStations, snapshot.connector);
             }
-
             // 确保时间字段存在
             const bookTime = reservation.book_time ? new Date(reservation.book_time) : new Date();
             const actualEndTime = reservation.actual_end_time ? new Date(reservation.actual_end_time) : new Date();
@@ -143,7 +141,7 @@ const BookingTabViewComponentInner: React.FC<BookingTabViewComponentProps> = ({
     // 确保即使 data 为 undefined 也能安全处理
     const reservations = Array.isArray(data?.reservations) ? data.reservations : [];
     const stations = Array.isArray(data?.stations) ? data.stations : [];
-    
+    console.log('iiii', data)
     const tabItems = processReservations(reservations, stations, true);
     const completedReservationTabItems = processReservations(reservations, stations, false);
     return (

+ 21 - 5
component/homePage/homePage.tsx

@@ -365,7 +365,7 @@ const HomePage: React.FC<HomePageProps> = () => {
                         </View>
                     </View>
                     <View className=" flex-1 justify-center ">
-                        <Pressable onPress={() => router.push('searchPage')}>
+                        {/* <Pressable onPress={() => router.push('searchPage')}>
                             <View
                                 style={{
                                     borderWidth: 1,
@@ -377,7 +377,7 @@ const HomePage: React.FC<HomePageProps> = () => {
                             >
                                 <Text style={{ color: '#888888', fontSize: 16 }}>搜尋充電站或地區..</Text>
                             </View>
-                        </Pressable>
+                        </Pressable> */}
                     </View>
                 </View>
                 <View className="flex-1">
@@ -398,7 +398,7 @@ const HomePage: React.FC<HomePageProps> = () => {
                         />
                     </View>
                     <View className="flex-1 flex-row justify-between gap-6">
-                        <View className="flex-1">
+                        {/* <View className="flex-1">
                             <NormalButton
                                 // onPress={() => router.push('bookingMenuPage')}
                                 onPress={() => Alert.alert('即將推出', '此功能即將推出,敬請期待!')}
@@ -414,6 +414,22 @@ const HomePage: React.FC<HomePageProps> = () => {
                                     padding: 24
                                 }}
                             />
+                        </View> */}                   
+                        <View className="flex-1">
+                            <NormalButton
+                                // onPress={() => console.log('掃瞄及充電')}
+                                onPress={() => router.push('vipQrPage')}
+                                title={
+                                    <View className="flex flex-row items-center space-x-2">
+                                        <VipCodeIconSvg />
+                                        <Text className="text-white font-bold text-lg ml-2">專屬會員二維碼</Text>
+                                    </View>
+                                }
+                                extendedStyle={{
+                                    alignItems: 'flex-start',
+                                    padding: 24
+                                }}
+                            />
                         </View>
                         <View className="flex-1">
                             <NormalButton
@@ -431,7 +447,7 @@ const HomePage: React.FC<HomePageProps> = () => {
                             />
                         </View>
                     </View>
-                    <View className="mt-4">
+                    {/* <View className="mt-4">
                         <NormalButton
                             // onPress={() => console.log('掃瞄及充電')}
                             onPress={() => router.push('vipQrPage')}
@@ -446,7 +462,7 @@ const HomePage: React.FC<HomePageProps> = () => {
                                 padding: 24
                             }}
                         />
-                    </View>
+                    </View> */}
                 </View>
             </ScrollView>
         </SafeAreaView>