|
|
|
@ -13,6 +13,7 @@ import {
|
|
|
|
|
Typography,
|
|
|
|
|
theme,
|
|
|
|
|
Badge,
|
|
|
|
|
Drawer,
|
|
|
|
|
} from 'antd'
|
|
|
|
|
import 'dayjs/locale/zh-cn'
|
|
|
|
|
import { useEffect, useState } from 'react'
|
|
|
|
@ -24,6 +25,8 @@ import 'react-chat-elements/dist/main.css'
|
|
|
|
|
import ReloadPrompt from './ReloadPrompt'
|
|
|
|
|
import ClearCache from './ClearCache'
|
|
|
|
|
|
|
|
|
|
import SnippetList from './accounts/SnippetList'
|
|
|
|
|
|
|
|
|
|
import { BUILD_VERSION, BUILD_DATE } from '@/config'
|
|
|
|
|
|
|
|
|
|
const { Header, Footer, Content } = Layout
|
|
|
|
@ -37,6 +40,14 @@ function DesktopApp() {
|
|
|
|
|
|
|
|
|
|
const totalNotify = useConversationStore((state) => state.totalNotify)
|
|
|
|
|
|
|
|
|
|
const [drawerOpen, setDrawerOpen] = useState(false)
|
|
|
|
|
|
|
|
|
|
const onClick = ({ key }) => {
|
|
|
|
|
if (key === 'snippet-list') {
|
|
|
|
|
setDrawerOpen(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let defaultPath = '/order/follow'
|
|
|
|
|
|
|
|
|
|
if (href !== '/') {
|
|
|
|
@ -78,35 +89,42 @@ function DesktopApp() {
|
|
|
|
|
return (
|
|
|
|
|
<Layout>
|
|
|
|
|
<Header
|
|
|
|
|
className="header"
|
|
|
|
|
className='header'
|
|
|
|
|
style={{
|
|
|
|
|
position: 'sticky',
|
|
|
|
|
top: 0,
|
|
|
|
|
zIndex: 2,
|
|
|
|
|
width: '100%',
|
|
|
|
|
background: 'white',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Row gutter={{ md: 24 }} align="middle">
|
|
|
|
|
<Col flex="220px">
|
|
|
|
|
<NavLink to="/">
|
|
|
|
|
<img src={AppLogo} className="logo" alt="App logo" />
|
|
|
|
|
}}>
|
|
|
|
|
<Drawer
|
|
|
|
|
title='图文集管理'
|
|
|
|
|
placement={'top'}
|
|
|
|
|
size={'large'}
|
|
|
|
|
onClose={() => setDrawerOpen(false)}
|
|
|
|
|
open={drawerOpen}>
|
|
|
|
|
<SnippetList></SnippetList>
|
|
|
|
|
</Drawer>
|
|
|
|
|
<Row gutter={{ md: 24 }} align='middle'>
|
|
|
|
|
<Col flex='220px'>
|
|
|
|
|
<NavLink to='/'>
|
|
|
|
|
<img src={AppLogo} className='logo' alt='App logo' />
|
|
|
|
|
</NavLink>
|
|
|
|
|
<Title level={3}>销售平台</Title>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col span={10}>
|
|
|
|
|
<Menu
|
|
|
|
|
mode="horizontal"
|
|
|
|
|
mode='horizontal'
|
|
|
|
|
selectedKeys={[defaultPath]}
|
|
|
|
|
items={[
|
|
|
|
|
{
|
|
|
|
|
key: '/order/follow',
|
|
|
|
|
label: <Link to="/order/follow">订单跟踪</Link>,
|
|
|
|
|
label: <Link to='/order/follow'>订单跟踪</Link>,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: '/order/chat',
|
|
|
|
|
label: (
|
|
|
|
|
<Link to="/order/chat">
|
|
|
|
|
<Link to='/order/chat'>
|
|
|
|
|
在线聊天
|
|
|
|
|
<Badge
|
|
|
|
|
count={totalNotify > 0 ? totalNotify : undefined}
|
|
|
|
@ -119,34 +137,33 @@ function DesktopApp() {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: '/callcenter/call',
|
|
|
|
|
label: <Link to="/callcenter/call">语音通话</Link>,
|
|
|
|
|
label: <Link to='/callcenter/call'>语音通话</Link>,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
key: '/chat/history',
|
|
|
|
|
label: <Link to="/chat/history">聊天记录</Link>,
|
|
|
|
|
label: <Link to='/chat/history'>聊天记录</Link>,
|
|
|
|
|
},
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</Col>
|
|
|
|
|
<Col
|
|
|
|
|
flex="auto"
|
|
|
|
|
flex='auto'
|
|
|
|
|
style={{
|
|
|
|
|
color: 'white',
|
|
|
|
|
marginBottom: '0',
|
|
|
|
|
display: 'flex',
|
|
|
|
|
justifyContent: 'end',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
}}>
|
|
|
|
|
<ReloadPrompt />
|
|
|
|
|
<Dropdown
|
|
|
|
|
menu={{
|
|
|
|
|
items: [
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/account/profile">个人资料</Link>,
|
|
|
|
|
label: <Link to='/account/profile'>个人资料</Link>,
|
|
|
|
|
key: 'profile',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/account/snippet-list">图文集管理</Link>,
|
|
|
|
|
label: '图文集管理',
|
|
|
|
|
key: 'snippet-list',
|
|
|
|
|
},
|
|
|
|
|
{ type: 'divider' },
|
|
|
|
@ -155,17 +172,16 @@ function DesktopApp() {
|
|
|
|
|
{ label: <ClearCache />, key: 'clearcache' },
|
|
|
|
|
{ type: 'divider' },
|
|
|
|
|
{
|
|
|
|
|
label: <Link to="/p/dingding/logout">退出</Link>,
|
|
|
|
|
label: <Link to='/p/dingding/logout'>退出</Link>,
|
|
|
|
|
key: 'logout',
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
onClick,
|
|
|
|
|
}}
|
|
|
|
|
trigger={['click']}
|
|
|
|
|
>
|
|
|
|
|
trigger={['click']}>
|
|
|
|
|
<a
|
|
|
|
|
onClick={(e) => e.preventDefault()}
|
|
|
|
|
style={{ color: colorPrimary }}
|
|
|
|
|
>
|
|
|
|
|
style={{ color: colorPrimary }}>
|
|
|
|
|
<Space>
|
|
|
|
|
<Avatar src={loginUser.avatarUrl}>
|
|
|
|
|
{loginUser?.username?.substring(1)}
|
|
|
|
@ -185,8 +201,7 @@ function DesktopApp() {
|
|
|
|
|
margin: 0,
|
|
|
|
|
minHeight: 280,
|
|
|
|
|
background: colorBgContainer,
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
}}>
|
|
|
|
|
<Outlet />
|
|
|
|
|
</Content>
|
|
|
|
|
</Layout>
|
|
|
|
|