فهرست منبع

版本0814 订单展示

panhui 5 سال پیش
والد
کامیت
420615a7a2

+ 2 - 1
.vscode/settings.json

@@ -4,5 +4,6 @@
 		"language",
 		"locales"
 	],
-	"i18n-ally.keystyle": "nested"
+	"i18n-ally.keystyle": "nested",
+	"i18n-ally.sourceLanguage": "zh-CN"
 }

+ 12 - 0
Utils/MapUtils.js

@@ -16,6 +16,7 @@ async function getLocation() {
       if (res.status === 'granted') {
         return Location.getCurrentPositionAsync({
           enableHighAccuracy: true,
+          timeout: 5000,
         });
       } else {
         return Promise.reject();
@@ -56,6 +57,17 @@ async function getLocation() {
         return Promise.reject();
       }
     })
+    .catch((e) => {
+      return request.get(
+        `https://apis.map.qq.com/ws/location/v1/ip?key=${tengxunKey}`
+      );
+    })
+    .then((res) => {
+      return Promise.resolve({
+        addressName: '定位失败',
+        location: res.result.location,
+      });
+    })
     .catch((e) => {
       return Promise.resolve({
         addressName: '定位失败',

+ 16 - 0
Utils/OrderUtils.js

@@ -202,6 +202,21 @@ function getStatusInfo(orderInfo) {
   }
 }
 
+function getGoodsInfo(orderGoodsSpecs) {
+  const info = {
+    list: orderGoodsSpecs,
+  };
+
+  if (orderGoodsSpecs.length > 0) {
+    info.num = orderGoodsSpecs.reduce((pre, cur) => {
+      return pre + cur.num;
+    }, 0);
+
+    info.name = orderGoodsSpecs[0].goods.name;
+  }
+  return info;
+}
+
 const reasonMap = new Map([
   ['UNABLE_TO_DELIVER', { name: i18n.t('dang-qian-ding-dan-wu-fa-pei-song') }],
   [
@@ -239,5 +254,6 @@ export {
   RiderStatusMap,
   payMap,
   getStatusInfo,
+  getGoodsInfo,
   reasonMap,
 };

+ 51 - 0
Utils/TimeFnUtils.ts

@@ -0,0 +1,51 @@
+import moment from 'moment';
+
+function today() {
+  return __DEV__
+    ? '2020-06-17 00:00:00,2020-06-17 23:59:59'
+    : moment().format('YYYY-MM-DD') +
+        ' 00:00:00,' +
+        moment().add(1, 'days').format('YYYY-MM-DD') +
+        ' 00:00:00';
+}
+
+function getSearchDate(showDate) {
+  return (
+    showDate +
+    ' 00:00:00,' +
+    moment(showDate, 'yyyy-MM')
+      .add(1, 'months')
+      .add(-1, 'seconds')
+      .format('yyyy-MM-DD') +
+    ' 23:59:59'
+  );
+}
+
+class MonthDate {
+  constructor() {
+    var list = [];
+    for (let i = 0; i < 6; i++) {
+      list.push(
+        moment()
+          .add(0 - i, 'months')
+          .format('yyyy-MM')
+      );
+    }
+    this.showList = list;
+  }
+}
+
+function parse(date, formatStr = 'yyyy-MM-DD HH:mm:ss') {
+  return moment(date, formatStr);
+}
+
+function getChatTime(date, formatStr = 'yyyy-MM-DD HH:mm:ss') {
+  if (parse(date).format('yyyy-MM-DD') === moment().format('yyyy-MM-DD')) {
+    return parse(date).format('HH:mm');
+  } else {
+    return parse(date).format('MM-DD HH:mm');
+  }
+}
+
+
+export { today, MonthDate, getSearchDate, parse, getChatTime };

+ 8 - 4
Utils/TotastUtils.js

@@ -31,7 +31,8 @@ export function alert(title, content, submitEvent) {
         },
         style: { color: '#FFC21C', fontSize: 12, lineHeight: 30 },
       },
-    ]
+    ],
+    () => true
   );
 }
 
@@ -59,7 +60,8 @@ export function alertWithoutCancel(title, content, isError, submitEvent) {
         },
         style: { color: '#FFC21C', fontSize: 12, lineHeight: 30 },
       },
-    ]
+    ],
+    () => true
   );
 }
 export function operation() {
@@ -88,7 +90,8 @@ export function connectKefu(orderId) {
         },
         style: { color: '#FFC21C', fontSize: 12, lineHeight: 30 },
       },
-    ]
+    ],
+    () => true
   );
 }
 
@@ -105,6 +108,7 @@ export function prompt(title, plac, defaultValue, callBack) {
     },
     'default',
     defaultValue || '',
-    [plac || '']
+    [plac || ''],
+    () => true
   );
 }

+ 8 - 2
app.json

