|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import {View, Text, TouchableOpacity, StyleSheet, TextInput, ScrollView, Alert} from "react-native"; |
|
|
|
|
import {View, Text, TouchableOpacity, StyleSheet, TextInput, ScrollView, Alert, ActivityIndicator} from "react-native"; |
|
|
|
|
import useCreateOrderStore from "../../store/createOrder"; |
|
|
|
|
import BackIcon from "../../components/BackIcon"; |
|
|
|
|
import { useNavigation, useRoute, RouteProp } from "@react-navigation/native"; |
|
|
|
@ -172,12 +172,16 @@ export const PreviewOrder = () => {
|
|
|
|
|
<TouchableOpacity |
|
|
|
|
style={[ |
|
|
|
|
styles.primaryButtonStyle, |
|
|
|
|
(!showPhoneInput || (showPhoneInput && phoneNumber)) ? {} : styles.disabledButtonStyle |
|
|
|
|
(!showPhoneInput || (showPhoneInput && phoneNumber)) && !loading ? {} : styles.disabledButtonStyle |
|
|
|
|
]} |
|
|
|
|
onPress={handleSubmit} |
|
|
|
|
disabled={showPhoneInput && !phoneNumber} |
|
|
|
|
disabled={(showPhoneInput && !phoneNumber) || loading} |
|
|
|
|
> |
|
|
|
|
<Text style={styles.buttonText}>确认支付</Text> |
|
|
|
|
{loading ? ( |
|
|
|
|
<ActivityIndicator size="small" color="#ffffff" /> |
|
|
|
|
) : ( |
|
|
|
|
<Text style={styles.buttonText}>确认支付</Text> |
|
|
|
|
)} |
|
|
|
|
</TouchableOpacity> |
|
|
|
|
</View> |
|
|
|
|
</View> |
|
|
|
|