diff --git a/code/VideoAccess-VCMP/web/client/assets/images/logo/figure.png b/code/VideoAccess-VCMP/web/client/assets/images/logo/figure.png new file mode 100644 index 0000000..eeca37b Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/images/logo/figure.png differ diff --git a/code/VideoAccess-VCMP/web/client/src/components/index.js b/code/VideoAccess-VCMP/web/client/src/components/index.js index 326a725..253c162 100644 --- a/code/VideoAccess-VCMP/web/client/src/components/index.js +++ b/code/VideoAccess-VCMP/web/client/src/components/index.js @@ -1,5 +1,5 @@ 'use strict'; export { - + }; diff --git a/code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx b/code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx index f1b6c3f..4810d20 100644 --- a/code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx +++ b/code/VideoAccess-VCMP/web/client/src/layout/containers/layout/index.jsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'; import { connect } from 'react-redux'; -import { Layout, Toast } from '@douyinfe/semi-ui'; +import { Layout, Notification } from '@douyinfe/semi-ui'; import Sider from '../../components/sider'; import Header from '../../components/header'; import Footer from '../../components/footer'; @@ -11,7 +11,7 @@ import * as NProgress from 'nprogress'; import PerfectScrollbar from 'perfect-scrollbar'; NProgress.configure({ - template: ` + template: `
@@ -24,113 +24,121 @@ NProgress.configure({ let scrollbar const LayoutContainer = props => { - const { - dispatch, msg, user, copyright, children, sections, clientWidth, clientHeight, - location, match, routes, history - } = props - const [collapsed, setCollapsed] = useState(false) + const { + dispatch, msg, user, copyright, children, sections, clientWidth, clientHeight, + location, match, routes, history + } = props + const [collapsed, setCollapsed] = useState(false) - NProgress.start(); + NProgress.start(); - const resize_ = () => { - dispatch(resize( - document.body.clientHeight, - document.body.clientWidth - (collapsed ? 120 : 240) - )); - } + const resize_ = () => { + dispatch(resize( + document.body.clientHeight, + document.body.clientWidth - (collapsed ? 120 : 240) + )); + } - useEffect(() => { - scrollbar = new PerfectScrollbar('#page-content', { suppressScrollX: true }); + useEffect(() => { + scrollbar = new PerfectScrollbar('#page-content', { suppressScrollX: true }); - window.addEventListener('resize', resize_); - return () => { - window.removeEventListener('resize', resize_); - } - }, []) + window.addEventListener('resize', resize_); + return () => { + window.removeEventListener('resize', resize_); + } + }, []) - useEffect(() => { - NProgress.done(); - if (!user || !user.authorized) { - history.push('/signin'); - } - if (msg) { - if (msg.done) { - Toast.success(msg.done); - } - if (msg.error) { - Toast.error(msg.error); - } - } - const dom = document.getElementById('page-content'); - if (dom) { - scrollbar.update(); - dom.scrollTop = 0; - } - }) + useEffect(() => { + NProgress.done(); + if (!user || !user.authorized) { + history.push('/signin'); + } + if (msg) { + if (msg.done) { + Notification.success({ + // title: msg.done, + content: msg.done, + duration: 2, + }) + } + if (msg.error) { + Notification.error({ + // title: msg.error, + content: msg.error, + duration: 2, + }) + } + } + const dom = document.getElementById('page-content'); + if (dom) { + scrollbar.update(); + dom.scrollTop = 0; + } + }) - return ( -