@@ -2,7 +2,11 @@
   "expo": {
     "name": "叮咚外卖用户端",
     "slug": "DingdongClient",
-    "platforms": ["ios", "android", "web"],
+    "platforms": [
+      "ios",
+      "android",
+      "web"
+    ],
     "version": "1.0.1",
     "orientation": "portrait",
     "icon": "./assets/images/icon.png",
@@ -17,7 +21,9 @@
     "updates": {
       "fallbackToCacheTimeout": 0
     },
-    "assetBundlePatterns": ["**/*"],
+    "assetBundlePatterns": [
+      "**/*"
+    ],
     "ios": {
       "supportsTablet": true,
       "bundleIdentifier": "com.izouma.dingdongClient",

+ 89 - 0
chat/ChatScreen.tsx

@@ -0,0 +1,89 @@
+import { StackScreenProps } from '@react-navigation/stack';
+import React, { useState, useCallback, useEffect } from 'react';
+import { Platform, View, KeyboardAvoidingView } from 'react-native';
+import { Div, Button, Image, Text, Avatar } from 'react-native-magnus';
+import { GiftedChat } from 'react-native-gifted-chat';
+import { ScrollView } from 'react-native-gesture-handler';
+import { useRequest } from '@umijs/hooks';
+import { useTranslation } from 'react-i18next';
+import * as Localization from 'expo-localization';
+import useModel from 'flooks';
+import User from '../flooks/User';
+import IM from './model.ts';
+import { parse } from '../Utils/TimeFnUtils.ts';
+
+export default function ChatScreen({ navigation, route }: StackScreenProps) {
+  const { params } = route;
+  const { toUserId, toUserName } = params;
+  const { t } = useTranslation();
+
+  if (toUserName) {
+    navigation.setOptions({
+      title: toUserName,
+    });
+  }
+
+  const { id, userInfo, chatInfo } = useModel(User, [
+    'id',
+    'chatInfo',
+    'userInfo',
+  ]);
+
+  const [messages, setMessages] = useState([]);
+  const { sendMessage } = useModel(IM, []);
+
+  const { loading, run } = useRequest(
+    `/chat/showChat?userOne=${id}&userTwo=${toUserId}`,
+    {
+      defaultLoading: false,
+      initialData: [],
+      onSuccess: (data) => {
+        const list = data.map((item, index) => {
+          return {
+            _id: index,
+            text: item.content,
+            createdAt: parse(item.sendTime),
+            user: {
+              _id: item.sendUserId,
+              name: item.sendNickName,
+              avatar: item.sendAvatar,
+            },
+          };
+        });
+        setMessages(list);
+      },
+    }
+  );
+
+  React.useEffect(() => {
+    if (chatInfo && chatInfo.from === toUserId.toString()) {
+      run();
+    }
+  }, [chatInfo]);
+
+  // eslint-disable-next-line no-shadow
+  const onSend = useCallback((messages = []) => {
+    console.log(messages);
+    sendMessage(messages[0].text, toUserId);
+    setMessages((previousMessages) =>
+      GiftedChat.append(previousMessages, messages)
+    );
+  }, []);
+
+  return (
+    <Div flex={1}>
+      <GiftedChat
+        placeholder={t('qing-shu-ru-liao-tian-nei-rong')}
+        messages={messages}
+        // eslint-disable-next-line no-shadow
+        onSend={(messages) => onSend(messages)}
+        showUserAvatar
+        user={{
+          _id: userInfo.id,
+          avatar: userInfo.avatar,
+        }}
+      />
+      {Platform.OS === 'android' && <KeyboardAvoidingView behavior="padding" />}
+    </Div>
+  );
+}

+ 72 - 0
chat/NoticeCom.tsx

@@ -0,0 +1,72 @@
+import * as React from 'react';
+import { Div, Button, Image, Text, Avatar } from 'react-native-magnus';
+import { getChatTime } from '../Utils/TimeFnUtils.ts';
+
+const logo = require('../assets/images/logo.png');
+
+export default function NoticeCom({
+  info = {
+    receiveUserId: 0,
+  },
+  type,
+  userId,
+  onPress,
+  toUserName = '',
+}) {
+  const {
+    receiveUserId,
+    isRead,
+    content,
+    receiveAvatar,
+    sendAvatar,
+    sendTime,
+  } = info;
+  const isReceive = type === 'email' || receiveUserId === userId;
+  const active = !isRead && isReceive;
+  const avatar = isReceive ? sendAvatar : receiveAvatar;
+  return (
+    <Button block bg="white" py={0} px={13} rounded="none" onPress={onPress}>
+      <Div
+        flex={1}
+        row
+        py={10}
+        alignItems="center"
+        borderBottomWidth={1}
+        borderBottomColor="gray100"
+      >
+        <Div
+          w={10}
+          h={10}
+          bg={active ? 'yellow500' : 'gray100'}
+          rounded="circle"
+        />
+
+        {type !== 'user' ? (
+          <Div w={33} h={33} bg="green300" rounded="sm" ml={10} />
+        ) : (
+          <Image
+            w={33}
+            h={33}
+            source={avatar ? { uri: avatar } : logo}
+            ml={10}
+            rounded="circle"
+          />
+        )}
+
+        <Div flex={1} justifyContent="space-between" ml={5}>
+          <Div row>
+            <Text fontSize="sm" flex={1}>
+              {type === 'user' ? toUserName : info.title}
+            </Text>
+            <Text fontSize="xs" color="gray400">
+              {getChatTime(sendTime)}
+            </Text>
+          </Div>
+          <Text fontSize="xs" color="gray400" numberOfLines={1}>
+            {content || ''}
+          </Text>
+        </Div>
+      </Div>
+    </Button>
+  );
+}

+ 151 - 0
chat/NoticeScreen.tsx

@@ -0,0 +1,151 @@
+/* eslint-disable no-use-before-define */
+import { StackScreenProps } from '@react-navigation/stack';
+import * as React from 'react';
+import { useFocusEffect, useNavigation } from '@react-navigation/native';
+import { Div, Button, Image, Text, Avatar } from 'react-native-magnus';
+import { ScrollView, FlatList } from 'react-native-gesture-handler';
+import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
+import Constants from 'expo-constants';
+import { useTranslation } from 'react-i18next';
+import useModel from 'flooks';
+import { useMount } from '@umijs/hooks';
+
+import IM from './model.ts';
+import User from '../flooks/User';
+
+import NoticeCom from './NoticeCom.tsx';
+
+const NoticeTab = createMaterialTopTabNavigator();
+
+export default function NoticeScreen({ navigation }: StackScreenProps) {
+  const { t } = useTranslation();
+  const webRef = React.useRef();
+  const { initChat } = useModel(IM, []);
+
+  useFocusEffect(
+    React.useCallback(() => {
+      initChat();
+    }, [])
+  );
+  return (
+    <Div bg="gray100" flex={1}>
+      <Div bg="yellow500" pt={Constants.statusBarHeight + 11} pb={11}>
+        <Text color="white" textAlign="center" fontSize="xl" fontWeight="bold">
+          {t('xiao-xi-zhong-xin')}
+        </Text>
+      </Div>
+      <NoticeTab.Navigator
+        initialRouteName="Sys"
+        style={{ flexGrow: 1 }}
+        tabBarOptions={{
+          inactiveTintColor: '#000',
+          activeTintColor: '#FFC21C',
+          indicatorStyle: { height: 0 },
+          labelStyle: { fontSize: 15 },
+          style: {
+            backgroundColor: '#f2f2f2',
+            elevation: 0,
+            shadowOffset: {
+              width: 0,
+              height: 0,
+            },
+            shadowOpacity: 0,
+            shadowRadius: 0,
+          },
+        }}
+      >
+        <NoticeTab.Screen
+          name="Sys"
+          component={SysNoticeScreen}
+          options={{
+            title: t('xi-tong-xiao-xi'),
+          }}
+        />
+        <NoticeTab.Screen
+          name="Chat"
+          component={UserChatScreen}
+          options={{
+            title: t('yong-hu-xiao-xi'),
+          }}
+        />
+      </NoticeTab.Navigator>
+    </Div>
+  );
+}
+
+function SysNoticeScreen({ navigation }) {
+  const { sysNoticeList } = useModel(IM, ['sysNoticeList']);
+  const { t } = useTranslation();
+  return (
+    <FlatList
+      renderItem={({ item }) => {
+        return (
+          <NoticeCom
+            info={item}
+            type="email"
+            onPress={() => {
+              navigation.navigate('NoticeStack', {
+                screen: 'EmailDetail',
+                params: {
+                  emailId: item.id,
+                },
+              });
+            }}
+          />
+        );
+      }}
+      data={sysNoticeList}
+      keyExtractor={(item, index) => `email${index}`}
+      ListEmptyComponent={() => {
+        return (
+          <Text color="gary200" fontSize="sm" textAlign="center" py={20}>
+            {t('zan-wu-shu-ju')}
+          </Text>
+        );
+      }}
+      contentContainerStyle={{ flexGrow: 1, backgroundColor: '#fff' }}
+    />
+  );
+}
+
+function UserChatScreen({ navigation }) {
+  const { chatList } = useModel(IM, ['chatList']);
+  const { id } = useModel(User, ['id']);
+  const { t } = useTranslation();
+  return (
+    <FlatList
+      renderItem={({ item }) => {
+        const isReceive = item.receiveUserId === id;
+        const toUserId = isReceive ? item.sendUserId : item.receiveUserId;
+        const toUserName = isReceive ? item.sendNickname : item.receiveNickname;
+        return (
+          <NoticeCom
+            info={item}
+            userId={id}
+            type="user"
+            toUserName={toUserName}
+            onPress={() => {
+              navigation.navigate('NoticeStack', {
+                screen: 'Chat',
+                params: {
+                  toUserId,
+                  toUserName,
+                },
+              });
+            }}
+          />
+        );
+      }}
+      data={chatList}
+      keyExtractor={(item, index) => `chat${index}`}
+      contentContainerStyle={{ flexGrow: 1, backgroundColor: '#fff' }}
+      ListEmptyComponent={() => {
+        return (
+          <Text color="gary200" fontSize="sm" textAlign="center" py={20}>
+            {t('zan-wu-shu-ju')}
+          </Text>
+        );
+      }}
+    />
+  );
+}

+ 68 - 0
chat/TimScreen.tsx

@@ -0,0 +1,68 @@
+import { StackScreenProps } from '@react-navigation/stack';
+import * as React from 'react';
+import { useNavigation } from '@react-navigation/native';
+import { WebView } from 'react-native-webview';
+
+import { useTranslation } from 'react-i18next';
+import useModel from 'flooks';
+import { useMount } from '@umijs/hooks';
+
+import IM from './model.ts';
+
+export default function TimScreen({ navigation }: StackScreenProps) {
+  const { t } = useTranslation();
+  const webRef = React.useRef();
+  const {
+    getChat,
+    userID,
+    userSig,
+    tim,
+    setTim,
+    initChat,
+    updateChatInfo,
+  } = useModel(IM, ['userID', 'userSig', 'tim']);
+  useMount(() => {
+    initChat();
+  });
+
+  React.useEffect(() => {
+    if (userSig && tim)
+      tim.injectJavaScript(
+        `window.chatLogin(${JSON.stringify(userID)},${JSON.stringify(userSig)})`
+      );
+  }, [userSig, tim]);
+
+  return (
+    <WebView
+      ref={webRef}
+      source={{
+        uri: `http://dingdong.izouma.com/map/tim`,
+      }}
+      onMessage={({ nativeEvent }) => {
+        console.log(nativeEvent);
+        const info =
+          nativeEvent.data.indexOf('{') !== -1
+            ? JSON.parse(nativeEvent.data)
+            : {};
+        console.log(info);
+        console.log(info.name);
+        console.log(info.conversationType);
+        switch (info.name) {
+          case 'onConversationListUpdated':
+            getChat();
+            break;
+
+          default:
+            break;
+        }
+
+        if (Array.isArray(info)) {
+          updateChatInfo(info[0]);
+        }
+      }}
+      onLoadEnd={() => {
+        setTim(webRef.current);
+      }}
+    />
+  );
+}

+ 75 - 0
chat/model.ts

@@ -0,0 +1,75 @@
+import TIM from 'tim-js-sdk';
+import COS from 'cos-js-sdk-v5';
+import request from '../Utils/RequestUtils';
+import User from '../flooks/User';
+
+const IM = (now) => ({
+  SDKAppID: 1400375593,
+  userID: 0,
+  userSig: null,
+  messages: [],
+  chatList: [],
+  sysNoticeList: [],
+  chatInfo: {},
+  tim: null,
+  getSysNotice() {
+    request.get('/email/my').then((res) => {
+      now({ sysNoticeList: res });
+    });
+  },
+  getChat() {
+    request.get('/chat/my').then((res) => {
+      if (res) {
+        now({ chatList: res });
+      }
+    });
+  },
+  initChat() {
+    const { getSysNotice, getChat, getUserSig } = now();
+    getUserSig();
+    getSysNotice();
+    getChat();
+  },
+  getUserSig() {
+    const { id } = now(User);
+    request
+      .get('/chat/getUserSig', {
+        params: {
+          userId: id,
+        },
+      })
+      .then((res) => {
+        now({
+          userSig: res,
+          userID: id,
+        });
+      });
+  },
+  updateChatInfo(info) {
+    now({ chatInfo: info });
+  },
+  sendMessage(content, receiveUserId) {
+    const { id } = now(User);
+    request
+      .post('/chat/save', {
+        data: {
+          sendUserId: id,
+          receiveUserId,
+          content,
+        },
+      })
+      .then((res) => {
+        const { timSend } = now();
+        timSend(content, receiveUserId);
+      });
+  },
+  setTim(tim) {
+    now({ tim });
+  },
+  timSend(text, toUserId) {
+    const { tim } = now();
+    if (tim) tim.injectJavaScript(`window.sendMessage(${text},${toUserId})`);
+  },
+});
+
+export default IM;

+ 1 - 1
flooks/User.js

@@ -34,7 +34,7 @@ const app = (now) => ({
       .post('/auth/login', {
         data: {
           username: submitPhone(phone),
-          password,
+          password
         },
         requestType: 'form',
       })

+ 229 - 34
locales/en.json

@@ -1,46 +1,241 @@
 {
-  "welcom": "Welcome to use Dingdong takeaway platform",
+  "welcom": "Welcome to use the Dingdong takeaway platform",
   "di-tu-xuan-dian-ce-shi": "Map selection test",
+  "tui-chu-deng-lu": "sign out",
   "jia-zai-zhong": "Loading...",
   "qie-huan-yu-yan": "Switch language",
-  "tui-chu-deng-lu": "sign out",
-  "cha-kan": "View",
-  "cny": "¥",
-  "qing-kong": "Empty",
-  "shang-jia-biao-qian": "Merchant label",
   "you-hui-huo-dong": "Promotions",
-  "yi-shi-wo-men-ke-yi-geng-hao-di-bang-nin-jie-jue-wen-ti": "So that we can better help you solve the problem",
-  "tips2": "In order for us to understand the situation more intuitively, please add detailed information!",
-  "tips1": "Merchants and riders have already taken orders, and in a hurry, the merchant can refuse to cancel your order. \nIt is recommended that you contact the merchant first.",
-  "shen-qing-qu-xiao-ding-dan": "Application to cancel the order",
-  "shen-qing-qu-xiao": "Apply for cancellation",
-  "qu-xiao-yuan-yin": "Reason for Cancellation",
+  "shang-jia-biao-qian": "Merchant label",
+  "cny": "",
+  "qing-kong": "Empty",
+  "cha-kan": "View",
+  "mi": "Meter",
+  "shan-chu": "delete",
+  "yue-shou": "Monthly sale",
+  "qi-song": "Send",
+  "pei-song": "Delivery",
+  "fen-zhong": "minute",
+  "jian": "Less",
+  "xin-dian-tui-jian": "New store recommendation",
+  "geng-duo-xin-dian": "More new stores",
+  "dao-ji-shi": "Countdown",
+  "you-hui-zhuan-qu": "special price area",
+  "xuan-ze-shou-huo-di-zhi": "Choose shipping address",
+  "guan-li": "management",
+  "xiao-qu-xie-zi-lou-xue-xiao-deng": "Community/office building/school etc.",
+  "dang-qian-ding-wei": "Current location",
+  "zhong-xin-ding-wei": "re-locate",
+  "ding-wei-shi-bai": "Positioning failed",
+  "sou-suo": "search for",
+  "xiang-chi-shi-mo-sou-yi-sou": "What do you want to eat? Search",
   "qu-xiao": "cancel",
-  "qing-wu-bi-tian-xie-zhen-shi-yuan-yin": "Please fill in the real reason",
+  "fan-hui": "return",
+  "re-men-sou-suo": "Hot search",
+  "zan-wu-shu-ju": "No data temporarily",
+  "shen-qing-qu-xiao-ding-dan": "Application to cancel the order",
+  "tips1": "Merchants and riders have already accepted the order and are rushing in, the merchant can reject your cancellation request",
+  "lian-xi-shang-jia": "Contact the merchant",
   "nin-ru-guo-que-ding-qu-xiao": "If you are sure to cancel",
-  "lian-xi-shang-jia": "Contact merchant",
+  "qing-wu-bi-tian-xie-zhen-shi-yuan-yin": "Please fill in the real reason",
+  "qu-xiao-yuan-yin": "Reason for Cancellation",
+  "tips2": "In order for us to understand the situation more intuitively, please add detailed information!",
+  "shen-qing-qu-xiao": "Apply for cancellation",
+  "ding-dan-tou-su": "Order complaint",
+  "tou-su": "Complaint",
+  "content1": "Specific complaint content can be added, the authenticity of your complaint is very important to our handling",
+  "ti-jiao": "submit",
+  "tou-su-shang-jia": "Complain against the business",
+  "tou-su-qi-shou": "Complaints against riders",
+  "wei-zhao-dao-tou-su-xiang": "No complaint found",
+  "lian-xi-ke-fu": "Contact Customer Service",
+  "tip3": "After the evaluation, you will get a red envelope!",
+  "tipss4": "Anonymous to the rider",
+  "content2": "Say which li is good, which li is not good enough. Other customers want to know, merchants want to know",
+  "yi-dui-shang-jia-ni-ming": "Anonymous to the business",
+  "wo-de-ding-dan": "My Order",
+  "qu-xiao-ding-dan": "cancel order",
   "ding-dan-xiang-qing": "order details",
-  "ding-dan": "Orders",
-  "fa-xian-mei-shi": "Discover food",
-  "bao-cun": "save",
-  "bian-ji": "edit",
-  "bian-ji-di-zhi": "Edit address",
-  "biao-qian": "label",
-  "men-pai-hao": "House number",
-  "nv-shi": "Ms",
-  "qing-xuan-zhi-shou-huo-di-zhi": "Please select the delivery address",
+  "song-da": "service",
+  "yu-ji": "Expected",
+  "lian-xi-qi-shou": "Contact rider",
+  "cui-dan": "Reminders",
+  "da-shang-qi-shou": "Reward rider",
+  "li-ji-ping-jia": "Rate now",
+  "bao-zhuang-fei": "Packaging fee",
+  "can-he": "Lunch box",
+  "pei-song-fei-ding-dong-zhuan-song": "Delivery fee (Dingdong special delivery)",
+  "man-jian": "Full reduction",
+  "shou-dan": "First order",
+  "hong-bao": "Red envelope",
+  "xiao-ji": "Subtotal",
+  "ding-dan-xin-xi": "order information",
+  "xia-dan-shi-jian": "order time",
+  "song-da-shi-jian": "delivery time",
+  "yu-ji-song-da-shi-jian": "Estimated delivery time",
   "shou-huo-di-zhi": "Shipping address",
-  "shou-ji-hao": "phone number",
-  "shu-ru-shou-ji-hao": "input mobile phone number",
-  "xian": "limit",
-  "xian-sheng": "Mr",
+  "pei-song-qi-shou": "Delivery rider",
+  "ding-dan-hao": "order number",
+  "fu-zhi": "copy",
+  "fu-zhi-cheng-gong": "Copy successfully",
+  "zhi-fu-fang-shi": "Payment method",
+  "ding-dan-bei-zhu": "order notes",
+  "keewai-tian-xie-ding-dan-bei-zhu": "Additional order notes can be filled in",
+  "chang-yong-biao-qian": "Commonly used labels",
+  "connect1": "Helping you to contact the business",
+  "yi-song-da": "arrived",
+  "ding-dan-shi-jian": "Order time",
+  "ding-dan-shang-pin": "Order item",
+  "deng": "other",
+  "jian2": "Pieces",
+  "zai-lai-yi-dan": "One more order",
+  "zhun-shi-shuai": "On-time rate",
+  "ri-jun-song-dan": "Daily delivery",
+  "da-shang-jiang-quanezhuan-gei-qi-shou": "The reward will be transferred to the rider in full",
+  "da-shang": "Reward",
+  "qing-xuan-ze": "please choose",
+  "li-ji-shen-qing": "apply immediately",
+  "deng-lu-mi-ma": "login password",
+  "she-zhi-mi-ma": "set password",
+  "ban-ben-hao": "version number",
+  "wo-de-shou-cang": "my collection",
+  "shen-qing-ti-jiao-cheng-gong": "Application submitted successfully",
+  "shang-wu-he-zuo-shen-qing": "Business cooperation application",
+  "shu-ru-lian-xi-ren": "Enter contact person",
   "xing-ming": "Name",
-  "di-zhi-lie-biao": "Address list",
+  "shu-ru-lian-xi-dian-hua": "Enter phone number",
+  "lian-xi-dian-hua": "contact number",
+  "qi-wang-he-zuo-de-nei-rong": "Expected cooperation content",
+  "tian-jia-shang-pin-jian-jie-bu-chao-guo-50-zi": "Add product introduction (no more than 50 words)",
+  "he-zuo-shen-qing": "Cooperation application",
+  "shang-jia-ru-zhu": "Merchant settled",
+  "tips5": "Food, desserts and beverages, fresh fruits, massage businesses have settled",
+  "tips6": "Please contact for merchants to cooperate",
+  "lian-xi-fang-shi": "Contact method",
+  "qi-shou-zhao-mu": "Recruitment of riders",
+  "rider": "Work harder, get more money, no cap, time is free",
+  "rider2": "Please contact for rider recruitment cooperation",
+  "shang-wu-he-zuo": "Business Cooperation",
+  "shang-wu-he-zuo-qing-lian-xi": "Please contact for business cooperation",
+  "fankui1": "Thank you for your feedback, we will optimize the product or service based on your feedback, and provide you with a better user experience",
+  "fankui2": "What do you have comments or suggestions for us, or feedback to us about the problems encountered, so that we can provide you with better services (required)",
+  "zui-duo-500-zi": "Up to 500 words",
+  "qing-shu-ru-lian-xi-xin-xi-xuan-tian": "Please enter contact information (optional)",
+  "tips8": "Contact information will be encrypted and transmitted for you to protect your privacy",
+  "ti-jiao-fan-kui": "Submit feedback",
+  "kai-dian-shen-qing": "Shop application",
+  "lian-xi-ren": "Contact person",
+  "shu-ru-dian-pu-ming-cheng": "Enter store name",
+  "dian-pu-ming-cheng": "Store Name",
+  "shu-ru-jing-ying-lei-xing": "Enter business type",
+  "jing-ying-lei-xing": "Management Type",
+  "qing-shu-ru-dian-pu-di-zhi": "Please enter the store address",
+  "dian-pu-di-zhi": "shop adress",
+  "qi-shou-shen-qing": "Rider application",
+  "address": "Please enter the desired work address",
+  "addrss2": "Desired work address",
+  "yin-si-tiao-kuan": "Privacy Policy",
+  "yin-si-zheng-ce": "Privacy Policy",
+  "wei-deng-lu": "Not logged in",
+  "ge-ren-zi-liao": "Personal information",
+  "tou-xiang": "Avatar",
+  "ni-cheng": "nickname",
+  "qing-shu-ru-ni-cheng": "Please enter a nickname",
+  "ding-dong-wai-mai": "Dingdong Takeaway",
+  "wo-de-di-zhi": "my address",
+  "she-zhi": "Set up",
+  "yi-jian-fan-kui": "Opinion feedback",
+  "man": "full",
+  "yuan-ke-yong": "Meta can be used",
+  "wu-jinemen-jian": "No gold, amount threshold",
+  "xian": "limit",
+  "zhi": "To",
+  "shi-yong": "Use",
+  "yi-guo-qi": "expired",
+  "qu-shi-yong": "To use",
+  "hong-bao-ka-quan": "Red envelope coupons",
+  "you-hui-quan-yi-guo-qi": "Coupon has expired",
+  "dian-pu-bu-ke-yong": "Store not available",
+  "xuan-ze-you-hui-quan": "Choose a coupon",
+  "wu-ke-yong-you-hui-quan": "No coupon available",
+  "ge-wei-shi-yong-hong-bao": "unused red envelopes",
+  "tui-jian-shang-jia": "Recommended business",
+  "fa-xian-mei-shi": "Discover gourmet",
+  "ju-li": "distance",
+  "xiao-liang": "Sales",
+  "shai-xuan": "filter",
+  "wai-mai": "Takeaway",
+  "ding-dan": "Order",
+  "wo-de": "mine",
   "mo-ren": "default",
-  "shan-chu": "delete",
+  "bian-ji": "edit",
+  "di-zhi-lie-biao": "Address list",
   "xin-zeng-di-zhi": "Add address",
-  "qing-xuan-ze": "please choose",
-  "qing-xuan-ze-di-zhi": "Please select an address",
-  "xuan-ze-shou-huo-di-zhi": "Choose delivery address",
-  "zan-wu-shu-ju": "No data"
-}
+  "bian-ji-di-zhi": "Edit address",
+  "shu-ru-shou-ji-hao": "Enter your phone number",
+  "xian-sheng": "man",
+  "nv-shi": "Female",
+  "shou-ji-hao": "phone number",
+  "qing-xuan-zhi-shou-huo-di-zhi": "Please choose the delivery address",
+  "qing-shu-ru-men-pai-hao": "Please enter the house number",
+  "men-pai-hao": "House number",
+  "biao-qian": "label",
+  "she-wei-mo-ren": "set as Default",
+  "bao-cun": "save",
+  "qing-xuan-ze-di-zhi": "Please select address",
+  "dang-qian-zan-wu-di-zhi": "No address currently available",
+  "que-ding-yao-tui-chu-gai-zhang-hao-ma": "Are you sure you want to log out of this account",
+  "tui-chu-cheng-gong": "exit successfully",
+  "geng-xin-cheng-gong": "update completed",
+  "zhu-ce-cheng-gong": "registration success",
+  "deng-lu-cheng-gong": "login successful",
+  "ti-shi": "Reminders",
+  "que-ding": "determine",
+  "tips9": "Thank you for your trust in us, we will do our best to solve the problem for you. Every one of your suggestions and feedback is crucial to us",
+  "ke-fu-dian-hua": "consumer hotline",
+  "wo-yao-tou-su": "I want to complain",
+  "dai-shang-jia-jie-dan": "To be received by the merchant",
+  "shang-jia-yi-jie-dan": "Merchant has taken the order",
+  "shang-jia-yi-tui-dan": "Merchant refunded",
+  "yi-wan-cheng": "completed',",
+  "ding-dan-wei-zhi-fu": "Order not paid",
+  "yong-hu-yi-zhi-fu": "The user has already paid",
+  "dai-ping-jia": "comment",
+  "ding-dan-yi-qu-xiao": "Order cancelled",
+  "shen-qing-tui-kuan-zhong": "Applying for refund",
+  "tui-kuan-zhong": "Refunding",
+  "yi-tui-kuan": "refunded",
+  "dai-qi-shou-jie-dan": "Waiting to ride and take orders",
+  "qi-shou-yi-jie-dan": "The rider has taken the order",
+  "qi-shou-yi-qu-can": "The rider has picked up the meal",
+  "ding-dan-zheng-zai-pei-song-zhong": "The order is being shipped",
+  "ding-dan-yi-song-da": "Order has been delivered",
+  "zhi-fu-bao": "Alipay",
+  "huo-dao-fu-kuan": "Cash on delivery",
+  "xin-yong-ka": "Credit card",
+  "dang-qian-ding-dan-wu-fa-pei-song": "Current order cannot be delivered",
+  "pei-song-shi-jian-tai-chang": "Delivery time is too long",
+  "di-zhi-tian-xie-cuo-wu": "Wrong address",
+  "shang-jia-wu-fa-song-da-lian-xi-wo-qu-xiao": "The business cannot be delivered, contact me to cancel",
+  "shang-jia-que-huo-da-yang-lian-xi-wo-qu-xiao": "Merchant is out of stock/closes, contact me to cancel",
+  "wang-ji-shi-yong-hong-bao": "Forgot to use red envelopes",
+  "wang-dian-zhu-shi": "Forget the staple food",
+  "qi-shou-lian-xi-wo-qu-xiao": "Please contact me to cancel",
+  "dian-duo-le-dian-cuo-le-lou-dian-le": "Too many points / wrong points / missing points",
+  "lin-shi-you-shi-bu-xiang-yao-le": "I don’t want something temporarily",
+  "qi-ta-yuan-yin": "other reasons",
+  "zong-he-pai-xu": "Comprehensive ranking",
+  "hao-ping-you-xian": "Praise first",
+  "qi-song-fei-zui-di": "Minimum delivery fee",
+  "pei-song-zui-kuai": "Fastest delivery",
+  "pei-song-fei-zui-di": "Lowest delivery fee",
+  "ren-jun-zui-di": "The lowest",
+  "ren-jun-zui-gao": "Highest per capita",
+  "xin-shang-jia": "New business",
+  "ming-xing-shang-jia": "Star business",
+  "shou-dan-li-jian": "First order reduction",
+  "man-jian-you-hui": "Full discount",
+  "zhe-kou-shang-jia": "Discount merchant",
+  "xia-dan-fan-hong-bao": "Order a red envelope",
+  "ke-yong-hong-bao": "Available red envelopes",
+  "yi-shi-wo-men-ke-yi-geng-hao-di-bang-nin-jie-jue-wen-ti": "So that we can better help you solve the problem"
+}

+ 229 - 34
locales/th.json

@@ -1,46 +1,241 @@
 {
-  "welcom": "ยินดีต้อนรับสู่แพลตฟอร์มDing dong",
-  "di-tu-xuan-dian-ce-shi": "การทดสอบการเลือกแผนที่",
+  "welcom": "ยินดีต้อนรับสู่การใช้แพลตฟอร์ม  Dingdong",
+  "di-tu-xuan-dian-ce-shi": "การทดสอบเลือกแผนที่",
+  "tui-chu-deng-lu": "ออกจากระบบ",
   "jia-zai-zhong": "กำลังโหลด ...",
   "qie-huan-yu-yan": "เปลี่ยนภาษา",
-  "tui-chu-deng-lu": "ออกจากระบบ",
-  "cha-kan": "ดู",
-  "cny": "¥",
-  "qing-kong": "ว่างเปล่า",
-  "shang-jia-biao-qian": "ป้ายกำกับของผู้ค้า",
   "you-hui-huo-dong": "โปรโมชั่น",
-  "yi-shi-wo-men-ke-yi-geng-hao-di-bang-nin-jie-jue-wen-ti": "เพื่อให้เราสามารถช่วยคุณแก้ปัญหาได้ดีขึ้น",
-  "tips2": "เพื่อให้เราเข้าใจสถานการณ์ได้ง่ายขึ้นโปรดเพิ่มข้อมูลโดยละเอียด!",
-  "tips1": "ผู้ค้าและผู้ขับขี่ได้รับคำสั่งซื้อแล้วและรีบร้อนผู้ค้าสามารถปฏิเสธที่จะยกเลิกคำสั่งซื้อของคุณ \nขอแนะนำให้คุณติดต่อผู้ขายก่อน",
-  "shen-qing-qu-xiao-ding-dan": "ประยุกต์ใช้ในการยกเลิกคำสั่งซื้อ",
-  "shen-qing-qu-xiao": "สมัครเพื่อยกเลิก",
-  "qu-xiao-yuan-yin": "เหตุผลในการยกเลิก",
+  "shang-jia-biao-qian": "ป้ายสินค้าของผู้ค้า",
+  "cny": "หยวน",
+  "qing-kong": "ว่างเปล่า",
+  "cha-kan": "ดู",
+  "mi": "เมตร",
+  "shan-chu": "ลบ",
+  "yue-shou": "ขายรายเดือน",
+  "qi-song": "ไปส่ง",
+  "pei-song": "การจัดส่งสินค้า",
+  "fen-zhong": "นาที",
+  "jian": "น้อยกว่า",
+  "xin-dian-tui-jian": "แนะนำร้านใหม่",
+  "geng-duo-xin-dian": "ร้านค้าใหม่เพิ่มเติม",
+  "dao-ji-shi": "นับถอยหลัง",
+  "you-hui-zhuan-qu": "พื้นที่ราคาพิเศษ",
+  "xuan-ze-shou-huo-di-zhi": "เลือกที่อยู่จัดส่ง",
+  "guan-li": "การจัดการ",
+  "xiao-qu-xie-zi-lou-xue-xiao-deng": "ชุมชน / อาคารสำนักงาน / โรงเรียน ฯลฯ",
+  "dang-qian-ding-wei": "สถานที่อยู่ปัจจุบัน",
+  "zhong-xin-ding-wei": "ค้นหาอีกครั้ง",
+  "ding-wei-shi-bai": "การค้นหาตำแหน่งล้มเหลว",
+  "sou-suo": "ค้นหา",
+  "xiang-chi-shi-mo-sou-yi-sou": "ค้นหาสิ่งที่คุณต้องการกิน",
   "qu-xiao": "ยกเลิก",
-  "qing-wu-bi-tian-xie-zhen-shi-yuan-yin": "กรุณากรอกเหตุผลที่แท้จริง",
-  "nin-ru-guo-que-ding-qu-xiao": "หากคุณแน่ใจว่าจะยกเลิก",
+  "fan-hui": "กลับ",
+  "re-men-sou-suo": "การค้นหายอดนิยม",
+  "zan-wu-shu-ju": "ไม่มีข้อมูล",
+  "shen-qing-qu-xiao-ding-dan": "ประยุกต์ใช้ในการยกเลิกคำสั่งซื้อ",
+  "tips1": "ร้านค้าและผู้ขับขี่ยอมรับคำสั่งซื้อแล้วและกำลังจะรีบมาอย่างรวดเร็วร้านค้าสามารถปฏิเสธที่จะยกเลิกคำสั่งซื้อของคุณ  ขอแนะนำให้คุณติดต่อร้านค้าก่อน",
   "lian-xi-shang-jia": "ติดต่อผู้ขาย",
+  "nin-ru-guo-que-ding-qu-xiao": "คุณแน่ใจว่าจะยกเลิก",
+  "qing-wu-bi-tian-xie-zhen-shi-yuan-yin": "กรุณากรอกเหตุผล",
+  "qu-xiao-yuan-yin": "เหตุผลในการยกเลิก",
+  "tips2": "เพื่อให้เราเข้าใจสถานการณ์ได้ง่ายขึ้นโปรดให้ข้อมูลโดยละเอียด!",
+  "shen-qing-qu-xiao": "สมัครเพื่อยกเลิก",
+  "ding-dan-tou-su": "ร้องเรียนการสั่งซื้อ",
+  "tou-su": "การร้องเรียน",
+  "content1": "สามารถเพิ่มข้อร้องเรียนเพราะการร้องเรียนของคุณเป็นสิ่งสำคัญมากสำหรับการจัดการของเรา",
+  "ti-jiao": "ข้อเสนอแนะ",
+  "tou-su-shang-jia": "ร้องเรียนร้านค้า",
+  "tou-su-qi-shou": "ร้องเรียนผู้ขับขี่",
+  "wei-zhao-dao-tou-su-xiang": "ไม่พบคำร้องเรียน",
+  "lian-xi-ke-fu": "ติดต่อฝ่ายบริการลูกค้า",
+  "tip3": "หลังจากการประเมินคุณจะได้รับหงเปา",
+  "tipss4": "ไม่ระบุชื่อผู้ขับขี่",
+  "content2": "สิ่งที่ดีและสิ่งที่ไม่ดี  ลูกค้าอื่น ๆ ต้องการทราบร้านค้าต้องการทราบ",
+  "yi-dui-shang-jia-ni-ming": "ไม่ระบุชื่อธุรกิจ",
+  "wo-de-ding-dan": "คำสั่งซื้อของฉัน",
+  "qu-xiao-ding-dan": "ยกเลิกคำสั่งซื้อ",
   "ding-dan-xiang-qing": "รายละเอียดการสั่งซื้อ",
-  "ding-dan": "สั่งซื้อ",
-  "fa-xian-mei-shi": "ค้นพบอาหาร",
-  "bao-cun": "บันทึก",
-  "bian-ji": "แก้ไข",
-  "bian-ji-di-zhi": "แก้ไขที่อยู่",
-  "biao-qian": "ฉลาก",
-  "men-pai-hao": "เลขที่บ้าน",
-  "nv-shi": "นางสาว",
-  "qing-xuan-zhi-shou-huo-di-zhi": "กรุณาเลือกที่อยู่จัดส่ง",
+  "song-da": "ส่งถึง",
+  "yu-ji": "ความคาดหวัง",
+  "lian-xi-qi-shou": "ติดต่อผู้ขับขี่",
+  "cui-dan": "การแจ้งเตือน",
+  "da-shang-qi-shou": "รางวัลผู้ขับขี่",
+  "li-ji-ping-jia": "อัตราในขณะนี้",
+  "bao-zhuang-fei": "ค่าบรรจุภัณฑ์",
+  "can-he": "กล่องอาหารกลางวัน",
+  "pei-song-fei-ding-dong-zhuan-song": "ค่าจัดส่ง (Dingdong จัดส่งพิเศษ)",
+  "man-jian": "ลดเต็ม",
+  "shou-dan": "คำสั่งซื้อครั้งแรก",
+  "hong-bao": "หงเปา",
+  "xiao-ji": "ไม่ทั้งหมด",
+  "ding-dan-xin-xi": "ข้อมูลการสั่งซื้อ",
+  "xia-dan-shi-jian": "เวลาสั่งซื้อ",
+  "song-da-shi-jian": "เวลาการส่งมอบ",
+  "yu-ji-song-da-shi-jian": "เวลาการจัดส่งโดยประมาณ",
   "shou-huo-di-zhi": "ที่อยู่สำหรับจัดส่ง",
-  "shou-ji-hao": "หมายเลขโทรศัพท์",
-  "shu-ru-shou-ji-hao": "ใส่หมายเลขโทรศัพท์มือถือ",
-  "xian": "จำกัด",
-  "xian-sheng": "นาย",
+  "pei-song-qi-shou": "จัดส่งผู้ขับขี่",
+  "ding-dan-hao": "หมายเลขสั่งซื้อ",
+  "fu-zhi": "คัดลอก",
+  "fu-zhi-cheng-gong": "คัดลอกสำเร็จ",
+  "zhi-fu-fang-shi": "วิธีการชำระเงิน",
+  "ding-dan-bei-zhu": "บันทึกการสั่งซื้อ",
+  "keewai-tian-xie-ding-dan-bei-zhu": "สามารถกรอกบันทึกการสั่งซื้อเพิ่มเติมได้",
+  "chang-yong-biao-qian": "ป้ายสินค้าที่ใช้บ่อย",
+  "connect1": "ช่วยคุณติดต่อธุรกิจ",
+  "yi-song-da": "มาถึงแล้ว",
+  "ding-dan-shi-jian": "เวลาสั่งซื้อ",
+  "ding-dan-shang-pin": "รายการสั่งซื้อ",
+  "deng": "รอสักครู่",
+  "jian2": "ชิ้น",
+  "zai-lai-yi-dan": "คำสั่งอื่น",
+  "zhun-shi-shuai": "อัตราตรงเวลา",
+  "ri-jun-song-dan": "จัดส่งทุกวัน",
+  "da-shang-jiang-quanezhuan-gei-qi-shou": "รางวัลจะถูกโอนไปยังผู้ขับขี่เต็มจำนวน",
+  "da-shang": "รางวัล",
+  "qing-xuan-ze": "โปรดเลือก",
+  "li-ji-shen-qing": "สมัครได้ทันที",
+  "deng-lu-mi-ma": "รหัสผ่านการเข้าใช้งาน",
+  "she-zhi-mi-ma": "ตั้งรหัสผ่าน",
+  "ban-ben-hao": "หมายเลขรุ่น",
+  "wo-de-shou-cang": "คอลเล็กชั่นของฉัน",
+  "shen-qing-ti-jiao-cheng-gong": "ส่งใบสมัครเรียบร้อยแล้ว",
+  "shang-wu-he-zuo-shen-qing": "แอปพลิเคชันความร่วมมือทางธุรกิจ",
+  "shu-ru-lian-xi-ren": "ป้อนผู้ติดต่อ",
   "xing-ming": "ชื่อ",
-  "di-zhi-lie-biao": "รายการที่อยู่",
+  "shu-ru-lian-xi-dian-hua": "ป้อนหมายเลขโทรศัพท์",
+  "lian-xi-dian-hua": "เบอร์ติดต่อ",
+  "qi-wang-he-zuo-de-nei-rong": "เนื้อหาความร่วมมือที่คาดหวัง",
+  "tian-jia-shang-pin-jian-jie-bu-chao-guo-50-zi": "เพิ่มคำอธิบายผลิตภัณฑ์ (ไม่เกิน 50 คำ)",
+  "he-zuo-shen-qing": "แอปพลิเคชันความร่วมมือ",
+  "shang-jia-ru-zhu": "ร้านค้าอยู่ในเว็บไซต์",
+  "tips5": "อาหารของหวานเครื่องดื่มผลไม้ธุรกิจนวดได้อยู่ในเว็บไซต์",
+  "tips6": "กรุณาติดต่อสำหรับร้านค้าที่จะร่วมมือ",
+  "lian-xi-fang-shi": "ข้อมูลติดต่อ",
+  "qi-shou-zhao-mu": "ค้นหาผู้ขับขี่",
+  "rider": "ทำงานให้หนักขึ้นรับเงินมากขึ้นโดยไม่มีเวลาว่าง",
+  "rider2": "กรุณาติดต่อสำหรับความร่วมมือการสรรหาผู้ขับขี่",
+  "shang-wu-he-zuo": "ความร่วมมือทางธุรกิจ",
+  "shang-wu-he-zuo-qing-lian-xi": "กรุณาติดต่อสำหรับความร่วมมือทางธุรกิจ",
+  "fankui1": "ขอบคุณสำหรับคำติชมของคุณเราจะปรับปรุงผลิตภัณ",
+  "fankui2": "คุณมีความคิดเห็นหรือข้อเสนอแนะสำหรับเราหรือข้อเสนอแนะปัญหาที่พบเพื่อให้เราสามารถให้บริการที่ดีขึ้น (จำเป็น)",
+  "zui-duo-500-zi": "มากถึง 500 คำ",
+  "qing-shu-ru-lian-xi-xin-xi-xuan-tian": "กรุณากรอกข้อมูลการติดต่อ (ไม่จำเป็น)",
+  "tips8": "ข้อมูลการติดต่อจะถูกเข้ารหัสและส่งให้คุณเพื่อปกป้องความเป็นส่วนตัวของคุณ",
+  "ti-jiao-fan-kui": "ส่งข้อเสนอแนะ",
+  "kai-dian-shen-qing": "แอพพลิเคชั่น",
+  "lian-xi-ren": "บุคคลที่ติดต่อ",
+  "shu-ru-dian-pu-ming-cheng": "ป้อนชื่อร้านค้า",
+  "dian-pu-ming-cheng": "ชื่อร้าน",
+  "shu-ru-jing-ying-lei-xing": "ป้อนประเภทธุรกิจ",
+  "jing-ying-lei-xing": "ประเภทการจัดการ",
+  "qing-shu-ru-dian-pu-di-zhi": "กรุณากรอกที่อยู่ร้านค้า",
+  "dian-pu-di-zhi": "ที่อยู่ร้านค้า",
+  "qi-shou-shen-qing": "แอปพลิเคชั่นไรเดอร์",
+  "address": "กรุณากรอกที่อยู่ที่ต้องการ",
+  "addrss2": "ที่อยู่ที่ต้องการทำงาน",
+  "yin-si-tiao-kuan": "นโยบายความเป็นส่วนตัว",
+  "yin-si-zheng-ce": "นโยบายความเป็นส่วนตัว",
+  "wei-deng-lu": "ไม่ได้เข้าสู่ระบบ",
+  "ge-ren-zi-liao": "ข้อมูลส่วนบุคคล",
+  "tou-xiang": "สัญลักษณ์",
+  "ni-cheng": "ชื่อเล่น",
+  "qing-shu-ru-ni-cheng": "กรุณากรอกชื่อเล่น",
+  "ding-dong-wai-mai": "Ding dong Food delivery",
+  "wo-de-di-zhi": "ที่อยู่ของฉัน",
+  "she-zhi": "ติดตั้ง",
+  "yi-jian-fan-kui": "ผลตอบรับ",
+  "man": "เต็ม",
+  "yuan-ke-yong": "หยวนพร้อมใช้งาน",
+  "wu-jinemen-jian": "ไม่มีเกณฑ์จำนวนเงิน",
+  "xian": "จำกัด",
+  "zhi": "ถึง",
+  "shi-yong": "ใช้",
+  "yi-guo-qi": "ที่หมดอายุแล้ว",
+  "qu-shi-yong": "ใช้",
+  "hong-bao-ka-quan": "คูปองหงเปา",
+  "you-hui-quan-yi-guo-qi": "คูปองหมดอายุแล้ว",
+  "dian-pu-bu-ke-yong": "ร้านค้าไม่พร้อมใช้งาน",
+  "xuan-ze-you-hui-quan": "เลือกคูปอง",
+  "wu-ke-yong-you-hui-quan": "ไม่มีคูปอง",
+  "ge-wei-shi-yong-hong-bao": "หงเปาที่ยังไม่ได้ใช้",
+  "tui-jian-shang-jia": "แนะนำธุรกิจ",
+  "fa-xian-mei-shi": "ค้นพบร้านอาหาร",
+  "ju-li": "ระยะทาง",
+  "xiao-liang": "ขาย",
+  "shai-xuan": "กรอง",
+  "wai-mai": "Food delivery",
+  "ding-dan": "ใบสั่งซื้อ",
+  "wo-de": "ของฉัน",
   "mo-ren": "ค่าเริ่มต้น",
-  "shan-chu": "ลบ",
+  "bian-ji": "แก้ไข",
+  "di-zhi-lie-biao": "รายการที่อยู่",
   "xin-zeng-di-zhi": "เพิ่มที่อยู่",
-  "qing-xuan-ze": "โปรดเลือก",
+  "bian-ji-di-zhi": "แก้ไขที่อยู่",
+  "shu-ru-shou-ji-hao": "ใส่หมายเลขโทรศัพท์มือถือ",
+  "xian-sheng": "นาย",
+  "nv-shi": "นางสาว",
+  "shou-ji-hao": "หมายเลขโทรศัพท์",
+  "qing-xuan-zhi-shou-huo-di-zhi": "กรุณาเลือกที่อยู่จัดส่ง",
+  "qing-shu-ru-men-pai-hao": "กรุณากรอกเลขที่บ้าน",
+  "men-pai-hao": "เลขที่บ้าน",
+  "biao-qian": "ป้าย",
+  "she-wei-mo-ren": "ตั้งเป็นค่าเริ่มต้น",
+  "bao-cun": "บันทึก",
   "qing-xuan-ze-di-zhi": "กรุณาเลือกที่อยู่",
-  "xuan-ze-shou-huo-di-zhi": "เลือกที่อยู่จัดส่ง",
-  "zan-wu-shu-ju": "ไม่มีข้อมูล"
-}
+  "dang-qian-zan-wu-di-zhi": "ไม่มีที่อยู่ปัจจุบัน",
+  "que-ding-yao-tui-chu-gai-zhang-hao-ma": "คุณแน่ใจหรือว่าต้องการออกจากระบบบัญชีนี้",
+  "tui-chu-cheng-gong": "ออกเรียบร้อยแล้ว",
+  "geng-xin-cheng-gong": "การอัปเดตเสร็จสมบูรณ์",
+  "zhu-ce-cheng-gong": "ลงทะเบียนสำเร็จ",
+  "deng-lu-cheng-gong": "เข้าสู่ระบบสำเร็จ",
+  "ti-shi": "แจ้งเตือน",
+  "que-ding": "ยืนยัน",
+  "tips9": "อขอบคุณสำหรับความไว้วางใจเราเราจะทำอย่างดีที่สุดแก้ปัญหาให้คุณ  ข้อเสนอแนะและคำติชมของคุณมีความสำคัญต่อเราอย่างยิ่ง",
+  "ke-fu-dian-hua": "สายด่วนผู้บริโภค",
+  "wo-yao-tou-su": "ฉันต้องการที่จะคอมเพลน",
+  "dai-shang-jia-jie-dan": "ที่จะได้รับจากคนขาย",
+  "shang-jia-yi-jie-dan": "ผู้ขายได้รับคำสั่งซื้อ",
+  "shang-jia-yi-tui-dan": "ผู้ขายได้คืนเงินสำหรับการสั่งซื้อ",
+  "yi-wan-cheng": "เสร็จสิ้น",
+  "ding-dan-wei-zhi-fu": "ใบสั่งซื้อที่ค้างชำระ",
+  "yong-hu-yi-zhi-fu": "ลูกค้าจ่าย",
+  "dai-ping-jia": "ความคิดเห็น",
+  "ding-dan-yi-qu-xiao": "คำสั่งซื้อถูกยกเลิก",
+  "shen-qing-tui-kuan-zhong": "สมัครขอรับเงินคืน",
+  "tui-kuan-zhong": "คืนเงิน",
+  "yi-tui-kuan": "คืนเงิน",
+  "dai-qi-shou-jie-dan": "รอคนขับรับคำสั่งซื้อ",
+  "qi-shou-yi-jie-dan": "คนขับได้รับคำสั่งซื้อ",
+  "qi-shou-yi-qu-can": "ผู้ขับขี่ได้อาหารแล้ว",
+  "ding-dan-zheng-zai-pei-song-zhong": "คำสั่งซื้อกำลังถูกจัดส่ง",
+  "ding-dan-yi-song-da": "ส่งคำสั่งซื้อแล้ว",
+  "zhi-fu-bao": "Alipay",
+  "huo-dao-fu-kuan": "จ่ายด้วยเงินสด",
+  "xin-yong-ka": "บัตรเครดิต",
+  "dang-qian-ding-dan-wu-fa-pei-song": "คำสั่งซื้อปัจจุบันไม่สามารถส่งได้",
+  "pei-song-shi-jian-tai-chang": "เวลาจัดส่งนานเกินไป",
+  "di-zhi-tian-xie-cuo-wu": "ที่อยู่ผิด",
+  "shang-jia-wu-fa-song-da-lian-xi-wo-qu-xiao": "ไม่สามารถส่งผู้ขายได้โปรดติดต่อฉันเพื่อยกเลิก",
+  "shang-jia-que-huo-da-yang-lian-xi-wo-qu-xiao": "ขายหมด / ร้านปิดแล้วโปรดติดต่อฉันเพื่อยกเลิก",
+  "wang-ji-shi-yong-hong-bao": "ลืมใช้หงเปา",
+  "wang-dian-zhu-shi": "ลืมอาหารหลัก",
+  "qi-shou-lian-xi-wo-qu-xiao": "ผู้ขับขี่ติดต่อฉันเพื่อยกเลิก",
+  "dian-duo-le-dian-cuo-le-lou-dian-le": "คะแนนมากเกินไป / จุดผิด / จุดที่ขาดหายไป",
+  "lin-shi-you-shi-bu-xiang-yao-le": "ฉันไม่ต้องการบางสิ่ง",
+  "qi-ta-yuan-yin": "เหตุผลอื่น ๆ",
+  "zong-he-pai-xu": "การจัดอันดับที่ครอบคลุม",
+  "hao-ping-you-xian": "ชื่นชมก่อน",
+  "qi-song-fei-zui-di": "ค่าธรรมเนียมการจัดส่งขั้นต่ำ",
+  "pei-song-zui-kuai": "การจัดส่งที่เร็วที่สุด",
+  "pei-song-fei-zui-di": "ค่าธรรมเนียมการจัดส่งต่ำสุด",
+  "ren-jun-zui-di": "ต่ำสุดต่อหัว",
+  "ren-jun-zui-gao": "สูงสุดต่อหัว",
+  "xin-shang-jia": "ธุรกิจใหม่",
+  "ming-xing-shang-jia": "ธุรกิจติดดาว",
+  "shou-dan-li-jian": "การลดอันดับแรก",
+  "man-jian-you-hui": "ส่วนลดเต็ม",
+  "zhe-kou-shang-jia": "ส่วนลดของร้านค้า",
+  "xia-dan-fan-hong-bao": "สั่งซื้อแล้วจะมีหงเปาให้",
+  "ke-yong-hong-bao": "หงเปาที่มีอยู่",
+  "yi-shi-wo-men-ke-yi-geng-hao-di-bang-nin-jie-jue-wen-ti": "เพื่อให้เราสามารถช่วยคุณแก้ปัญหาได้ดีขึ้น"
+}

+ 5 - 1
navigation/BaseNavigator.jsx

@@ -49,6 +49,9 @@ import MapScreen from '../screens/Map/MapScreen';
 // 地图标记
 import MapMarkScreen from '../screens/Map/MapMarkScreen';
 
+// 聊天页面
+import ChatScreen from '../chat/ChatScreen.tsx';
+
 export default function BasicScreens(Screen) {
   return (
     <>
@@ -105,7 +108,6 @@ export default function BasicScreens(Screen) {
         component={ApplayCancel}
         initialParams={{ orderId: 2029 }}
       />
-
       {/* *************************用户*********************************** */}
       {/* 设置 */}
       <Screen name="Setting" component={Setting} />
@@ -139,6 +141,8 @@ export default function BasicScreens(Screen) {
       <Screen name="SearchMap" component={SearchMap} />
       <Screen name="MapScreen" component={MapScreen} />
       <Screen name="MapMarkScreen" component={MapMarkScreen} />
+
+      <Screen name="Chat" component={ChatScreen} />
     </>
   );
 }

+ 94 - 0
package-lock.json

@@ -1470,6 +1470,25 @@
         }
       }
     },
+    "@expo/react-native-action-sheet": {
+      "version": "3.8.0",
+      "resolved": "https://registry.npmjs.org/@expo/react-native-action-sheet/-/react-native-action-sheet-3.8.0.tgz",
+      "integrity": "sha512-tCfwysuqy0sfaN+aA98IKUrwCLKsbDHSYLcnHrx9wNbawOHNez8rSeFtieAS48/HyrPI75yg/ZGvxe6UsJRS8Q==",
+      "requires": {
+        "@types/hoist-non-react-statics": "^3.3.1",
+        "hoist-non-react-statics": "^3.3.0"
+      },
+      "dependencies": {
+        "hoist-non-react-statics": {
+          "version": "3.3.2",
+          "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
+          "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
+          "requires": {
+            "react-is": "^16.7.0"
+          }
+        }
+      }
+    },
     "@expo/vector-icons": {
       "version": "10.2.0",
       "resolved": "https://registry.npmjs.org/@expo/vector-icons/-/vector-icons-10.2.0.tgz",
@@ -3508,6 +3527,25 @@
       "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.36.tgz",
       "integrity": "sha512-7TUK/k2/QGpEAv/BCwSHlYu3NXZhQ9ZwBYpzr9tjlPIL2C5BeGhH3DmVavRx3ZNyELX5TLC91JTz/cen6AAtIQ=="
     },
+    "@types/hoist-non-react-statics": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
+      "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
+      "requires": {
+        "@types/react": "*",
+        "hoist-non-react-statics": "^3.3.0"
+      },
+      "dependencies": {
+        "hoist-non-react-statics": {
+          "version": "3.3.2",
+          "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
+          "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
+          "requires": {
+            "react-is": "^16.7.0"
+          }
+        }
+      }
+    },
     "@types/istanbul-lib-coverage": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
