|
|
@@ -115,6 +115,14 @@ export default function OrderScreen({ navigation }) {
|
|
|
}
|
|
|
}, [orderInfo]);
|
|
|
|
|
|
+ const hasRider = useCreation(() => {
|
|
|
+ if (orderInfo.riderStatus !== 'NOT_RECEIVED' && orderInfo.riderStatus) {
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
const detailRef = React.useRef();
|
|
|
const pan = React.useRef(new Animated.ValueXY()).current;
|
|
|
const minMove = React.useRef(new Animated.Value(0)).current;
|
|
|
@@ -322,7 +330,7 @@ export default function OrderScreen({ navigation }) {
|
|
|
{t('lian-xi-ke-fu')}
|
|
|
</Button>
|
|
|
|
|
|
- {!finish && orderInfo.riderStatus !== 'NOT_RECEIVED' && (
|
|
|
+ {!finish && hasRider && (
|
|
|
<Button
|
|
|
fontSize="xs"
|
|
|
flex={1}
|
|
|
@@ -333,12 +341,12 @@ export default function OrderScreen({ navigation }) {
|
|
|
borderWidth={1}
|
|
|
rounded={3}
|
|
|
onPress={(e) => {
|
|
|
- if (!orderInfo.mUserId) {
|
|
|
+ if (!orderInfo.ruserId) {
|
|
|
warnning('骑手信息有误请联系客服');
|
|
|
} else {
|
|
|
navigation.navigate('Chat', {
|
|
|
- toUserId: orderInfo.mUserId,
|
|
|
- toUserName: orderInfo.merShowName,
|
|
|
+ toUserId: orderInfo.ruserId,
|
|
|
+ toUserName: orderInfo.riderName,
|
|
|
});
|
|
|
}
|
|
|
console.log(e);
|
|
|
@@ -358,11 +366,11 @@ export default function OrderScreen({ navigation }) {
|
|
|
borderWidth={1}
|
|
|
rounded={3}
|
|
|
onPress={() => {
|
|
|
- if (!orderInfo.mUserId) {
|
|
|
+ if (!orderInfo.muserId) {
|
|
|
warnning('商家信息有误请联系客服帮你催单');
|
|
|
} else {
|
|
|
navigation.navigate('Chat', {
|
|
|
- toUserId: orderInfo.mUserId,
|
|
|
+ toUserId: orderInfo.muserId,
|
|
|
toUserName: orderInfo.merShowName,
|
|
|
type: 'Reminder',
|
|
|
});
|
|
|
@@ -428,13 +436,12 @@ export default function OrderScreen({ navigation }) {
|
|
|
rounded={3}
|
|
|
ml={14}
|
|
|
onPress={() => {
|
|
|
- if (!orderInfo.mUserId) {
|
|
|
+ if (!orderInfo.muserId) {
|
|
|
warnning('商家信息有误请联系客服帮你催单');
|
|
|
} else {
|
|
|
navigation.navigate('Chat', {
|
|
|
- toUserId: orderInfo.mUserId,
|
|
|
+ toUserId: orderInfo.muserId,
|
|
|
toUserName: orderInfo.merShowName,
|
|
|
- type: 'Reminder',
|
|
|
});
|
|
|
}
|
|
|
}}
|
|
|
@@ -561,7 +568,7 @@ export default function OrderScreen({ navigation }) {
|
|
|
{orderInfo.userAddress}
|
|
|
</Text>
|
|
|
</Flex>
|
|
|
- {orderInfo.riderStatus !== 'NOT_RECEIVED' && (
|
|
|
+ {hasRider && (
|
|
|
<Flex style={styles.info2}>
|
|
|
<Flex.Item>
|
|
|
<Text fontSize="xs" textAlign="left">
|
|
|
@@ -578,14 +585,14 @@ export default function OrderScreen({ navigation }) {
|
|
|
borderWidth={1}
|
|
|
rounded={3}
|
|
|
onPress={() => {
|
|
|
- if (!orderInfo.mUserId) {
|
|
|
- warnning('骑手信息有误请联系客服');
|
|
|
- } else {
|
|
|
- navigation.navigate('Chat', {
|
|
|
- toUserId: orderInfo.mUserId,
|
|
|
- toUserName: orderInfo.merShowName,
|
|
|
- });
|
|
|
- }
|
|
|
+ if (!orderInfo.muserId) {
|
|
|
+ warnning('骑手信息有误请联系客服');
|
|
|
+ } else {
|
|
|
+ navigation.navigate('Chat', {
|
|
|
+ toUserId: orderInfo.muserId,
|
|
|
+ toUserName: orderInfo.merShowName,
|
|
|
+ });
|
|
|
+ }
|
|
|
}}
|
|
|
>
|
|
|
{t('lian-xi-qi-shou')}
|