diff --git a/config/config.js b/config/config.js
index 14c006a8f..9b7efa429 100644
--- a/config/config.js
+++ b/config/config.js
@@ -46,20 +46,20 @@ export default {
routes: routerConfig,
proxy: {
'/console': {
- target: 'http://127.0.0.1:8000/',
+ target: 'http://127.0.0.1:8080/',
changeOrigin: true
},
'/data': {
- target: 'http://127.0.0.1:8000/',
+ target: 'http://127.0.0.1:8080/',
changeOrigin: true
},
'/openapi/v1': {
- target: 'http://127.0.0.1:8000/',
+ target: 'http://127.0.0.1:8080/',
changeOrigin: true
},
'/enterprise-server':{
- target:'http://127.0.0.1:8000/',
+ target:'http://127.0.0.1:8080/',
changeOrigin: true
},
}
-};
+};
\ No newline at end of file
diff --git a/config/router.config.js b/config/router.config.js
index 20a3fb8f5..dec29c901 100644
--- a/config/router.config.js
+++ b/config/router.config.js
@@ -38,19 +38,28 @@ export default [
// Enterprise view layout
{
path: '/',
- redirect: '/enterprise/auto'
+ redirect: '/redirect'
},
{
- path: '/enterprise/:eid/personal',
- component: '../layouts/PersonalSpace',
- name: 'PersonalSpace',
+ path: '/redirect',
+ component: '../layouts/Auto',
+ name: 'Auto',
authority: ['admin', 'user'],
},
+ // 邀请
+ {
+ path: '/invite/:InviteId',
+ component: '../layouts/Invite',
+ name: 'Invite',
+ authority: ['admin', 'user'],
+ },
+ // 企业
{
path: '/enterprise/:eid',
component: '../layouts/EnterpriseLayout',
name: 'EnterprisePage',
authority: ['admin', 'user'],
+ Routes: ['./routes/AdminRoute.js'],
routes: [
{
path: '/enterprise/:eid/index',
@@ -654,6 +663,14 @@ export default [
{
path: '/account/center/accesstoken',
component: './Account/Center/AccesstokenView'
+ },
+ {
+ path: '/account/center/img',
+ component: './Account/Center/ImgView'
+ },
+ {
+ path: '/account/center/personal',
+ component: './Account/Center/PersonalView'
}
]
},
diff --git a/public/images/code.svg b/public/images/code.svg
new file mode 100644
index 000000000..799d8ecf6
--- /dev/null
+++ b/public/images/code.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/images/default_Avatar.png b/public/images/default_Avatar.png
new file mode 100644
index 000000000..a4675e615
Binary files /dev/null and b/public/images/default_Avatar.png differ
diff --git a/routes/AdminRoute.js b/routes/AdminRoute.js
new file mode 100644
index 000000000..940b483e1
--- /dev/null
+++ b/routes/AdminRoute.js
@@ -0,0 +1,29 @@
+import { connect } from 'dva';
+import React, { Component } from 'react'
+import Exception from '../src/components/Exception'
+import apiconfig from '../config/api.config'
+
+@connect(({ user }) => ({
+ currentUser: user.currentUser
+}))
+export default class PrivateRoute extends Component {
+ constructor(props) {
+ super(props);
+ }
+ render() {
+ const { route } = this.props;
+ const { currentUser } = this.props;
+ return (
+ <>
+ {
+ currentUser?.is_enterprise_admin
+ ?
+ this.props.children
+ :
+