From 6f78fb678d38ab756da8dbf3c7bcae98063fb758 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 28 Mar 2024 17:27:37 +0800 Subject: [PATCH] =?UTF-8?q?Todo:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF:=20?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.jsx | 2 ++ src/views/MobileApp.jsx | 5 +++- src/views/mobile/History.jsx | 31 ++++++++++++++++++++++++ src/views/mobile/SecondHeaderWrapper.jsx | 7 ++++-- 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 src/views/mobile/History.jsx diff --git a/src/main.jsx b/src/main.jsx index bb5510e..7d99b80 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -16,6 +16,7 @@ import ErrorPage from '@/components/ErrorPage' import Conversations from '@/views/Conversations/ChatWindow' import MobileConversation from '@/views/mobile/Conversation' import MobileChat from '@/views/mobile/Chat' +import MobileHistory from '@/views/mobile/History' import MobileSecondHeader from '@/views/mobile/SecondHeaderWrapper'; import CustomerProfile from '@/views/Conversations/Components/CustomerProfile'; @@ -47,6 +48,7 @@ const router = createBrowserRouter([ element: , children: [ { path: 'm/order', element: }, + { path: 'm/history', element: }, ], }, ] diff --git a/src/views/MobileApp.jsx b/src/views/MobileApp.jsx index 58b6a51..273c07b 100644 --- a/src/views/MobileApp.jsx +++ b/src/views/MobileApp.jsx @@ -4,7 +4,7 @@ import AppLogo from '@/assets/logo-gh.png'; import { useThemeContext } from '@/stores/ThemeContext'; import useAuthStore from '@/stores/AuthStore'; import { Col, Layout, Row, Typography, theme, Space, Avatar, Dropdown, Flex } from 'antd'; -import { DownOutlined } from '@ant-design/icons'; +import { DownOutlined, FileSearchOutlined } from '@ant-design/icons'; import { NavLink, Outlet, Link } from 'react-router-dom'; const { Header, Footer, Content } = Layout; const { Title } = Typography; @@ -46,10 +46,13 @@ function MobileApp() {
+ App logo {!('Notification' in window) && 🔕} + 历史 + { + const [formValues, setFormValues] = useFormStore((state) => [state.chatHistoryForm, state.setChatHistoryForm]); + + const handleSubmit = useCallback((values) => { + setFormValues({ ...values }); + }, []); + return ( +
+ + + {/* +
+ +
+ + + +
*/} +
+ ); +}; +export default History; diff --git a/src/views/mobile/SecondHeaderWrapper.jsx b/src/views/mobile/SecondHeaderWrapper.jsx index a60479d..6c9ccd5 100644 --- a/src/views/mobile/SecondHeaderWrapper.jsx +++ b/src/views/mobile/SecondHeaderWrapper.jsx @@ -1,7 +1,7 @@ import { createContext, useContext, useEffect, useState } from 'react'; import { NavLink, Outlet, Link, useNavigate } from 'react-router-dom'; import { Layout, Button, Flex, theme } from 'antd'; -import { LeftOutlined, HomeOutlined } from '@ant-design/icons'; +import { LeftOutlined, HomeOutlined, FileSearchOutlined } from '@ant-design/icons'; const { Content, Header } = Layout; const HeaderWrapper = ({ children, ...props }) => { @@ -17,7 +17,10 @@ const HeaderWrapper = ({ children, ...props }) => { style={{ position: 'sticky', top: 0, zIndex: 1, width: '100%', background: 'white' }}>