deartibers
2 years ago
17 changed files with 213 additions and 33 deletions
@ -0,0 +1,11 @@ |
|||
#top-slider{ |
|||
.semi-navigation-item-text{ |
|||
color: #F2F3F5; |
|||
} |
|||
.semi-navigation-item-icon{ |
|||
color: #F2F3F5; |
|||
} |
|||
.semi-navigation-item-selected{ |
|||
background: none; |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
'use strict'; |
|||
|
|||
import { ApiTable ,basicAction} from '$utils' |
|||
|
|||
// export function getMembers (orgId) {
|
|||
// return dispatch => basicAction({
|
|||
// type: 'get',
|
|||
// dispatch: dispatch,
|
|||
// actionType: 'GET_MEMBERS',
|
|||
// url: `${ApiTable.getEnterprisesMembers.replace('{enterpriseId}', orgId)}`,
|
|||
// msg: { error: '获取用户列表失败' },
|
|||
// reducer: { name: 'members' }
|
|||
// });
|
|||
// }
|
@ -0,0 +1,7 @@ |
|||
'use strict'; |
|||
|
|||
import * as console from './console' |
|||
|
|||
export default { |
|||
...console |
|||
} |
@ -0,0 +1,49 @@ |
|||
import React, { useEffect } from 'react'; |
|||
import { connect } from 'react-redux'; |
|||
import { Spin, Card } from '@douyinfe/semi-ui'; |
|||
import '../style.less' |
|||
const { Meta } = Card; |
|||
|
|||
const Example = (props) => { |
|||
const { dispatch, actions, user, loading, socket } = props |
|||
|
|||
useEffect(() => { |
|||
// ACTION 示例 |
|||
// dispatch(actions.example.getMembers(user.orgId)) |
|||
}, []) |
|||
|
|||
// websocket 使用测试 |
|||
// useEffect(() => { |
|||
// console.log(socket) |
|||
// if (socket) { |
|||
// socket.on('TEST', function (msg) { |
|||
// console.info(msg); |
|||
// }); |
|||
// return () => { |
|||
// socket.off("TEST"); |
|||
// } |
|||
// } |
|||
|
|||
// }, [socket]) |
|||
|
|||
return ( |
|||
<> |
|||
<div> |
|||
texttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttexttext |
|||
</div> |
|||
</> |
|||
) |
|||
} |
|||
|
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, webSocket } = state; |
|||
return { |
|||
// loading: members.isRequesting, |
|||
// user: auth.user, |
|||
// actions: global.actions, |
|||
// members: members.data, |
|||
// socket: webSocket.socket |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(Example); |
@ -0,0 +1,5 @@ |
|||
'use strict'; |
|||
|
|||
import Console from './console'; |
|||
|
|||
export { Console }; |
@ -0,0 +1,15 @@ |
|||
'use strict'; |
|||
|
|||
import reducers from './reducers'; |
|||
import routes from './routes'; |
|||
import actions from './actions'; |
|||
import { getNavItem } from './nav-item'; |
|||
|
|||
export default { |
|||
key: 'console', |
|||
name: '控制台', |
|||
reducers: reducers, |
|||
routes: routes, |
|||
actions: actions, |
|||
getNavItem: getNavItem |
|||
}; |
@ -0,0 +1,15 @@ |
|||
import React from 'react'; |
|||
import { IconCode } from '@douyinfe/semi-icons'; |
|||
|
|||
export function getNavItem (user, dispatch) { |
|||
return ( |
|||
[ |
|||
{ |
|||
itemKey: 'console', |
|||
text: '控制台', |
|||
to: '/console', |
|||
// icon: <IconCode />, |
|||
}, |
|||
] |
|||
); |
|||
} |
@ -0,0 +1,5 @@ |
|||
'use strict'; |
|||
|
|||
export default { |
|||
|
|||
} |
@ -0,0 +1,13 @@ |
|||
'use strict'; |
|||
import { Console, } from './containers'; |
|||
|
|||
export default [{ |
|||
type: 'inner', |
|||
route: { |
|||
path: '/console', |
|||
key: 'console', |
|||
breadcrumb: '控制台', |
|||
component: Console, |
|||
// 不设置 component 则面包屑禁止跳转
|
|||
} |
|||
}]; |
@ -0,0 +1,7 @@ |
|||
#example { |
|||
box-shadow: 3px 3px 2px black; |
|||
} |
|||
|
|||
#example:hover { |
|||
color: yellowgreen; |
|||
} |
Loading…
Reference in new issue