Your Name пре 3 година
родитељ
комит
c6dc2dc814

+ 1
- 1
config/defaultSettings.js Прегледај датотеку

@@ -7,7 +7,7 @@ const proSettings = {
7 7
   fixedHeader: false,
8 8
   fixSiderbar: true,
9 9
   colorWeak: false,
10
-  title: 'Ant Design Pro',
10
+  title: '禾生汇',
11 11
   pwa: false,
12 12
   iconfontUrl: '',
13 13
   menu: {

+ 1
- 0
config/proxy.js Прегледај датотеку

@@ -9,6 +9,7 @@ export default {
9 9
   dev: {
10 10
     '/api/': {
11 11
       target: 'http://127.0.0.1:8081/',
12
+      // target: 'https://api.medical.p.njyunzhi.com/',
12 13
       changeOrigin: true,
13 14
       pathRewrite: {
14 15
         '^': '',


BIN
src/assets/logo.png Прегледај датотеку


BIN
src/assets/logo_1.png Прегледај датотеку


BIN
src/assets/logo_2.png Прегледај датотеку


+ 32
- 0
src/components/GlobalFooter/index.jsx Прегледај датотеку

@@ -0,0 +1,32 @@
1
+import React from 'react';
2
+import { DefaultFooter } from '@ant-design/pro-layout';
3
+
4
+export default (props) => {
5
+  return (
6
+    <DefaultFooter
7
+      copyright={`${new Date().getFullYear()} 云致科技`}
8
+      links={
9
+        [
10
+          // {
11
+          //   key: 'Ant Design Pro',
12
+          //   title: 'Ant Design Pro',
13
+          //   href: 'https://pro.ant.design',
14
+          //   blankTarget: true,
15
+          // },
16
+          // {
17
+          //   key: 'github',
18
+          //   title: <GithubOutlined />,
19
+          //   href: 'https://github.com/ant-design/ant-design-pro',
20
+          //   blankTarget: true,
21
+          // },
22
+          // {
23
+          //   key: 'Ant Design',
24
+          //   title: 'Ant Design',
25
+          //   href: 'https://ant.design',
26
+          //   blankTarget: true,
27
+          // },
28
+        ]
29
+      }
30
+    />
31
+  )
32
+}

+ 4
- 29
src/layouts/BasicLayout.jsx Прегледај датотеку

@@ -3,7 +3,7 @@
3 3
  *
4 4
  * @see You can view component api by: https://github.com/ant-design/ant-design-pro-layout
5 5
  */
6
-import ProLayout, { DefaultFooter } from '@ant-design/pro-layout';
6
+import ProLayout from '@ant-design/pro-layout';
7 7
 import React, { useMemo } from 'react';
8 8
 // import { Link, useIntl, connect, history } from 'umi';
9 9
 import { Link, connect, history } from 'umi';
@@ -12,8 +12,9 @@ import { Result, Button } from 'antd';
12 12
 import Authorized from '@/utils/Authorized';
13 13
 import { getCurrentRoute } from '@/utils/utils';
14 14
 import RightContent from '@/components/GlobalHeader/RightContent';
15
+import GlobalFooter from '@/components/GlobalFooter';
15 16
 // import { getMatchMenu } from '@umijs/route-utils';
16
-import logo from '../assets/logo.svg';
17
+import logo from '../assets/logo.png';
17 18
 
18 19
 const noMatch = (
19 20
   <Result
@@ -44,33 +45,7 @@ const menuDataRender = (menuRoles) => (menuList) =>
44 45
     return Authorized.check(needAuth ? authority.split(',') : undefined, localItem, null);
45 46
   });
46 47
 
47
-const defaultFooterDom = (
48
-  <DefaultFooter
49
-    copyright={`${new Date().getFullYear()} 云致科技`}
50
-    links={
51
-      [
52
-        // {
53
-        //   key: 'Ant Design Pro',
54
-        //   title: 'Ant Design Pro',
55
-        //   href: 'https://pro.ant.design',
56
-        //   blankTarget: true,
57
-        // },
58
-        // {
59
-        //   key: 'github',
60
-        //   title: <GithubOutlined />,
61
-        //   href: 'https://github.com/ant-design/ant-design-pro',
62
-        //   blankTarget: true,
63
-        // },
64
-        // {
65
-        //   key: 'Ant Design',
66
-        //   title: 'Ant Design',
67
-        //   href: 'https://ant.design',
68
-        //   blankTarget: true,
69
-        // },
70
-      ]
71
-    }
72
-  />
73
-);
48
+const defaultFooterDom = (<GlobalFooter />);
74 49
 
75 50
 const BasicLayout = (props) => {
76 51
   const {

+ 10
- 6
src/layouts/UserLayout.jsx Прегледај датотеку

@@ -1,9 +1,11 @@
1
-import { DefaultFooter, getMenuData, getPageTitle } from '@ant-design/pro-layout';
1
+import { getMenuData, getPageTitle } from '@ant-design/pro-layout';
2 2
 import { Helmet, HelmetProvider } from 'react-helmet-async';
3 3
 // import { Link, SelectLang, useIntl, connect, FormattedMessage } from 'umi';
4 4
 import { Link, connect } from 'umi';
5 5
 import React from 'react';
6
-import logo from '../assets/logo.svg';
6
+import GlobalFooter from '@/components/GlobalFooter'
7
+import setting from '../../config/defaultSettings';
8
+import logo from '../assets/logo.png';
7 9
 import styles from './UserLayout.less';
8 10
 
9 11
 const UserLayout = (props) => {
@@ -21,12 +23,14 @@ const UserLayout = (props) => {
21 23
   } = props;
22 24
   // const { formatMessage } = useIntl();
23 25
   const { breadcrumb } = getMenuData(routes);
26
+
24 27
   const title = getPageTitle({
25 28
     pathname: location.pathname,
26
-    formatMessage: (x) => x,
29
+    formatMessage: (x) => (typeof x === 'object' ? x.defaultMessage : x),
27 30
     breadcrumb,
28 31
     ...props,
29 32
   });
33
+
30 34
   return (
31 35
     <HelmetProvider>
32 36
       <Helmet>
@@ -43,7 +47,7 @@ const UserLayout = (props) => {
43 47
             <div className={styles.header}>
44 48
               <Link to="/">
45 49
                 <img alt="logo" className={styles.logo} src={logo} />
46
-                <span className={styles.title}>Ant Design</span>
50
+                <span className={styles.title}>{setting.title}</span>
47 51
               </Link>
48 52
             </div>
49 53
             <div className={styles.desc}>
@@ -51,12 +55,12 @@ const UserLayout = (props) => {
51 55
                 id="pages.layouts.userLayout.title"
52 56
                 defaultMessage="Ant Design 是西湖区最具影响力的 Web 设计规范"
53 57
               /> */}
54
-              Ant Design 是西湖区最具影响力的 Web 设计规范
58
+              禾生汇 一点康 管理平台
55 59
             </div>
56 60
           </div>
57 61
           {children}
58 62
         </div>
59
-        <DefaultFooter />
63
+        <GlobalFooter />
60 64
       </div>
61 65
     </HelmetProvider>
62 66
   );

+ 6
- 2
src/layouts/UserLayout.less Прегледај датотеку

@@ -49,8 +49,8 @@
49 49
 }
50 50
 
51 51
 .logo {
52
-  height: 44px;
53
-  margin-right: 16px;
52
+  height: 60px;
53
+  // margin-right: 16px;
54 54
   vertical-align: top;
55 55
 }
56 56
 
@@ -61,6 +61,8 @@
61 61
   font-weight: 600;
62 62
   font-size: 33px;
63 63
   font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;
64
+  display: inline-block;
65
+  padding-top: 6px;
64 66
 }
65 67
 
66 68
 .desc {
@@ -68,4 +70,6 @@
68 70
   margin-bottom: 40px;
69 71
   color: @text-color-secondary;
70 72
   font-size: @font-size-base;
73
+  padding-top: 1em;
74
+  letter-spacing: 1px;
71 75
 }

+ 3
- 2
src/pages/System/Role/Edit.jsx Прегледај датотеку

@@ -25,9 +25,10 @@ export default (props) => {
25 25
   };
26 26
 
27 27
   const handleMenuSave = () => {
28
-    const data = menuData.map((m) => ({ roleId: id, menuId: m.menuId }));
28
+    const roleId = id || role.roleId
29
+    const data = menuData.map((m) => ({ roleId, menuId: m.menuId }));
29 30
     setSaveLoading(true);
30
-    request(`/role-menu/${id}`, { method: 'post', data })
31
+    request(`/role-menu/${roleId}`, { method: 'post', data })
31 32
       .then(() => {
32 33
         setRoleMenu(data);
33 34
         setMenuData([]);

+ 2
- 17
src/pages/document.ejs Прегледај датотеку

@@ -3,26 +3,12 @@
3 3
   <head>
4 4
     <meta charset="UTF-8" />
5 5
     <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
-    <meta
7
-      name="keywords"
8
-      content="antd,umi,umijs,ant design,脚手架,布局, Ant Design,项目,Pro,admin,控制台,主页,开箱即用,中后台,解决方案,组件库"
9
-    />
10
-    <meta
11
-      name="description"
12
-      content="
13
-    An out-of-box UI solution for enterprise applications as a React boilerplate."
14
-    />
15
-    <meta
16
-      name="description"
17
-      content="
18
-      开箱即用的中台前端/设计解决方案。"
19
-    />
20 6
     <meta
21 7
       name="viewport"
22 8
       content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"
23 9
     />
24 10
     <title>云致科技</title>
25
-    <link rel="icon" href="<%= context.config.publicPath +'favicon.ico'%>" type="image/x-icon" />
11
+    <link rel="icon" href="<%= context.config.publicPath +'f.png'%>" type="image/png" />
26 12
   </head>
27 13
   <body>
28 14
     <noscript>请启用 JavaScript 并使用现代浏览器 !</noscript>
@@ -190,7 +176,6 @@
190 176
           min-height: 420px;
191 177
         "
192 178
       >
193
-        <img src="<%= context.config.publicPath +'pro_icon.svg'%>" alt="logo" width="256" />
194 179
         <div class="page-loading-warp">
195 180
           <div class="ant-spin ant-spin-lg ant-spin-spinning">
196 181
             <span class="ant-spin-dot ant-spin-dot-spin"
@@ -205,7 +190,7 @@
205 190
             width="32"
206 191
             style="margin-right: 8px"
207 192
           />
208
-          Ant Design
193
+          禾生汇
209 194
         </div>
210 195
       </div>
211 196
     </div>

+ 1
- 0
src/utils/request.js Прегледај датотеку

@@ -34,6 +34,7 @@ const errorHandler = (error) => {
34 34
   } else if (error.code && error.message) {
35 35
     throw new Error(error.message);
36 36
   } else {
37
+    console.error(error)
37 38
     notification.error({
38 39
       description: '您的网络发生异常,无法连接服务器',
39 40
       message: '网络异常',