@@ -3565,6 +3603,15 @@
       "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz",
       "integrity": "sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw=="
     },
+    "@types/react": {
+      "version": "16.9.46",
+      "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.46.tgz",
+      "integrity": "sha512-dbHzO3aAq1lB3jRQuNpuZ/mnu+CdD3H0WVaaBQA8LTT3S33xhVBUj232T8M3tAhSWJs/D/UqORYUlJNl/8VQZg==",
+      "requires": {
+        "@types/prop-types": "*",
+        "csstype": "^3.0.2"
+      }
+    },
     "@types/stack-utils": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
@@ -5237,6 +5284,11 @@
         }
       }
     },
+    "csstype": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.2.tgz",
+      "integrity": "sha512-ofovWglpqoqbfLNOTBNZLSbMuGrblAf1efvvArGKOZMBrIoJeu5UsAipQolkijtyQx5MtAzT/J9IHj/CEY1mJw=="
+    },
     "damerau-levenshtein": {
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz",
@@ -14148,6 +14200,11 @@
         "tinycolor2": "^1.4.1"
       }
     },
+    "react-native-communications": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/react-native-communications/-/react-native-communications-2.2.1.tgz",
+      "integrity": "sha1-eIO1ayCgAu63kMET+GFuqGksp5U="
+    },
     "react-native-drawer": {
       "version": "2.5.1",
       "resolved": "https://registry.npmjs.org/react-native-drawer/-/react-native-drawer-2.5.1.tgz",
@@ -14176,6 +14233,22 @@
         "prop-types": "^15.7.2"
       }
     },
