Explorar o código

产品锁库架构修改

outaozhen %!s(int64=5) %!d(string=hai) anos
pai
achega
12ce4a72aa

+ 1 - 1
src/contact/contact.js

@@ -53,7 +53,7 @@ class contact extends Component {
           <div className="page-content-wrapper">
                
                 <Route path='/contact' exact component={Client} ></Route>
-                <Route path='/client/lockStatistics' exact render={()=><div>使用统计</div>} ></Route>
+                <Route path='/contac/company' exact render={()=><div>使用统计</div>} ></Route>
                
           </div>
             </BrowserRouter>

+ 14 - 0
src/product/common/store/actionCreators.js

@@ -0,0 +1,14 @@
+import * as constants from './constants';
+import { fromJS } from 'immutable';
+
+import axios from '../../../common/axios_auth.js';
+// import axios from 'axios';
+
+//actionType
+export const menuActive = (value) => ({
+    type: constants.MENU_ACTIVE,
+    data:fromJS(value),
+});
+
+
+

+ 4 - 0
src/product/common/store/constants.js

@@ -0,0 +1,4 @@
+export const MENU_ACTIVE = 'common/MENU_ACTIVE';
+
+
+

src/product/submenu/store/index.js → src/product/common/store/index.js


+ 35 - 0
src/product/common/store/reducer.js

@@ -0,0 +1,35 @@
+import * as constants from './constants';
+//锁定state不可修改,导致错误y
+import { fromJS } from 'immutable';
+
+
+const defaultState = fromJS({
+    menuActive: 'lock_count',
+});
+
+
+export default (state = defaultState, action) => {
+
+    if(action.type===constants.MENU_ACTIVE){
+        return state.set('menuActive',action.data);
+    }
+
+
+
+    // if(action.type===constants.SEARCH_FOCUS){
+    //     return state.set('menu','clicke me');
+    //     // return {
+    //     //     menu:'clicke me'
+    //     // }
+    // }
+    // if(action.type===constants.CHANGE_LIST){
+    //     return state.set('list',action.data);
+    //     //return state.set('menu','clicke me');
+
+    //     // return state.merge({
+    //     //     list: action.data,
+    //     //     //totalPage: action.totalPage
+    //     // });
+    // }
+    return state;
+}

+ 0 - 42
src/product/content/lock_statistics.js

@@ -1,42 +0,0 @@
-import React, { Component } from 'react';
-import { Provider } from 'react-redux';
-// import Content from './content';
-
-//import './product.css';
-
-class Lockstatistics extends Component {
-  render() {
-    //console.log(this.props.store);
-    return (
-      <div className="page-content-wrapper">
-        <header class="page-header" role="banner">
-          <div class="hidden-md-down dropdown-icon-menu position-relative">
-            <a href="#" class="header-btn btn js-waves-off" data-action="toggle" data-class="nav-function-hidden" title="隐藏侧栏">
-              <i class="ni ni-menu"></i>
-            </a>
-            <ul>
-              <li>
-                <a href="#" class="btn js-waves-off" data-action="toggle" data-class="nav-function-minify" title="迷你侧栏">
-                  <i class="ni ni-minify-nav"></i>
-                </a>
-              </li>
-            </ul>
-          </div>
-          <div class="hidden-lg-up">
-            <a href="#" class="header-btn btn press-scale-down waves-effect waves-themed" data-action="toggle" data-class="mobile-nav-on">
-              <i class="ni ni-menu"></i>
-            </a>
-          </div>
-          <h1 class="subheader-title">
-            使用统计
-          </h1>
-        </header>
-      </div>
-     
-    );
-  }
-}
-
-export default Lockstatistics;
-
-

+ 0 - 60
src/product/content/lock_store.js

@@ -1,60 +0,0 @@
-import React, { Component } from 'react';
-import { Provider } from 'react-redux';
-
-// import Content from './content';
-
-//import './product.css';
-
-class Lockstore extends Component {
-  render() {
-    //console.log(this.props.store);
-    return (
-    	<div className="page-content-wrapper">
-        <header className="page-header" role="banner">
-          <div className="hidden-md-down dropdown-icon-menu position-relative">
-            <a href="#" class="header-btn btn js-waves-off" data-action="toggle" data-class="nav-function-hidden" title="隐藏侧栏">
-              <i className="ni ni-menu"></i>
-            </a>
-            <ul>
-              <li>
-                <a href="#" className="btn js-waves-off" data-action="toggle" data-class="nav-function-minify" title="迷你侧栏">
-                  <i className="ni ni-minify-nav"></i>
-                </a>
-              </li>
-            </ul>
-          </div>
-          <div class="hidden-lg-up">
-            <a href="#" class="header-btn btn press-scale-down waves-effect waves-themed" data-action="toggle" data-class="mobile-nav-on">
-     						<i class="ni ni-menu"></i>
-     					</a>
-          </div>
-          <h1 class="subheader-title">
-            公共锁库
-          </h1>
-        </header>
-        <main id="js-page-content" role="main" className="page-content">
-          <div class="row">
-            <div class="col-xl-12">
-              <div id="panel-1" class="panel">
-                <div class="panel-hdr">
-                  <div class="col-auto pr-0">
-                    <div class="input-group input-group-sm bg-white shadow-inset-2">
-                      <input type="text" class="form-control bg-transparent" placeholder="锁号"/>
-                      <div class="input-group-append">
-                        <button class="btn btn-default waves-effect waves-themed" type="button" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="搜索"><i class="fal fa-search"></i></button>
-                      </div>
-                    </div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-        </main>
-      </div>
-    );
-  }
-}
-
-export default Lockstore;
-
-

+ 7 - 1
src/product/index.js

@@ -2,4 +2,10 @@ import React from 'react';
 import ReactDOM from 'react-dom';
 import Product from './product';
 
-ReactDOM.render(<Product />, document.getElementById('root'));
+const App=(
+<Provider store={store}>
+<Contact />
+</Provider>
+)
+
+ReactDOM.render(App, document.getElementById('root'));

+ 96 - 0
src/product/lock_count/index.js

@@ -0,0 +1,96 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { BrowserRouter, Route,Link } from 'react-router-dom';
+
+import { actionCreators } from './store';
+
+class lock_count extends PureComponent {
+
+    
+
+    getListArea() {
+        const { list, menu } = this.props;
+        menu;
+        if (true) {
+            return (
+                <div>
+                   {
+                    list.map((item) => {
+                        return <span className='ispan' type="text" key={item} >{item}</span>
+                    })
+                }
+                </div>
+            )
+        } else {
+            return null;
+        }
+    }
+
+
+    render() {
+        //const { inputValue, handleInputFocus,handleInputChange, menu, list } = this.props;
+        return (
+            <div>lock_count</div>
+        );
+    }
+
+    //组件即将要被挂在的时候执行的方法--
+    componentDidMount(){
+        //逻辑代码可以写在mapDispathToProps里 this.props.方法
+
+        // axios.get('/api/submenuList.json').then((res) => {
+        //     const data = res.data;
+        //     dispatch(changeList(data.data));
+        // }).catch(() => {
+        //     console.log('error');
+        // })
+    }
+
+}
+/**
+ * store里的数据映射到这个组件里的state
+ * @param {*} state 
+ */
+const mapStateToProps = (state) => {
+
+    return {
+        //menu: state.submenu.menu
+        menu: state.getIn(['submenu', 'menu']),
+        list: state.getIn(['submenu', 'list']),
+        inputValue: state.getIn(['submenu', 'inputValue']),
+    }
+    // return {
+    // 	focused: state.getIn(['header', 'focused']),
+    // 	list: state.getIn(['header', 'list']),
+    // 	page: state.getIn(['header', 'page']),
+    // 	totalPage: state.getIn(['header', 'totalPage']),
+    // 	mouseIn: state.getIn(['header', 'mouseIn'])
+    // }
+}
+
+/**
+ * 要改变store里的内容需要调用dispatch方法
+ * @param {*} dispatch 
+ */
+const mapDispathToProps = (dispatch) => {
+    return {
+        handleInputFocus(list) {
+
+            // const action = {
+            //     type: 'aearch_focus'
+            // };
+            //发送给store--提取出action--避免发送重复的ajax请求
+            (list.size === 0) && dispatch(actionCreators.getList());
+            // if(list.size>0){
+            //     dispatch(actionCreators.getList());
+            // }
+            dispatch(actionCreators.searchFocus());
+        },
+        handleInputChange(ivalueElem){
+           
+            dispatch(actionCreators.changeInputValue(ivalueElem.value));
+        },
+    }
+}
+
+export default connect(mapStateToProps, mapDispathToProps)(lock_count);

src/product/submenu/store/actionCreators.js → src/product/lock_count/store/actionCreators.js


src/product/submenu/store/constants.js → src/product/lock_count/store/constants.js


+ 5 - 0
src/product/lock_count/store/index.js

@@ -0,0 +1,5 @@
+import reducer from './reducer';
+import * as actionCreators from './actionCreators';
+import * as constants from './constants';
+
+export { reducer,actionCreators,constants }

src/product/submenu/store/reducer.js → src/product/lock_count/store/reducer.js


+ 96 - 0
src/product/lock_store/index.js

@@ -0,0 +1,96 @@
+import React from 'react';
+import { connect } from 'react-redux';
+import { BrowserRouter, Route,Link } from 'react-router-dom';
+
+import { actionCreators } from './store';
+
+class lock_store extends PureComponent {
+
+    
+
+    getListArea() {
+        const { list, menu } = this.props;
+        menu;
+        if (true) {
+            return (
+                <div>
+                   {
+                    list.map((item) => {
+                        return <span className='ispan' type="text" key={item} >{item}</span>
+                    })
+                }
+                </div>
+            )
+        } else {
+            return null;
+        }
+    }
+
+
+    render() {
+        //const { inputValue, handleInputFocus,handleInputChange, menu, list } = this.props;
+        return (
+            <div>lock_store</div>
+        );
+    }
+
+    //组件即将要被挂在的时候执行的方法--
+    componentDidMount(){
+        //逻辑代码可以写在mapDispathToProps里 this.props.方法
+
+        // axios.get('/api/submenuList.json').then((res) => {
+        //     const data = res.data;
+        //     dispatch(changeList(data.data));
+        // }).catch(() => {
+        //     console.log('error');
+        // })
+    }
+
+}
+/**
+ * store里的数据映射到这个组件里的state
+ * @param {*} state 
+ */
+const mapStateToProps = (state) => {
+
+    return {
+        //menu: state.submenu.menu
+        menu: state.getIn(['submenu', 'menu']),
+        list: state.getIn(['submenu', 'list']),
+        inputValue: state.getIn(['submenu', 'inputValue']),
+    }
+    // return {
+    // 	focused: state.getIn(['header', 'focused']),
+    // 	list: state.getIn(['header', 'list']),
+    // 	page: state.getIn(['header', 'page']),
+    // 	totalPage: state.getIn(['header', 'totalPage']),
+    // 	mouseIn: state.getIn(['header', 'mouseIn'])
+    // }
+}
+
+/**
+ * 要改变store里的内容需要调用dispatch方法
+ * @param {*} dispatch 
+ */
+const mapDispathToProps = (dispatch) => {
+    return {
+        handleInputFocus(list) {
+
+            // const action = {
+            //     type: 'aearch_focus'
+            // };
+            //发送给store--提取出action--避免发送重复的ajax请求
+            (list.size === 0) && dispatch(actionCreators.getList());
+            // if(list.size>0){
+            //     dispatch(actionCreators.getList());
+            // }
+            dispatch(actionCreators.searchFocus());
+        },
+        handleInputChange(ivalueElem){
+           
+            dispatch(actionCreators.changeInputValue(ivalueElem.value));
+        },
+    }
+}
+
+export default connect(mapStateToProps, mapDispathToProps)(lock_store);

+ 52 - 0
src/product/lock_store/store/actionCreators.js

@@ -0,0 +1,52 @@
+import * as constants from './constants';
+import { fromJS } from 'immutable';
+
+import axios from '../../../common/axios_auth.js';
+// import axios from 'axios';
+
+
+
+//actionType
+export const searchFocus = () => ({
+    type: constants.SEARCH_FOCUS
+});
+
+export const getList = () => {
+    return (dispatch) => {
+        axios.get('/api/submenuList.json').then((res) => {
+            const data = res.data;
+            dispatch(changeList(data.data));
+        }).catch(() => {
+            console.log('error');
+        })
+    }
+};
+
+export const changeInputValue = (value) => (  {
+    type: constants.CHANGE_INPUTVALUE,
+    data:fromJS(value),
+});
+
+const changeList = (data) => ({
+    type: constants.CHANGE_LIST,
+    data: fromJS(data),
+    // totalPage: Math.ceil(data.length / 10)
+});
+
+// export const searchBlur = () => ({
+// 	type: constants.SEARCH_BLUR
+// });
+
+// export const mouseEnter = () => ({
+// 	type: constants.MOUSE_ENTER
+// });
+
+// export const mouseLeave = () => ({
+// 	type: constants.MOUSE_LEAVE
+// });
+
+// export const changePage = (page) => ({
+// 	type: constants.CHANGE_PAGE,
+// 	page
+// });
+

+ 5 - 0
src/product/lock_store/store/constants.js

@@ -0,0 +1,5 @@
+export const SEARCH_FOCUS = 'submenu/SEARCH_FOCUS';
+export const CHANGE_LIST ='submenu/CHANGE_LIST';
+export const CHANGE_INPUTVALUE ='submenu/CHANGE_INPUTVALUE';
+
+

+ 5 - 0
src/product/lock_store/store/index.js

@@ -0,0 +1,5 @@
+import reducer from './reducer';
+import * as actionCreators from './actionCreators';
+import * as constants from './constants';
+
+export { reducer,actionCreators,constants }

+ 58 - 0
src/product/lock_store/store/reducer.js

@@ -0,0 +1,58 @@
+import * as constants from './constants';
+//锁定state不可修改,导致错误y
+import { fromJS } from 'immutable';
+
+
+const defaultState = fromJS({
+    menu: 'hello submenu-t!!!',
+    list:[],
+    inputValue:'',
+
+});
+
+
+export default (state = defaultState, action) => {
+
+    // switch(action.type) {
+	// 	case constants.SEARCH_FOCUS:
+	// 		return state.set('focused', true);
+	// 	case constants.SEARCH_BLUR:
+	// 		return state.set('focused', false);
+	// 	case constants.CHANGE_LIST:
+	// 		return state.merge({
+	// 			list: action.data,
+	// 			totalPage: action.totalPage
+	// 		});
+	// 	case constants.MOUSE_ENTER:
+	// 		return state.set('mouseIn', true);
+	// 	case constants.MOUSE_LEAVE:
+	// 		return state.set('mouseIn', false);
+	// 	case constants.CHANGE_PAGE:
+	// 		return state.set('page', action.page);
+	// 	default:
+	// 		return state;
+	// }
+    if(action.type===constants.CHANGE_INPUTVALUE){
+        return state.set('inputValue',action.data);
+
+    }
+
+
+
+    if(action.type===constants.SEARCH_FOCUS){
+        return state.set('menu','clicke me');
+        // return {
+        //     menu:'clicke me'
+        // }
+    }
+    if(action.type===constants.CHANGE_LIST){
+        return state.set('list',action.data);
+        //return state.set('menu','clicke me');
+
+        // return state.merge({
+        //     list: action.data,
+        //     //totalPage: action.totalPage
+        // });
+    }
+    return state;
+}

+ 117 - 10
src/product/product.js

@@ -1,24 +1,131 @@
 import React, { Component } from 'react';
 import { Provider } from 'react-redux';
-import store from './store';
-import Submenu from './submenu';
+import Store from './store';
+import Lockcount from './lock_count';
+import Lockstore from './lock_store';
 
 
-//import './product.css';
+class product extends Component {
 
-class submenu extends Component {
   render() {
-    //console.log(this.props.store);
+    const { menuActive,handleMenuActive } = this.props;
+     //console.log(this.state);
+    //console.log(store.getIn('common','menuActive'));
     return (
-      <Provider store={store}>
-        <Submenu />
-      </Provider>
+      // <Provider store={store}>
+         
+        <BrowserRouter>
+          <aside class="page-sidebar">
+        <div class="page-logo">
+          <a href="#modal-shortcut" class="page-logo-link press-scale-down d-flex align-items-center position-relative" data-toggle="modal">
+            <div class="icon-stack fa-2x">
+              <i class="base base-7 icon-stack-3x opacity-100 color-danger-900 "></i>
+              <i class="base base-4 icon-stack-2x opacity-100 color-danger-600 "></i>
+              <i class="fal fa-box icon-stack-1x opacity-100 color-white"></i>
+            </div>
+            <span class="page-logo-text mr-1">产品</span>
+            <span class="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
+            <i class="ni ni-my-apps d-inline-block ml-1 fs-lg color-primary-300"></i>
+          </a>
+        </div>
+        {/* <!-- 侧栏主菜单 --> */}
+        <nav id="js-primary-nav" class="primary-nav" role="navigation">
+                        <ul id="js-nav-menu" class="nav-menu">
+                            <li class="active open">
+                                <a href="#" title="软件锁" data-filter-tags="软件锁" class="waves-effect waves-themed">
+                                    <i class="fal fa-magic "></i>
+                                    <span class="nav-link-text">软件锁</span>
+                                </a>
+                                <ul>
+                                    <li class="active">
+                                        <a href="lock-client.html" title="Analytics Dashboard" data-filter-tags="application intel analytics dashboard">
+                                            <span class="nav-link-text">公共锁库</span>
+                                        </a>
+                                    </li>
+                                    <li>
+                                        <a href="lock-ccount.html" title="Marketing Dashboard" data-filter-tags="application intel marketing dashboard">
+                                            <span class="nav-link-text">使用统计</span>
+                                        </a>
+                                    </li>
+                                </ul>
+                            </li>
+                            <li class="">
+                                <a href="#" title="Application Intel" data-filter-tags="application intel">
+                                    <i class="fal fa-cloud "></i>
+                                    <span class="nav-link-text">云版管理</span>
+                                </a>
+                                <ul>
+                                    <li>
+                                        <a href="intel_analytics_dashboard.html" title="Analytics Dashboard" data-filter-tags="application intel analytics dashboard">
+                                            <span class="nav-link-text">养护云版</span>
+                                        </a>
+                                    </li>
+                                    <li>
+                                        <a href="intel_marketing_dashboard.html" title="Marketing Dashboard" data-filter-tags="application intel marketing dashboard">
+                                            <span class="nav-link-text">建筑云版</span>
+                                        </a>
+                                    </li>
+                                </ul>
+                            </li>
+                        </ul>
+                        <div class="filter-message js-filter-message bg-success-600"></div>
+                    </nav>
+        {/* <!-- END 侧栏主菜单 --> */}
+        {/* <!--侧栏底部菜单--> */}
+        <div class="nav-footer shadow-top">
+          <a href="#" onclick="return false;" data-action="toggle" data-class="nav-function-minify" class="hidden-md-down">
+     					<i class="ni ni-chevron-right"></i>
+     					<i class="ni ni-chevron-right"></i>
+     				</a>
+          <ul class="list-table m-auto nav-footer-buttons">
+            <li>
+              <a href="javascript:void(0);" data-toggle="tooltip" data-placement="top" title="" data-original-title="Chat logs">
+     							<i class="fal fa-comments"></i>
+     						</a>
+            </li>
+            <li>
+              <a href="javascript:void(0);" data-toggle="tooltip" data-placement="top" title="" data-original-title="Support Chat">
+     							<i class="fal fa-life-ring"></i>
+     						</a>
+            </li>
+            <li>
+              <a href="javascript:void(0);" data-toggle="tooltip" data-placement="top" title="" data-original-title="Make a call">
+     							<i class="fal fa-phone"></i>
+     						</a>
+            </li>
+          </ul>
+        </div>
+      </aside>
+
+      {/* <div className="page-content-wrapper">
+               
+        <Route path='/product' exact component={Client} ></Route>
+        <Route path='/product/lock_store' exact render={()=><div>使用统计</div>} ></Route>
+               
+      </div> */}
+        </BrowserRouter>
         
-     
+      // </Provider>
     );
   }
+
 }
 
-export default submenu;
+const mapStateToProps = (state) => {
 
+  return {
+    menuActive: state.getIn(['common', 'menuActive']),
+  }
+}
 
+
+const mapDispathToProps = (dispatch) => {
+  return {
+    handleMenuActive(value) {
+      dispatch(actionCreators.menuActive(value));
+    },
+  }
+  
+}
+// export default contact;
+export default connect(mapStateToProps, mapDispathToProps)(product);

+ 8 - 2
src/product/store/reducer.js

@@ -1,8 +1,14 @@
 import { combineReducers } from 'redux-immutable';
-import { reducer as submenuReducer } from '../submenu/store';
+import { reducer as clientReducer } from '../lock_count/store';
+import { reducer as commonReducer } from '../lock_store/store';
+
+
+
 
 const reducer = combineReducers({
-    submenu: submenuReducer
+    common: commonReducer,
+    client: clientReducer,
+
 });
 
 export default reducer;

+ 0 - 143
src/product/submenu/index.js

@@ -1,143 +0,0 @@
-import React, { PureComponent } from 'react';
-import { connect } from 'react-redux';
-import { actionCreators } from './store';
-import { BrowserRouter, Route,Link } from 'react-router-dom';
-
-import  Lockstore  from '../content/lock_store.js';
-import  Lockstatistics  from '../content/lock_statistics.js';
-
-class Submenu extends PureComponent {
-
-    render() {
-       // const { inputValue, handleInputFocus,handleInputChange, menu, list } = this.props;
-        return (
-
-          
-          <BrowserRouter>
-
-          <aside className="page-sidebar">
-            <div className="page-logo">
-              <a href="#modal-shortcut" class="page-logo-link press-scale-down d-flex align-items-center position-relative" data-toggle="modal">
-                <div className="icon-stack fa-2x">
-                  <i className="base base-7 icon-stack-3x opacity-100 color-danger-900 "></i>
-                  <i className="base base-4 icon-stack-2x opacity-100 color-danger-600 "></i>
-                  <i className="fal fa-box icon-stack-1x opacity-100 color-white"></i>
-                </div>
-                <span className="page-logo-text mr-1">产品</span>
-                <span className="position-absolute text-white opacity-50 small pos-top pos-right mr-2 mt-n2"></span>
-                <i className="ni ni-my-apps d-inline-block ml-1 fs-lg color-primary-300"></i>
-              </a>
-            </div>
-            <nav id="js-primary-nav" className="primary-nav" role="navigation">
-              <ul id="js-nav-menu" className="nav-menu">
-                <li className="active open">
-                  <a href="#" title="软件锁" data-filter-tags="软件锁" class="waves-effect waves-themed">
-                    <i className="fal fa-magic "></i>
-                    <span className="nav-link-text">软件锁</span>
-                  </a>
-                  <ul>
-                    <li className="active">
-                      {<Link to='/product/Lockstore'>公共锁库</Link>}
-                    </li>
-                    <li>
-                      {<Link to='/product/lockStatistics'>使用统计</Link>}
-                    </li>
-                  </ul>
-                </li>
-                <li className="">
-                  <a href="#" title="Application Intel" data-filter-tags="application intel">
-                    <i className="fal fa-cloud "></i>
-                    <span className="nav-link-text">云版管理</span>
-                  </a>
-                  <ul>
-                    <li>
-                      <a href="intel_analytics_dashboard.html" title="Analytics Dashboard" data-filter-tags="application intel analytics dashboard">
-                        <span className="nav-link-text">养护云版</span>
-                      </a>
-                    </li>
-                    <li>
-                      <a href="intel_marketing_dashboard.html" title="Marketing Dashboard" data-filter-tags="application intel marketing dashboard">
-                        <span className="nav-link-text">建筑云版</span>
-                      </a>
-                    </li>
-                  </ul>
-                </li>
-              </ul>
-              
-            </nav>
-            
-          </aside>
-          <div className="page-content-wrapper">
-              <Route path='/product/Lockstore' exact component={Lockstore} ></Route>
-              <Route path='/product/lockStatistics' exact component={Lockstatistics} ></Route>
-            {/*<Route path='/product/lockStatistics' exact render={()=><div>16515</div>} ></Route>*/}
-          </div>
-          </BrowserRouter>
-        );
-    }
-
-    //组件即将要被挂在的时候执行的方法--
-    componentDidMount(){
-        //逻辑代码可以写在mapDispathToProps里 this.props.方法
-
-        // axios.get('/api/submenuList.json').then((res) => {
-        //     const data = res.data;
-        //     dispatch(changeList(data.data));
-        // }).catch(() => {
-        //     console.log('error');
-        // })
-    }
-
-}
-
-
-
-/**
- * store里的数据映射到这个组件里的state
- * @param {*} state 
- */
-const mapStateToProps = (state) => {
-
-    return {
-        //menu: state.submenu.menu
-        menu: state.getIn(['submenu', 'menu']),
-        list: state.getIn(['submenu', 'list']),
-        inputValue: state.getIn(['submenu', 'inputValue']),
-    }
-    // return {
-    // 	focused: state.getIn(['header', 'focused']),
-    // 	list: state.getIn(['header', 'list']),
-    // 	page: state.getIn(['header', 'page']),
-    // 	totalPage: state.getIn(['header', 'totalPage']),
-    // 	mouseIn: state.getIn(['header', 'mouseIn'])
-    // }
-}
-
-
-/**
- * 要改变store里的内容需要调用dispatch方法
- * @param {*} dispatch 
- */
-const mapDispathToProps = (dispatch) => {
-    return {
-        handleInputFocus(list) {
-
-            // const action = {
-            //     type: 'aearch_focus'
-            // };
-            //发送给store--提取出action--避免发送重复的ajax请求
-            (list.size === 0) && dispatch(actionCreators.getList());
-            // if(list.size>0){
-            //     dispatch(actionCreators.getList());
-            // }
-            dispatch(actionCreators.searchFocus());
-        },
-        handleInputChange(ivalueElem){
-           
-            dispatch(actionCreators.changeInputValue(ivalueElem.value));
-        },
-    }
-    
-}
-
-export default connect(mapStateToProps, mapDispathToProps)(Submenu);