commonClassify.js 945 Bytes
import { connect } from 'umi';
import CommonClassify from '../../components/CommonClassifyEvent/CommonClassify';


function commonClassify({ dispatch, app, content }) {
  function getResult(resultValue) {
    /* 更改返回值 */
    dispatch({ type: 'app/changePpopupPane', payload: { resultValue } });
  }

  function getSecondResult(resultValue) {
    /* 更改返回值 */
    dispatch({ type: 'app/changeSecondPpopupPane', payload: { resultValue } });
  }

  function removeSecondModalPane(changePanes) {
    dispatch({ type: 'app/removeSecondModalPane', payload: { changePanes } });
  }

  const commonClassifyProps = {
    app,
    content,
    dispatch,
    handleGetResult: getResult,
    handleGetSelfResult: getSecondResult,
    removeSecondModalPane,
  };
  return (
    <CommonClassify {...commonClassifyProps} style = {{height:'100%'}}/>
  );
}

export default connect(({ app, content }) =>
  ({ app, content }))(commonClassify);