+    "react-native-gifted-chat": {
+      "version": "0.16.3",
+      "resolved": "https://registry.npmjs.org/react-native-gifted-chat/-/react-native-gifted-chat-0.16.3.tgz",
+      "integrity": "sha512-7EJKQPzzg1yIbLFNq9n5bGJWZ7Woi2bTeT7M4EVSChmFF/qyNos+gFxEcafPkEihEeIxeOne6hBQlYNKmDABgA==",
+      "requires": {
+        "@expo/react-native-action-sheet": "^3.6.0",
+        "dayjs": "^1.8.26",
+        "prop-types": "^15.7.2",
+        "react-native-communications": "^2.2.1",
+        "react-native-iphone-x-helper": "^1.2.1",
+        "react-native-lightbox": "^0.8.1",
+        "react-native-parsed-text": "0.0.22",
+        "react-native-typing-animation": "^0.1.7",
+        "uuid": "3.4.0"
+      }
+    },
     "react-native-iphone-x-helper": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz",
@@ -14215,6 +14288,14 @@
         }
       }
     },
+    "react-native-lightbox": {
+      "version": "0.8.1",
+      "resolved": "https://registry.npmjs.org/react-native-lightbox/-/react-native-lightbox-0.8.1.tgz",
+      "integrity": "sha512-TFZA6iKEEHpAUIXjMTRb6vx0/9rHgEKy3ZBiRAy295PwldYg5c8opwnbyURLIl522ykeqhVx9uGdXjSMIowLvA==",
+      "requires": {
+        "prop-types": "^15.7.2"
+      }
+    },
     "react-native-magnus": {
       "version": "1.0.39",
       "resolved": "https://registry.npmjs.org/react-native-magnus/-/react-native-magnus-1.0.39.tgz",
@@ -14259,6 +14340,14 @@
         }
       }
     },
