Browse Source

this for production ios, 1.2.9, with server message and check version

Ian Fung 1 year ago
parent
commit
5ad1b8d726

+ 4 - 3
component/checkVersion.tsx

@@ -5,9 +5,10 @@ import { Alert, Platform, BackHandler } from 'react-native';
 
 export function checkVersion(fetchedVersion: { version: string; isActive: boolean }) {
     const currentVersion = Constants.expoConfig?.version;
+
     // console.log('currentVersion', currentVersion);
-    // console.log('fetchedVersion', fetchedVersion.version);
-    // console.log('fetchedVersion.isActive', fetchedVersion.isActive);
+    console.log('fetchedVersion', fetchedVersion.version);
+    console.log('fetchedVersion.isActive', fetchedVersion.isActive);
 
     if (!fetchedVersion.isActive) {
         Alert.alert(
@@ -30,7 +31,7 @@ export function checkVersion(fetchedVersion: { version: string; isActive: boolea
         // Prevent any further code execution
         throw new Error('MAINTENANCE_MODE');
     }
-
+    // if (currentVersion && currentVersion !== '1.2.9') {
     if (currentVersion && currentVersion !== fetchedVersion.version) {
         Alert.alert(
             '請更新到最新版本',

+ 2 - 17
component/registrationMultiStepForm/formComponent/formPages/loginPage.tsx

@@ -151,16 +151,7 @@ const LoginPage: React.FC<LoginPageProps> = ({ goToNextPage, goToForgetPassWordP
                         立即按我前往綁定頁面
                     </Text>
                 </Pressable>
-                {/* <NormalInput
-                    placeholder="輸入電話號碼"
-                    value={loginPhone}
-                    onChangeText={(phone) => setLoginPhone(phone)}
-                    extendedStyle={{ borderRadius: 12, padding: 20 }}
-                    textContentType="username"
-                    autoComplete="username"
-                    keyboardType="email-address"
-                    autoCapitalize="none"
-                /> */}
+     
 
                 <PhoneInput
                     value={loginPhone}
@@ -238,13 +229,7 @@ const LoginPage: React.FC<LoginPageProps> = ({ goToNextPage, goToForgetPassWordP
                     <Pressable className="self-start" onPress={() => goToForgetPassWordPage()}>
                         <Text style={styles.text}>忘記密碼</Text>
                     </Pressable>
-                    {/* <View className="flex flex-row justify-center absolute top-16 left-0 right-0 items-center">
-                        <View className="flex-1 h-[1px] bg-[#888888] mx-2" />
-                        <Pressable onPress={goToBindingPhoneNumberPage}>
-                            <Text className="text-[#888888] text-lg">舊用戶/已有用戶/手機號碼綁定</Text>
-                        </Pressable>
-                        <View className="flex-1 h-[1px] bg-[#888888] mx-2" />
-                    </View> */}
+               
                 </View>
             </View>
         </View>