From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/views/menudesign/homeform/index.jsx | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/views/menudesign/homeform/index.jsx b/src/views/menudesign/homeform/index.jsx index db119a5..5ab9965 100644 --- a/src/views/menudesign/homeform/index.jsx +++ b/src/views/menudesign/homeform/index.jsx @@ -9,20 +9,22 @@ class CustomMenuForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� config: PropTypes.object, updateConfig: PropTypes.func } - state = { - menulist: [] - } + state = {} UNSAFE_componentWillMount () { - let _param = {func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'} - _param.pro_sys = window.GLOB.systemType === 'production' ? 'Y' : '' + if (sessionStorage.getItem('thdMenuList') && sessionStorage.getItem('fstMenuList')) { - Api.getSystemConfig(_param).then(result => { + } else { + this.getMenus() + } + } + + getMenus = () => { + Api.getSystemConfig({func: 's_get_pc_menus', systemType: options.sysType, debug: 'Y'}).then(result => { if (result.status) { let thdMenuList = [] let menulist = result.fst_menu.map(fst => { @@ -112,7 +114,7 @@ } render() { - const { dict, config } = this.props + const { config } = this.props const { getFieldDecorator } = this.props.form const formItemLayout = { labelCol: { @@ -164,7 +166,7 @@ rules: [ { required: true, - message: dict['mob.required.input'] + '鏃堕暱!' + message: '璇疯緭鍏ユ椂闀�!' } ] })( -- Gitblit v1.8.0