+    "react-native-parsed-text": {
+      "version": "0.0.22",
+      "resolved": "https://registry.npmjs.org/react-native-parsed-text/-/react-native-parsed-text-0.0.22.tgz",
+      "integrity": "sha512-hfD83RDXZf9Fvth3DowR7j65fMnlqM9PpxZBGWkzVcUTFtqe6/yPcIoIAgrJbKn6YmtzkivmhWE2MCE4JKBXrQ==",
+      "requires": {
+        "prop-types": "^15.7.x"
+      }
+    },
     "react-native-reanimated": {
       "version": "1.9.0",
       "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.9.0.tgz",
@@ -14363,6 +14452,11 @@
       "resolved": "https://registry.npmjs.org/react-native-text-size/-/react-native-text-size-4.0.0-rc.1.tgz",
       "integrity": "sha512-CysqjU2jK6Yc+a+kEI222pUyTY2ywcU2HqbFqf1KHymW6OPTdvBBHqbEJKL0QiLhQaFYDbqicM+h990s9TP00g=="
     },
+    "react-native-typing-animation": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/react-native-typing-animation/-/react-native-typing-animation-0.1.7.tgz",
+      "integrity": "sha512-4H3rF9M+I2yAZpYJcY0Mb29TXkn98QK12rrKSY6LZj1BQD9NNmRZuNXzwX4XHapsIz+N/J8M3p27FOQPbfzqeg=="
+    },
     "react-native-ui-lib": {
       "version": "5.10.2",
       "resolved": "https://registry.npmjs.org/react-native-ui-lib/-/react-native-ui-lib-5.10.2.tgz",

+ 1 - 0
package.json

@@ -60,6 +60,7 @@
     "react-native-animatable": "^1.3.3",
     "react-native-animation-hooks": "^1.0.1",
     "react-native-gesture-handler": "^1.6.1",
+    "react-native-gifted-chat": "^0.16.3",
     "react-native-magnus": "^1.0.39",
     "react-native-modal": "^11.5.6",
     "react-native-paper": "^3.10.1",

+ 1 - 1
screens/Main/Home/HomeHeader.jsx

@@ -99,7 +99,7 @@ export default function Header() {
             }}
             title={t('qie-huan-yu-yan')}
           />
