diff --git a/spug_web/public/index.html b/spug_web/public/index.html
index 389685b..e2cb6c2 100644
--- a/spug_web/public/index.html
+++ b/spug_web/public/index.html
@@ -9,7 +9,7 @@
name="description"
content="Web site created using create-react-app"
/>
-
+
-
Spug O & M management system
+ Spug
diff --git a/spug_web/public/logo.png b/spug_web/public/logo.png
index ce8b4ec..4430b59 100644
Binary files a/spug_web/public/logo.png and b/spug_web/public/logo.png differ
diff --git a/spug_web/src/layout/index.js b/spug_web/src/layout/index.js
index 58be5a1..7a97423 100644
--- a/spug_web/src/layout/index.js
+++ b/spug_web/src/layout/index.js
@@ -5,13 +5,13 @@
*/
import React, { useState, useEffect } from 'react';
import { Switch, Route } from 'react-router-dom';
-import { Layout } from 'antd';
+import { Layout, message } from 'antd';
import { NotFound } from 'components';
import Sider from './Sider';
import Header from './Header';
import Footer from './Footer'
import routes from '../routes';
-import { hasPermission } from 'libs';
+import { hasPermission, isMobile } from 'libs';
import styles from './layout.module.less';
function initRoutes(Routes, routes) {
@@ -31,6 +31,10 @@ export default function () {
const [Routes, setRoutes] = useState([]);
useEffect(() => {
+ if (isMobile) {
+ setCollapsed(true);
+ message.warn('检测到您在移动设备上访问,请使用横屏模式。', 5)
+ }
const Routes = [];
initRoutes(Routes, routes);
setRoutes(Routes)
diff --git a/spug_web/src/libs/functools.js b/spug_web/src/libs/functools.js
index 9411726..8bc5359 100644
--- a/spug_web/src/libs/functools.js
+++ b/spug_web/src/libs/functools.js
@@ -10,6 +10,7 @@ let Permission = {
};
export let X_TOKEN;
+export const isMobile = /Android|iPhone/i.test(navigator.userAgent)
export function updatePermissions() {
X_TOKEN = localStorage.getItem('token');