Skip to content

Commit

Permalink
Merge pull request #35 from dengliming/spring_cloud_plugin
Browse files Browse the repository at this point in the history
Make springCloud plugin using common plugin handle
  • Loading branch information
yu199195 authored Nov 29, 2020
2 parents b9c895c + e7a2d0c commit 23a4d83
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 1,477 deletions.
5 changes: 0 additions & 5 deletions src/common/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ const menuData = [
path: 'divide',
id: 'divide6'
},
{
name: 'springCloud',
path: 'springCloud',
id: 'springCloud8'
},
{
name: 'hystrix',
path: 'hystrix',
Expand Down
3 changes: 0 additions & 3 deletions src/common/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ export const getRouterData = app => {
'/plug/divide': {
component: dynamicWrapper(app, ['divide'], () => import('../routes/Plugin/Divide')),
},
'/plug/springCloud': {
component: dynamicWrapper(app, ['spring'], () => import('../routes/Plugin/Spring')),
},
'/plug/:id': {
component: dynamicWrapper(app, ['common'], () => import('../routes/Plugin/Common')),
},
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/BasicLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class BasicLayout extends React.PureComponent {
render() {
const { collapsed, routerData, match, location, plugins, dispatch, } = this.props;
const bashRedirect = this.getBaseRedirect();
const systemRoute = ["divide", "springCloud", "hystrix"];
const systemRoute = ["divide", "hystrix"];
let menus = getMenuData();
plugins.forEach((item) => {
if (systemRoute.indexOf(item.name) === -1) {
Expand Down
2 changes: 1 addition & 1 deletion src/models/pluginHandle.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default {
let handle = payload.handle;
let callback = payload.callBack;
let handleJson;
if (handle != null && handle !== "" && typeof (handle) !== "undefined") {
if (handle != null && handle !== "" && typeof (handle) !== "undefined" && handle.indexOf("{") !== -1) {
handleJson = JSON.parse(handle);
}
const json = yield call(fetchPluginHandleByPluginId, payload);
Expand Down
Loading

0 comments on commit 23a4d83

Please sign in to comment.