-          <Menu.Item onPress={() => {}} title="版本07.17.1(国际化文件导入)" />
+          <Menu.Item onPress={() => {}} title="版本0814 订单展示" />
         </Menu>
       </Appbar.Header>
     </>

+ 1 - 1
screens/Main/Home/RecommendStore.jsx

@@ -46,7 +46,7 @@ export default function RecommendStore() {
             navigation.navigate('MerchantsList');
           }}
         >
-          {t('geng-duo-xin-dian')}&gt;
+          {t('geng-duo-xin-dian')}
         </Button>
       </Div>
 

+ 2 - 0
screens/Main/HomeScreen.jsx

@@ -20,6 +20,7 @@ import RecommendStore from './Home/RecommendStore';
 import SpecialArea from './Home/SpecialArea';
 import HomeModel from './Home/model';
 import Icon from '../../components/SvgIcon';
+import TimScreen from '../../chat/TimScreen.tsx';
 
 export default function HomeScreen({ navigation }) {
   const { t } = useTranslation();
@@ -101,6 +102,7 @@ export default function HomeScreen({ navigation }) {
         color="#fff"
         onPress={() => console.log('Pressed')}
       />
+      <TimScreen />
     </>
   );
 }

+ 14 - 5
screens/Map/MapMarkImg.jsx

