diff --git a/src/main.jsx b/src/main.jsx
index fbe6594..972bfd2 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -1,9 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
-import { createBrowserRouter, RouterProvider } from 'react-router-dom'
+import { createBrowserRouter, RouterProvider, useNavigate } from 'react-router-dom'
import { ThemeContext } from '@/stores/ThemeContext'
import AuthApp from '@/views/AuthApp'
import Standlone from '@/views/Standlone'
+import MobileApp from '@/views/MobileApp'
import OrderFollow from '@/views/OrderFollow'
import ChatHistory from '@/views/ChatHistory'
import SalesManagement from '@/views/SalesManagement'
@@ -12,6 +13,8 @@ import DingdingCallback from '@/views/dingding/Callback'
import AccountProfile from '@/views/AccountProfile'
import ErrorPage from '@/components/ErrorPage'
import Conversations from '@/views/Conversations/ChatWindow'
+import MobileConversation from '@/views/mobile/Conversation'
+import MobileChat from '@/views/mobile/Chat'
import MobileLogin from '@/views/mobile/Login'
import useAuthStore from '@/stores/AuthStore'
import '@/assets/index.css'
@@ -39,13 +42,15 @@ const router = createBrowserRouter([
children: [
{ path: 'dingding/qrcode', element: },
{ path: 'dingding/callback', element: },
+ { path: 'mobile-login', element: },
],
},
{
path: '/m',
- element: ,
+ element: ,
children: [
- { path: 'login', element: },
+ { path: 'conversation', element: },
+ { path: 'chat', element: },
],
},
])
diff --git a/src/views/MobileApp.jsx b/src/views/MobileApp.jsx
new file mode 100644
index 0000000..c00e1d5
--- /dev/null
+++ b/src/views/MobileApp.jsx
@@ -0,0 +1,68 @@
+import '@/assets/App.css'
+import AppLogo from '@/assets/logo-gh.png'
+import { useThemeContext } from '@/stores/ThemeContext'
+import useAuthStore from '@/stores/AuthStore'
+import { App as AntApp, Col, ConfigProvider, Empty, Layout, Row, Typography, theme, Space, Avatar } from 'antd'
+import { DownOutlined } from '@ant-design/icons'
+import { NavLink, Outlet } from 'react-router-dom'
+const { Header, Footer, Content } = Layout
+const { Title } = Typography
+
+function MobileApp() {
+
+ const {colorPrimary, borderRadius} = useThemeContext()
+ const loginUser = useAuthStore(state => state.loginUser)
+
+ const {
+ token: { colorBgContainer },
+ } = theme.useToken()
+
+ function renderLayout() {
+ return (
+
+
+
+
+
+
+
+ {loginUser?.username?.substring(1)}{loginUser.username}
+
+
+
+
+
+
+
+
+
+
+ )
+ }
+
+ return (
+ }
+ >
+
+ {renderLayout()}
+
+
+ )
+}
+
+export default MobileApp
diff --git a/src/views/mobile/Chat.jsx b/src/views/mobile/Chat.jsx
new file mode 100644
index 0000000..e8a5d73
--- /dev/null
+++ b/src/views/mobile/Chat.jsx
@@ -0,0 +1,68 @@
+import { memo, useCallback, useEffect, useRef, useState, forwardRef } from 'react';
+import { App, Avatar, List, Layout, Input, DatePicker, Button, Spin } from 'antd';
+import { ChatItem, MessageBox } from 'react-chat-elements';
+import { fetchConversationsList, fetchMessages, MESSAGE_PAGE_SIZE } from '@/actions/ConversationActions';
+import { isEmpty } from '@/utils/utils';
+import useFormStore from '@/stores/FormStore';
+import { useShallow } from 'zustand/react/shallow';
+
+
+import { RightOutlined } from '@ant-design/icons'
+
+import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
+import SearchInput from '@/components/SearchInput';
+
+const { Sider, Content, Header, Footer } = Layout;
+const { TextArea } = Input
+const { RangePicker } = DatePicker;
+
+const data = [
+ {
+ title: 'Tyler Dru Kelly',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'Hi Nazly Parlindungan Siregar, this is Sharon , travel advisor of Asia Highlights. We got your inquiry for your trip toJapan , are you available for a quick chat to discuss about your trip? I have some ideas to share with you . Looking forward to talking with you!',
+ },
+ {
+ title: 'Chhavi',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'Hi Sharon, thanks for reaching out. I am extremely busy person, please feel free to write down or send me any note and I will respond to you immediately. Cheers🙏',
+ },
+ {
+ title: 'Nathan Posey',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'It is too late to see cherry blossom from April 28, is it ok for you? For your 7 days tour, visit Tokyo and Kyoto is ok. I will suggest a tour with private car for you because your mother cannot walk too much.',
+ },
+]
+
+function Chat() {
+ const { notification } = App.useApp()
+ return (
+ <>
+ (
+
+ }
+ title={{item.title}}
+ description={item.msgTime}
+ />
+
+
+ )}
+ />
+
+
+ >
+ );
+}
+
+export default Chat
diff --git a/src/views/mobile/Conversation.jsx b/src/views/mobile/Conversation.jsx
new file mode 100644
index 0000000..52c5c3a
--- /dev/null
+++ b/src/views/mobile/Conversation.jsx
@@ -0,0 +1,90 @@
+import { memo, useCallback, useEffect, useRef, useState, forwardRef } from 'react';
+import { Avatar, List, Button, Input, Layout, Select, DatePicker, Form, Spin } from 'antd';
+import { ChatItem, MessageBox } from 'react-chat-elements';
+import { fetchConversationsList, fetchMessages, MESSAGE_PAGE_SIZE } from '@/actions/ConversationActions';
+import { isEmpty } from '@/utils/utils';
+import useFormStore from '@/stores/FormStore';
+import { useShallow } from 'zustand/react/shallow'
+import { useNavigate, useHref } from 'react-router-dom'
+
+
+import { RightOutlined } from '@ant-design/icons'
+
+import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
+import SearchInput from '@/components/SearchInput';
+
+const { Sider, Content, Header, Footer } = Layout;
+const { Search } = Input;
+const { RangePicker } = DatePicker;
+
+const data = [
+ {
+ title: 'Tyler Dru Kelly',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: '15127570944',
+ },
+ {
+ title: 'Chhavi',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'WLJ240311112',
+ },
+ {
+ title: 'Nathan Posey',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'WLJ240311114',
+ },
+ {
+ title: 'Philip',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'WLJ240312062',
+ },
+ {
+ title: 'Jeanne',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'H240313032',
+ },
+ {
+ title: 'Susan Puls',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'H240311213',
+ },
+ {
+ title: 'Ana Beatriz',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'H240312073',
+ },
+ {
+ title: 'Kathleen Anne Workman',
+ avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
+ msgTime: 'HXY240104171',
+ },
+]
+
+function Login() {
+ const navigate = useNavigate()
+
+ return (
+ <>
+ (
+ {
+ navigate('/m/chat')}}
+ actions={[]}
+ >
+ }
+ title={{item.title}}
+ description={item.msgTime}
+ />
+
+
+ )}
+ />
+ >
+ );
+}
+
+export default Login
diff --git a/src/views/mobile/Login.jsx b/src/views/mobile/Login.jsx
index dcd623a..22b9738 100644
--- a/src/views/mobile/Login.jsx
+++ b/src/views/mobile/Login.jsx
@@ -1,85 +1,22 @@
-import { memo, useCallback, useEffect, useRef, useState, forwardRef } from 'react';
-import { Avatar, List, Button, Input, Layout, Select, DatePicker, Form, Spin } from 'antd';
-import { ChatItem, MessageBox } from 'react-chat-elements';
-import { fetchConversationsList, fetchMessages, MESSAGE_PAGE_SIZE } from '@/actions/ConversationActions';
-import { isEmpty } from '@/utils/utils';
-import useFormStore from '@/stores/FormStore';
-import { useShallow } from 'zustand/react/shallow';
+import { memo, useCallback, useEffect, useRef, useState, forwardRef } from 'react'
+import { App, Avatar, List, Layout, Input, DatePicker, Flex, Result, Spin } from 'antd'
+function Chat() {
+
+ window.location = 'https://login.dingtalk.com/oauth2/auth?redirect_uri=https%3A%2F%2Fsales.mycht.cn%2Fp%2Fdingding%2Fcallback&response_type=code&client_id=dingwgdx6emlxr3fcrg8&scope=openid&state=global-saels&prompt=consent'
-import { RightOutlined } from '@ant-design/icons'
-
-import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
-import SearchInput from '@/components/SearchInput';
-
-const { Sider, Content, Header, Footer } = Layout;
-const { Search } = Input;
-const { RangePicker } = DatePicker;
-
-const data = [
- {
- title: 'Tyler Dru Kelly',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: '15127570944',
- },
- {
- title: 'Chhavi',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'WLJ240311112',
- },
- {
- title: 'Nathan Posey',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'WLJ240311114',
- },
- {
- title: 'Philip',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'WLJ240312062',
- },
- {
- title: 'Jeanne',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'H240313032',
- },
- {
- title: 'Susan Puls',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'H240311213',
- },
- {
- title: 'Ana Beatriz',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'H240312073',
- },
- {
- title: 'Kathleen Anne Workman',
- avatarUrl: 'https://api.dicebear.com/7.x/miniavs/svg?seed=' + Math.random() * 10000,
- msgTime: 'HXY240104171',
- },
-]
-
-function Login() {
return (
- <>
- (
- ]}
- >
- }
- title={{item.title}}
- description={item.msgTime}
- />
-
-
- )}
+
+
+ ]}
/>
- >
+
);
}
-export default Login;
+export default Chat