Your Name 3 лет назад
Родитель
Сommit
f1b281d431
4 измененных файлов: 11 добавлений и 5 удалений
  1. 2
    2
      config/proxy.js
  2. 3
    0
      config/routes.js
  3. 4
    2
      src/layouts/BasicLayout.jsx
  4. 2
    1
      src/pages/building/Developers/tableColumns.js

+ 2
- 2
config/proxy.js Просмотреть файл

@@ -8,8 +8,8 @@
8 8
 export default {
9 9
   dev: {
10 10
     '/api/': {
11
-      // target: 'https://xlk.njyz.tech/',
12
-      target: 'http://localhost:8081/',
11
+      target: 'https://xlj.newlandsh.com/',
12
+      // target: 'http://localhost:8081/',
13 13
       // target: 'https://xlj.newlandsh.com/',
14 14
       changeOrigin: true,
15 15
       pathRewrite: {

+ 3
- 0
config/routes.js Просмотреть файл

@@ -606,17 +606,20 @@ export default [
606 606
             path: '/statistics',
607 607
             name: '数据统计',
608 608
             component: '../layouts/BlankLayout',
609
+            menuCode: '/statistics',
609 610
             // hideInMenu: true,
610 611
             routes: [
611 612
               {
612 613
                 path: '/statistics/dataReport',
613 614
                 name: '数据报表',
614 615
                 component: './statistics/dataReport',
616
+                menuCode: '/statistics/dataReport',
615 617
               },
616 618
               {
617 619
                 path: '/statistics/activity',
618 620
                 name: '活动统计',
619 621
                 component: './statistics/activity',
622
+                menuCode: '/statistics/activity',
620 623
               },
621 624
             ],
622 625
           },

+ 4
- 2
src/layouts/BasicLayout.jsx Просмотреть файл

@@ -33,7 +33,9 @@ const menuDataRender = (menuRoles) => (menuList) =>
33 33
     const needAuth = !!item.menuCode;
34 34
 
35 35
     const authority =
36
-      (menuRoles.filter((x) => x.menuCode === item.menuCode)[0] || {}).roles || [];
36
+      (menuRoles.filter((x) => x.code === item.menuCode)[0] || {}).roles || [];
37
+
38
+    console.log('-------------->', item.menuCode, authority)
37 39
 
38 40
     const localItem = { ...item, children: item.children ? menuDataRender(menuRoles)(item.children) : [] };
39 41
     return Authorized.check(needAuth ? authority : undefined, localItem, null);
@@ -71,7 +73,7 @@ const BasicLayout = (props) => {
71 73
       };
72 74
     }
73 75
 
74
-    const authority = (menus.filter((x) => x.menuCode === routeItem.menuCode)[0] || {}).roles;
76
+    const authority = (menus.filter((x) => x.code === routeItem.menuCode)[0] || {}).roles;
75 77
     return {
76 78
       authority: authority && authority.length ? authority : ['any-string-for-no-right'],
77 79
     };

+ 2
- 1
src/pages/building/Developers/tableColumns.js Просмотреть файл

@@ -23,7 +23,7 @@ export default ({page,getBrandData, onEdit, onDelete}) => [
23 23
     align: 'center',
24 24
   },
25 25
   {
26
-    title: '品牌宣传图',
26
+    title: '品牌Logo',
27 27
     dataIndex: 'brandLogo',
28 28
     key: 'brandLogo',
29 29
     align: 'center',
@@ -41,6 +41,7 @@ export default ({page,getBrandData, onEdit, onDelete}) => [
41 41
     dataIndex: 'brandRemark',
42 42
     key: 'brandRemark',
43 43
     align: 'center',
44
+    width: '40%',
44 45
   },
45 46
   {
46 47
     title: '操作',