From afeaa233e2cb16074d79b709af2226edc75b9686 Mon Sep 17 00:00:00 2001 From: Jimmy Liow Date: Thu, 22 Feb 2024 16:36:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=BD=91=E5=89=8D=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E5=99=A8=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/actions/ConversationActions.js | 2 +- src/stores/ConversationStore.js | 2 +- src/stores/OrderStore.js | 4 +- src/views/ChatHistory.jsx | 44 ++++++++++++++----- .../Components/CustomerProfile.jsx | 4 +- .../Components/QuotesHistory.jsx | 12 ++--- src/views/OrderFollow.jsx | 2 +- 7 files changed, 45 insertions(+), 25 deletions(-) diff --git a/src/actions/ConversationActions.js b/src/actions/ConversationActions.js index 1be1b28..9ba3357 100644 --- a/src/actions/ConversationActions.js +++ b/src/actions/ConversationActions.js @@ -3,7 +3,7 @@ import { groupBy } from '@/utils/utils'; import { fetchJSON, postJSON } from '@/utils/request' import { parseRenderMessageList } from '@/lib/msgUtils'; -const API_HOST = 'https://p9axztuwd7x8a7.mycht.cn/whatsapp_callback'; +const API_HOST = 'https://p9axztuwd7x8a7.mycht.cn/whatsapp_callback_cn'; export const fetchTemplates = async () => { const data = await fetchJSON(`${API_HOST}/listtemplates`); diff --git a/src/stores/ConversationStore.js b/src/stores/ConversationStore.js index c815290..9072c66 100644 --- a/src/stores/ConversationStore.js +++ b/src/stores/ConversationStore.js @@ -7,7 +7,7 @@ import { devtools } from 'zustand/middleware'; // const WS_URL = 'ws://202.103.68.144:8888/whatever/'; // const WS_URL = 'ws://120.79.9.217:10022/whatever/'; -const WS_URL = 'wss://p9axztuwd7x8a7.mycht.cn/whatsapp_callback'; // prod: +const WS_URL = 'wss://p9axztuwd7x8a7.mycht.cn/whatsapp_callback_cn'; // prod: const initialConversationState = { // websocket: null, diff --git a/src/stores/OrderStore.js b/src/stores/OrderStore.js index d63adbb..7e168b5 100644 --- a/src/stores/OrderStore.js +++ b/src/stores/OrderStore.js @@ -2,7 +2,7 @@ import { create } from 'zustand' import { devtools } from 'zustand/middleware' import { fetchJSON, postJSON } from '@/utils/request' -const API_HOST = 'https://p9axztuwd7x8a7.mycht.cn/whatsapp_callback'; +const API_HOST = 'https://p9axztuwd7x8a7.mycht.cn/whatsapp_callback_cn'; const useOrderStore = create((set, get) => ({ @@ -35,4 +35,4 @@ const useOrderStore = create((set, get) => ({ })) -export default useOrderStore \ No newline at end of file +export default useOrderStore \ No newline at end of file diff --git a/src/views/ChatHistory.jsx b/src/views/ChatHistory.jsx index dc608c9..f4f3528 100644 --- a/src/views/ChatHistory.jsx +++ b/src/views/ChatHistory.jsx @@ -53,16 +53,28 @@ const SearchForm = memo(function ({ onSubmit }) { (option?.label ?? '').toLowerCase().includes(input.toLowerCase())} options={[ { - value: 'Coco', - label: 'Coco', + value: '杨新玲', + label: '杨新玲', }, { - value: 'Ann', - label: 'Ann', + value: '骆梅玉', + label: '骆梅玉', }, { - value: 'Lora', - label: 'Lora', + value: '秦宇尘', + label: '秦宇尘', + }, + { + value: '莫梦瑶', + label: '莫梦瑶', + }, + { + value: '秦雯萱', + label: '秦雯萱', + }, + { + value: '王露加', + label: '王露加', }, ]} /> @@ -76,16 +88,24 @@ const SearchForm = memo(function ({ onSubmit }) { (option?.label ?? '').toLowerCase().includes(input.toLowerCase())} options={[ { - value: 'jack', - label: 'Jack', + value: 'Denise', + label: 'Denise', + }, + { + value: 'Kennedy', + label: 'Kennedy', + }, + { + value: 'Harsh', + label: 'Harsh', }, { - value: 'lucy', - label: 'Lucy', + value: 'SMLiew', + label: 'SMLiew', }, { - value: 'tom', - label: 'Tom', + value: 'See Kok Ching', + label: 'See Kok Ching', }, ]} /> diff --git a/src/views/Conversations/Components/CustomerProfile.jsx b/src/views/Conversations/Components/CustomerProfile.jsx index 5fba7eb..c54d462 100644 --- a/src/views/Conversations/Components/CustomerProfile.jsx +++ b/src/views/Conversations/Components/CustomerProfile.jsx @@ -77,12 +77,12 @@ const CustomerProfile = (() => { 最新报价 -

{lastQuotation.lettertitle}

+

 {lastQuotation.lettertitle}

-

+

) }) diff --git a/src/views/Conversations/Components/QuotesHistory.jsx b/src/views/Conversations/Components/QuotesHistory.jsx index 5762e4d..a9e9cbd 100644 --- a/src/views/Conversations/Components/QuotesHistory.jsx +++ b/src/views/Conversations/Components/QuotesHistory.jsx @@ -1,5 +1,6 @@ +import { LinkOutlined } from '@ant-design/icons' +import { Button, Flex, List, Popover } from 'antd' import { useState } from 'react' -import { Popover, Flex, Button, List, Popconfirm } from 'antd' const QuotesHistory = ((props) => { @@ -9,9 +10,9 @@ const QuotesHistory = ((props) => { setOpen(newOpen) } - const onSend = () => { + const handleCopyClick = (url) => { + navigator.clipboard.writeText(url) setOpen(false) - // todo: send } return ( @@ -31,13 +32,12 @@ const QuotesHistory = ((props) => { {item.lettertitle}} + title={ {item.lettertitle}} description={ {item.letterdate} diff --git a/src/views/OrderFollow.jsx b/src/views/OrderFollow.jsx index 0dbb4b4..2ad34c8 100644 --- a/src/views/OrderFollow.jsx +++ b/src/views/OrderFollow.jsx @@ -205,7 +205,7 @@ function OrderList({ formValues }) { const [orderData, setOrderData] = useState([]) const [loading, setLoading] = useState(false) const { loginUser } = useAuthContext() - let fetchOrderUrl = `https://p9axztuwd7x8a7.mycht.cn/whatsapp_callback/getwlorder?opisn=${loginUser.userId}&otype=${formValues.type}` + let fetchOrderUrl = `https://p9axztuwd7x8a7.mycht.cn/whatsapp_callback_cn/getwlorder?opisn=${loginUser.userId}&otype=${formValues.type}` if (formValues.type === 'advance') { const fromDate = formValues.startDateRange[0].format('YYYY-MM-DD')