@@ -7,14 +7,23 @@ import MapModel from './model'; // detail模块通用方法
 
 export default function MapMarkImg({ imgType, info, label }) {
   const { personImg, merchatImg, riderImg } = useModel(MapModel, []);
-  const { merchant, location } = info;
+
+  const { merLocation, location, merShowName, riderLocation } = info;
+  const merLocations = merLocation ? merLocation.split(',') : [];
   const locations = location ? location.split(',') : [];
+  const ridLocations = riderLocation ? riderLocation.split(',') : [];
   const persoMark =
     locations.length > 0
       ? `markers=icon:${personImg}%7C${locations[1]},${locations[0]}`
       : '';
-  const merchatMark = `markers=icon:${merchatImg}%7C${merchant.latitude},${merchant.longitude}`;
-  const riderMark = `markers=icon:${riderImg}%7C31.981746,118.734661`;
+  const merchatMark =
+    merLocation.length > 0
+      ? `markers=icon:${merchatImg}%7C${merLocations[1]},${merLocations[0]}`
+      : '';
+  const riderMark =
+    ridLocations.length > 0
+      ? `markers=icon:${riderImg}%7C${ridLocations[1]},${ridLocations[0]}`
+      : '';
 
   const markers = useCreation(() => {
     const str = '';
@@ -50,10 +59,10 @@ export default function MapMarkImg({ imgType, info, label }) {
         str = '31.982155,118.734716';
         break;
       case 'merchant':
-        str = `${merchant.latitude},${merchant.longitude}`;
+        str = `${merLocations[1]},${merLocations[0]}`;
         break;
       default:
-        str = `${merchant.latitude},${merchant.longitude}`;
+        str = `${merLocations[1]},${merLocations[0]}`;
         break;
     }
 

+ 36 - 33
screens/Order/ComplaintScreen.jsx

@@ -57,7 +57,7 @@ export default function ComplaintScreen({ navigation }) {
           <Text size="c2" type="info">
             {t('tou-su-shang-jia')}
           </Text>
-          <Text size="s1">{merchant.showName || ' '}</Text>
+          <Text size="s1">{orderInfo.merShowName || ' '}</Text>
           <Divider />
           <View style={styles.main}>
             {Types.get('MERCHANT').map((item, index) => {
@@ -87,38 +87,41 @@ export default function ComplaintScreen({ navigation }) {
         </View>
 
         <View style={styles.card}>
-          <Text size="c2" type="info">
-            {t('tou-su-qi-shou')}
-          </Text>
-          <Text size="s1">胖待还</Text>
-          <Divider />
-
-          <View style={styles.main}>
-            {Types.get('RIDER').map((item, index) => {
-              return (
-                <TouchableRipple
-                  key={index}
-                  onPress={() => {
-                    navigation.navigate('ComplaintNext', {
-                      orderId,
-                      type: item,
-                      target: 'RIDER',
-                    });
-                  }}
-                >
-                  <Flex style={styles.item}>
-                    <Flex.Item>
-                      <Text size="c2" type="info">
-                        {item}
-                      </Text>
-                    </Flex.Item>
-                    <Icon name="angle-right" color="#B4B4B4" />
-                  </Flex>
-                </TouchableRipple>
-              );
-            })}
-          </View>
-          <Divider />
+          {orderInfo.riderStatus !== 'NOT_RECEIVED' && (
+            <>
+              <Text size="c2" type="info">
+                {t('tou-su-qi-shou')}
+              </Text>
+              <Text size="s1">{orderInfo.riderName}</Text>
+              <Divider />
+              <View style={styles.main}>
+                {Types.get('RIDER').map((item, index) => {
+                  return (
+                    <TouchableRipple
+                      key={index}
+                      onPress={() => {
+                        navigation.navigate('ComplaintNext', {
+                          orderId,
+                          type: item,
+                          target: 'RIDER',
+                        });
+                      }}
+                    >
+                      <Flex style={styles.item}>
+                        <Flex.Item>
+                          <Text size="c2" type="info">
+                            {item}
+                          </Text>
+                        </Flex.Item>
+                        <Icon name="angle-right" color="#B4B4B4" />
+                      </Flex>
+                    </TouchableRipple>
+                  );
+                })}
+              </View>
+              <Divider />
+            </>
+          )}
           <Flex style={styles.bottom}>
             <Flex.Item>
               <Text size="c2" type="info">

+ 313 - 262
screens/Order/OrderDetailScreen.jsx

@@ -11,6 +11,7 @@ import {
   PanResponder,
   findNodeHandle,
   UIManager,
+  TouchableOpacity,
 } from 'react-native';
 import { Div, Button, Image, Text } from 'react-native-magnus';
 import { Appbar, Menu } from 'react-native-paper';
@@ -122,8 +123,17 @@ export default function OrderScreen({ navigation }) {
   ).current;
   const panResponder = React.useRef(
     PanResponder.create({
-      onStartShouldSetPanResponder: () => true,
-      onMoveShouldSetPanResponder: () => true,
+      onMoveShouldSetPanResponder: () => {
+        console.log('a2');
+        return false;
+      },
+      onMoveShouldSetPanResponderCapture: () => false,
+      onStartShouldSetPanResponder: () => {
+        console.log('a1');
+        return true;
+      },
+      onStartShouldSetPanResponderCapture: () => false,
+      onResponderTerminationRequest: () => true,
       onPanResponderGrant: () => {
         pan.setOffset({
           y: pan.y._value,
@@ -233,7 +243,6 @@ export default function OrderScreen({ navigation }) {
           backgroundColor: 'rgba(0,0,0,0)',
           transform: [{ translateY: pan.y }],
         }}
-        {...panResponder.panHandlers}
         onLayout={({ nativeEvent }) => {
           minMove.setValue(
             Dimensions.get('window').height -
@@ -243,27 +252,46 @@ export default function OrderScreen({ navigation }) {
           );
         }}
       >
-        <Div pt={10} pb={10} px={15}>
-          <View style={[styles.card]}>
-            {!cancelOrder &&
-              (finish ? (
-                <Text fontSize="xl">
-                  <Text
-                    fontSize="xl"
-                    color="brand500"
-                    mr={10}
-                    fontWeight="bold"
-                  >
-                    {statusInfo.name}
+        <View {...panResponder.panHandlers}>
+          <Div pt={10} pb={10} px={15}>
+            <View style={[styles.card]}>
+              {!cancelOrder &&
+                (finish ? (
+                  <Text fontSize="xl">
+                    <Text
+                      fontSize="xl"
+                      color="brand500"
+                      mr={10}
+                      fontWeight="bold"
+                    >
+                      {statusInfo.name}
+                    </Text>
+                    {new Time(
+                      orderInfo.userReceivedTime,
+                      'yyyy-MM-DD HH:mm:ss'
+                    ).getFormat('HH:mm')}
+                    {t('song-da')}
                   </Text>
-                  {new Time(
-                    orderInfo.userReceivedTime,
-                    'yyyy-MM-DD HH:mm:ss'
-                  ).getFormat('HH:mm')}
-                  {t('song-da')}
-                </Text>
-              ) : (
-                <Text fontSize="xl">
+                ) : (
+                  <Text fontSize="xl">
+                    <Text
+                      fontSize="xl"
+                      color="brand500"
+                      mr={10}
+                      fontWeight="bold"
+                    >
+                      {statusInfo.name}
+                    </Text>
+                    {t('yu-ji')}
+                    {new Time(
+                      orderInfo.timeOfArrival,
+                      'yyyy-MM-DD HH:mm:ss'
+                    ).getFormat('HH:mm')}
+                    {t('song-da')}
+                  </Text>
+                ))}
+              {cancelOrder && (
+                <Div row>
                   <Text
                     fontSize="xl"
                     color="brand500"
@@ -272,75 +300,14 @@ export default function OrderScreen({ navigation }) {
                   >
                     {statusInfo.name}
                   </Text>
-                  {t('yu-ji')}
-                  {new Time(
-                    orderInfo.timeOfArrival,
-                    'yyyy-MM-DD HH:mm:ss'
-                  ).getFormat('HH:mm')}
-                  {t('song-da')}
-                </Text>
-              ))}
-            {cancelOrder && (
-              <Div row>
-                <Text fontSize="xl" color="brand500" mr={10} fontWeight="bold">
-                  {statusInfo.name}
-                </Text>
-                {!!orderInfo.reason && (
-                  <Text fontSize="xl" color="red500">
-                    ({reasonMap.get(orderInfo.reason).name})
-                  </Text>
-                )}
-              </Div>
-            )}
-            <Div row mt={10}>
-              <Button
-                fontSize="xs"
-                flex={1}
-                mx={5}
-                bg="white"
-                color="gray600"
-                borderColor="brand500"
-                borderWidth={1}
-                rounded={3}
-                onPress={() => connectKefu(orderId)}
-              >
-                {t('lian-xi-ke-fu')}
-              </Button>
-              {!finish && (
-                <Button
-                  fontSize="xs"
-                  flex={1}
-                  mx={5}
-                  bg="white"
-                  color="gray600"
-                  borderColor="brand500"
-                  borderWidth={1}
-                  rounded={3}
-                  onPress={() => {
-                    warnning('正在帮您联系骑手');
-                  }}
-                >
-                  {t('lian-xi-qi-shou')}
-                </Button>
-              )}
-              {!finish && (
-                <Button
-                  fontSize="xs"
-                  flex={1}
-                  mx={5}
-                  bg="white"
-                  color="gray600"
-                  borderColor="brand500"
-                  borderWidth={1}
-                  rounded={3}
-                  onPress={() => {
-                    warnning('正在帮您催单');
-                  }}
-                >
-                  {t('cui-dan')}
-                </Button>
+                  {!!orderInfo.reason && (
+                    <Text fontSize="xl" color="red500">
+                      ({reasonMap.get(orderInfo.reason).name})
+                    </Text>
+                  )}
+                </Div>
               )}
-              {finish && !cancelOrder && (
+              <Div row mt={10}>
                 <Button
                   fontSize="xs"
                   flex={1}
@@ -350,240 +317,324 @@ export default function OrderScreen({ navigation }) {
                   borderColor="brand500"
                   borderWidth={1}
                   rounded={3}
-                  onPress={() => {
-                    navigation.navigate('RewardRider', {
-                      orderId,
-                    });
-                  }}
+                  onPress={() => connectKefu(orderId)}
                 >
-                  {t('da-shang-qi-shou')}
+                  {t('lian-xi-ke-fu')}
                 </Button>
-              )}
-              {finish && !Allfinish && !cancelOrder && (
+
+                {!finish && orderInfo.riderStatus !== 'NOT_RECEIVED' && (
+                  <Button
+                    fontSize="xs"
+                    flex={1}
+                    mx={5}
+                    bg="white"
+                    color="gray600"
+                    borderColor="brand500"
+                    borderWidth={1}
+                    rounded={3}
+                    onPress={(e) => {
+                      if (!orderInfo.mUserId) {
+                        warnning('骑手信息有误请联系客服');
+                      } else {
+                        navigation.navigate('Chat', {
+                          toUserId: orderInfo.mUserId,
+                          toUserName: orderInfo.merShowName,
+                        });
+                      }
+                      console.log(e);
+                    }}
+                  >
+                    {t('lian-xi-qi-shou')}
+                  </Button>
+                )}
+                {!finish && (
+                  <Button
+                    fontSize="xs"
+                    flex={1}
+                    mx={5}
+                    bg="white"
+                    color="gray600"
+                    borderColor="brand500"
+                    borderWidth={1}
+                    rounded={3}
+                    onPress={() => {
+                      if (!orderInfo.mUserId) {
+                        warnning('商家信息有误请联系客服帮你催单');
+                      } else {
+                        navigation.navigate('Chat', {
+                          toUserId: orderInfo.mUserId,
+                          toUserName: orderInfo.merShowName,
+                          type: 'Reminder',
+                        });
+                      }
+                    }}
+                  >
+                    {t('cui-dan')}
+                  </Button>
+                )}
+                {finish && !cancelOrder && (
+                  <Button
+                    fontSize="xs"
+                    flex={1}
+                    mx={5}
+                    bg="white"
+                    color="gray600"
+                    borderColor="brand500"
+                    borderWidth={1}
+                    rounded={3}
+                    onPress={() => {
+                      navigation.navigate('RewardRider', {
+                        orderId,
+                      });
+                    }}
+                  >
+                    {t('da-shang-qi-shou')}
+                  </Button>
+                )}
+                {finish && !Allfinish && !cancelOrder && (
+                  <Button
+                    fontSize="xs"
+                    flex={1}
+                    mx={5}
+                    bg="white"
+                    color="gray600"
+                    borderColor="brand500"
+                    borderWidth={1}
+                    rounded={3}
+                    onPress={() => {
+                      navigation.navigate('Evaluate', {
+                        orderId,
+                      });
+                    }}
+                  >
+                    {t('li-ji-ping-jia')}
+                  </Button>
+                )}
+              </Div>
+            </View>
+
+            <View style={[styles.card]}>
+              <Div row pb={10}>
+                <Text fontSize="xl" fontWeight="bold">
+                  {orderInfo.merShowName}
+                </Text>
                 <Button
                   fontSize="xs"
-                  flex={1}
-                  mx={5}
+                  w={100}
                   bg="white"
                   color="gray600"
                   borderColor="brand500"
                   borderWidth={1}
                   rounded={3}
+                  ml={14}
                   onPress={() => {
-                    navigation.navigate('Evaluate', {
-                      orderId,
-                    });
+                    if (!orderInfo.mUserId) {
+                      warnning('商家信息有误请联系客服帮你催单');
+                    } else {
+                      navigation.navigate('Chat', {
+                        toUserId: orderInfo.mUserId,
+                        toUserName: orderInfo.merShowName,
+                        type: 'Reminder',
+                      });
+                    }
                   }}
                 >
-                  {t('li-ji-ping-jia')}
+                  {t('lian-xi-shang-jia')}
                 </Button>
-              )}
-            </Div>
-          </View>
-
-          <View style={[styles.card]}>
-            <Div row pb={10}>
-              <Text fontSize="xl" fontWeight="bold">
-                {merchant.showName}
-              </Text>
-              <Button
-                fontSize="xs"
-                w={100}
-                bg="white"
-                color="gray600"
-                borderColor="brand500"
-                borderWidth={1}
-                rounded={3}
-                ml={14}
-                onPress={() => {
-                  warnning('正在帮您联系商家');
-                }}
-              >
-                {t('lian-xi-shang-jia')}
-              </Button>
-            </Div>
-            <Div>
-              {orderGoodsSpecs.map((item) => {
-                return (
-                  <GoodsItem info={item} goods={item.goods} key={item.id} />
-                );
-              })}
-            </Div>
-            <Flex style={styles.info}>
-              <Flex.Item>
-                <Flex>
-                  <Text fontSize="xs" color="gray300" textAlign="left">
-                    {t('bao-zhuang-fei')}
-                  </Text>
-                  <Text fontSize="xs" color="gray300" textAlign="left">
-                    {t('can-he')}
-                  </Text>
-                </Flex>
-              </Flex.Item>
-              <Text fontSize="xs" color="gray300" textAlign="left">
-                ¥{orderInfo.packingPrice}
-              </Text>
-            </Flex>
-            <Flex style={styles.info}>
-              <Flex.Item>
+              </Div>
+              <Div>
+                {orderGoodsSpecs.map((item) => {
+                  return (
+                    <GoodsItem info={item} goods={item.goods} key={item.id} />
+                  );
+                })}
+              </Div>
+              <Flex style={styles.info}>
+                <Flex.Item>
+                  <Flex>
+                    <Text fontSize="xs" color="gray300" textAlign="left">
+                      {t('bao-zhuang-fei')}
+                    </Text>
+                    <Text fontSize="xs" color="gray300" textAlign="left">
+                      {t('can-he')}
+                    </Text>
+                  </Flex>
+                </Flex.Item>
                 <Text fontSize="xs" color="gray300" textAlign="left">
-                  {t('pei-song-fei-ding-dong-zhuan-song')}
+                  ¥{orderInfo.packingPrice}
                 </Text>
-              </Flex.Item>
-              <Text fontSize="xs" color="gray300" textAlign="left">
-                ¥{orderInfo.deliveryAmount}
-              </Text>
-            </Flex>
-            <Flex style={styles.info}>
-              <Flex.Item>
+              </Flex>
+              <Flex style={styles.info}>
+                <Flex.Item>
+                  <Text fontSize="xs" color="gray300" textAlign="left">
+                    {t('pei-song-fei-ding-dong-zhuan-song')}
+                  </Text>
+                </Flex.Item>
                 <Text fontSize="xs" color="gray300" textAlign="left">
-                  {t('man-jian')}
+                  ¥{orderInfo.deliveryAmount}
                 </Text>
-              </Flex.Item>
-              <Text fontSize="xs" color="red500" textAlign="left">
-                -¥{orderInfo.fullReduction}
-              </Text>
-            </Flex>
-            {!!orderInfo.firstBuy && (
+              </Flex>
               <Flex style={styles.info}>
                 <Flex.Item>
                   <Text fontSize="xs" color="gray300" textAlign="left">
-                    {t('shou-dan')}
+                    {t('man-jian')}
                   </Text>
                 </Flex.Item>
                 <Text fontSize="xs" color="red500" textAlign="left">
-                  ¥{orderInfo.firstBuy}
+                  -¥{orderInfo.fullReduction}
                 </Text>
               </Flex>
-            )}
+              {!!orderInfo.firstBuy && (
+                <Flex style={styles.info}>
+                  <Flex.Item>
+                    <Text fontSize="xs" color="gray300" textAlign="left">
+                      {t('shou-dan')}
+                    </Text>
+                  </Flex.Item>
+                  <Text fontSize="xs" color="red500" textAlign="left">
+                    ¥{orderInfo.firstBuy}
+                  </Text>
+                </Flex>
+              )}
 
-            <Flex style={styles.info}>
-              <Flex.Item>
-                <Text fontSize="xs" color="gray300" textAlign="left">
-                  {t('hong-bao')}
-                </Text>
-              </Flex.Item>
-              <Text fontSize="xs" color="red500" textAlign="left">
-                -¥{orderInfo.redBag || 0}
-              </Text>
-            </Flex>
-            <Flex style={styles.total} justify="end">
-              <Text size="s1">
-                {t('xiao-ji')} ¥{orderInfo.realAmount}
-              </Text>
-            </Flex>
-          </View>
-
-          <View style={[styles.card]}>
-            <Text size="c1">{t('ding-dan-xin-xi')}</Text>
-            <View style={styles.main}>
-              <Flex style={styles.info2}>
+              <Flex style={styles.info}>
                 <Flex.Item>
-                  <Text fontSize="xs" textAlign="left">
-                    {t('xia-dan-shi-jian')}
+                  <Text fontSize="xs" color="gray300" textAlign="left">
+                    {t('hong-bao')}
                   </Text>
                 </Flex.Item>
-                <Text fontSize="xs" textAlign="left">
-                  {orderInfo.orderTime}
+                <Text fontSize="xs" color="red500" textAlign="left">
+                  -¥{orderInfo.redBag || 0}
+                </Text>
+              </Flex>
+              <Flex style={styles.total} justify="end">
+                <Text size="s1">
+                  {t('xiao-ji')} ¥{orderInfo.realAmount}
                 </Text>
               </Flex>
-              {orderInfo.userReceivedTime ? (
+            </View>
+
+            <View style={[styles.card]}>
+              <Text size="c1">{t('ding-dan-xin-xi')}</Text>
+              <View style={styles.main}>
                 <Flex style={styles.info2}>
                   <Flex.Item>
                     <Text fontSize="xs" textAlign="left">
-                      {t('song-da-shi-jian')}
+                      {t('xia-dan-shi-jian')}
                     </Text>
                   </Flex.Item>
                   <Text fontSize="xs" textAlign="left">
-                    {orderInfo.userReceivedTime}
+                    {orderInfo.orderTime}
                   </Text>
                 </Flex>
-              ) : (
+                {orderInfo.userReceivedTime ? (
+                  <Flex style={styles.info2}>
+                    <Flex.Item>
+                      <Text fontSize="xs" textAlign="left">
+                        {t('song-da-shi-jian')}
+                      </Text>
+                    </Flex.Item>
+                    <Text fontSize="xs" textAlign="left">
+                      {orderInfo.userReceivedTime}
+                    </Text>
+                  </Flex>
+                ) : (
+                  <Flex style={styles.info2}>
+                    <Flex.Item>
+                      <Text fontSize="xs" textAlign="left">
+                        {t('yu-ji-song-da-shi-jian')}
+                      </Text>
+                    </Flex.Item>
+                    <Text fontSize="xs" textAlign="left">
+                      {orderInfo.timeOfArrival}
+                    </Text>
+                  </Flex>
+                )}
+
                 <Flex style={styles.info2}>
-                  <Flex.Item>
+                  <Flex.Item style={styles.address}>
                     <Text fontSize="xs" textAlign="left">
-                      {t('yu-ji-song-da-shi-jian')}
+                      {t('shou-huo-di-zhi')}
                     </Text>
                   </Flex.Item>
                   <Text fontSize="xs" textAlign="left">
-                    {orderInfo.timeOfArrival}
+                    {orderInfo.userAddress}
                   </Text>
                 </Flex>
-              )}
+                {orderInfo.riderStatus !== 'NOT_RECEIVED' && (
+                  <Flex style={styles.info2}>
+                    <Flex.Item>
+                      <Text fontSize="xs" textAlign="left">
+                        {t('pei-song-qi-shou')}
+                      </Text>
+                    </Flex.Item>
+                    <Flex>
+                      <Button
+                        fontSize="xs"
+                        w={100}
+                        bg="white"
+                        color="gray600"
+                        borderColor="brand500"
+                        borderWidth={1}
+                        rounded={3}
+                        onPress={() => {
+                           if (!orderInfo.mUserId) {
+                             warnning('骑手信息有误请联系客服');
+                           } else {
+                             navigation.navigate('Chat', {
+                               toUserId: orderInfo.mUserId,
+                               toUserName: orderInfo.merShowName,
+                             });
+                           }
+                        }}
+                      >
+                        {t('lian-xi-qi-shou')}
+                      </Button>
+                      <Text fontSize="xs" ml={20} textAlign="left">
+                        {orderInfo.riderName}
+                      </Text>
+                    </Flex>
+                  </Flex>
+                )}
 
-              <Flex style={styles.info2}>
-                <Flex.Item style={styles.address}>
+                <Flex style={styles.info2}>
                   <Text fontSize="xs" textAlign="left">
-                    {t('shou-huo-di-zhi')}
+                    {t('ding-dan-hao')}
                   </Text>
-                </Flex.Item>
-                <Text fontSize="xs" textAlign="left">
-                  {orderInfo.userAddress}
-                </Text>
-              </Flex>
-              <Flex style={styles.info2}>
-                <Flex.Item>
-                  <Text fontSize="xs" textAlign="left">
-                    {t('pei-song-qi-shou')}
+                  <Text fontSize="xs" textAlign="right" ml={10} flex={1}>
+                    {orderInfo.id}
                   </Text>
-                </Flex.Item>
-                <Flex>
                   <Button
                     fontSize="xs"
-                    w={100}
+                    w={62}
                     bg="white"
                     color="gray600"
                     borderColor="brand500"
                     borderWidth={1}
                     rounded={3}
                     onPress={() => {
-                      warnning('正在帮您联系骑手');
+                      Clipboard.setString(orderInfo.id.toString());
+                      success(t('fu-zhi-cheng-gong'));
                     }}
+                    ml={5}
                   >
-                    {t('lian-xi-qi-shou')}
+                    {t('fu-zhi')}
                   </Button>
-                  <Text fontSize="xs" ml={20} textAlign="left">
-                    周猩猩
-                  </Text>
-                </Flex>
-              </Flex>
-              <Flex style={styles.info2}>
-                <Text fontSize="xs" textAlign="left">
-                  {t('ding-dan-hao')}
-                </Text>
-                <Text fontSize="xs" textAlign="right" ml={10} flex={1}>
-                  {orderInfo.id}
-                </Text>
-                <Button
-                  fontSize="xs"
-                  w={62}
-                  bg="white"
-                  color="gray600"
-                  borderColor="brand500"
-                  borderWidth={1}
-                  rounded={3}
-                  onPress={() => {
-                    Clipboard.setString(orderInfo.id.toString());
-                    success(t('fu-zhi-cheng-gong'));
-                  }}
-                  ml={5}
-                >
-                  {t('fu-zhi')}
-                </Button>
-              </Flex>
-              {payMap.has(orderInfo.payMethod) && (
-                <Flex style={styles.info2}>
-                  <Text fontSize="xs" flex={1}>
-                    {t('zhi-fu-fang-shi')}
-                  </Text>
-                  <Text fontSize="xs" textAlign="left">
-                    {payMap.get(orderInfo.payMethod).name}
-                  </Text>
                 </Flex>
-              )}
+                {payMap.has(orderInfo.payMethod) && (
+                  <Flex style={styles.info2}>
+                    <Text fontSize="xs" flex={1}>
+                      {t('zhi-fu-fang-shi')}
+                    </Text>
+                    <Text fontSize="xs" textAlign="left">
+                      {payMap.get(orderInfo.payMethod).name}
+                    </Text>
+                  </Flex>
+                )}
+              </View>
             </View>
-          </View>
-        </Div>
+          </Div>
+        </View>
       </Animated.View>
       {/* </RefreshControl> */}
     </Div>

+ 7 - 8
screens/Order/OrderScreen.jsx

@@ -14,7 +14,7 @@ import Order from './model';
 import Header from './Header'; // 头部
 import Time from '../../Utils/TimeUtils';
 import MapMarkImg from '../Map/MapMarkImg';
-import { getStatusInfo } from '../../Utils/OrderUtils';
+import { getStatusInfo, getGoodsInfo } from '../../Utils/OrderUtils';
 
 export default function OrderScreen({ navigation }) {
   const { t } = useTranslation();
@@ -77,7 +77,7 @@ export default function OrderScreen({ navigation }) {
 
 // 订单组件
 function Item({
-  merchant,
+  merchant = {},
   info,
   goNext,
   orderGoodsSpecs,
@@ -85,8 +85,7 @@ function Item({
   connect,
 }) {
   const { t } = useTranslation();
-  const orderInfo =
-    orderGoodsSpecs.length > 0 ? orderGoodsSpecs[0].goods.name : '';
+  const orderGoodsInfo = getGoodsInfo(orderGoodsSpecs);
 
   const statusInfo = getStatusInfo(info);
 
@@ -98,12 +97,12 @@ function Item({
       <View style={styles.item}>
         <Div row>
           <Button bg="hide" p={0} onPress={() => goMerchant()}>
-            <Image w={53} h={53} source={{ uri: merchant.logo }} />
+            <Image w={53} h={53} source={{ uri: info.merLogo }} />
           </Button>
           <Div flex={1} ml={10}>
             <Div row>
               <Text fontSize="xl" flex={1} fontWeight="bold">
-                {merchant.name}
+                {info.merShowName}
               </Text>
               {finish || Allfinish ? (
                 <Text fontSize="xs">{t('yi-song-da')}</Text>
@@ -127,9 +126,9 @@ function Item({
             <Div row py={10} alignItems="center">
               <Text fontSize="sm">{t('ding-dan-shang-pin')}</Text>
               <Text fontSize="xs" ml={5} flex={1}>
-                {orderInfo}
+                {orderGoodsInfo.name}
                 {t('deng')}
-                {info.num}
+                {orderGoodsInfo.num}
                 {t('jian2')}
               </Text>
               <Text size="sm">¥{info.realAmount}</Text>