Browse Source

perf: 新增充电概要

kuns 4 weeks ago
parent
commit
b5e93dc697

+ 2 - 2
app.json

@@ -2,7 +2,7 @@
     "expo": {
         "name": "Crazy Charge",
         "slug": "template",
-        "version": "1.3.14",
+        "version": "1.3.15",
         "orientation": "portrait",
         "icon": "./assets/CC_Logo.png",
         "userInterfaceStyle": "light",
@@ -123,7 +123,7 @@
                 "projectId": "dc6b7a3f-cf92-441a-8962-0f25e8d06902"
             }
         },
-        "runtimeVersion": "1.3.14",
+        "runtimeVersion": "1.3.15",
         "updates": {
             "url": "https://u.expo.dev/dc6b7a3f-cf92-441a-8962-0f25e8d06902"
         },

+ 4 - 2
app/(auth)/(tabs)/(home)/totalPayment.tsx

@@ -563,7 +563,9 @@ const TotalPayment = () => {
                         <Text style={styles.grayColor} className="text-sm lg:text-base mt-4">
                             每度電價錢 : $ {currentPriceTotalPayment ? currentPriceTotalPayment : 'Loading...'}
                         </Text>
-
+                        <Text style={styles.grayColor} className="text-sm lg:text-base mt-4">
+                          注: 跨時段充電將按不同時段的單價分別計费,實際充電量可能浮動
+                        </Text>
                         <View className="h-0.5 my-3 bg-[#f4f4f4]" />
 
                         {processed_coupon_store && processed_coupon_store.length > 0 && (
@@ -608,7 +610,7 @@ const TotalPayment = () => {
                         {processed_coupon_store && processed_coupon_store.length > 0 && (
                             <View className="h-0.5 my-3 bg-[#f4f4f4]" />
                         )}
-                        <View className="flex-row justify-between ">
+                        <View className="flex-row justify-between">
                             <Text className="text-xl">總計</Text>
                             <Text className="text-3xl">HK$ {totalPrice !== null ? totalPrice : 'Loading...'}</Text>
                         </View>

+ 0 - 38
component/chargingPage/paymentSummaryPageComponent.tsx

@@ -75,44 +75,6 @@ const PaymentSummaryPageComponent = () => {
 
     const promotion_code = selectedCouponRedeemCode || '';
 
-    // const convertEndTime = (num1: number) => {
-    //     switch (num1) {
-    //         case 20:
-    //             return 25;
-    //         case 25:
-    //             return 30;
-    //         case 30:
-    //             return 40;
-    //         case 40:
-    //             return 45;
-    //     }
-    // };
-
-    // function convertToUTC(date, bookTime) {
-    //     const currentYear = new Date().getFullYear();
-    //     const [month, day] = date.split('/');
-    //     const fullDate = new Date(`${currentYear}-${month}-${day}T${bookTime}:00`);
-    //     fullDate.setHours(fullDate.getHours());
-    //     return fullDate;
-    // }
-
-    // const book_time = convertToUTC(date, bookTime);
-    // const timeRequiredInMinute = convertEndTime(Number(chargingWatt.split(' ')[0]));
-
-    // function findEndTime(num1, book_time) {
-    //     const date = new Date(book_time);
-    //     date.setMinutes(date.getMinutes() + num1);
-    //     return date;
-    // }
-
-    // let end_time;
-    // if (chargingWatt === '') {
-    //     end_time = book_time;
-    // } else {
-    //     const endingTime = findEndTime(timeRequiredInMinute, book_time);
-    //     end_time = endingTime;
-    // }
-
     const total_fee = parseInt(finalFee, 10);
 
     function convertToUTC(date: string, time: string): Date {