king
2021-03-12 e2a0980e4a701a3dd07c339ff24ec4221dbed2dd
src/views/pcdesign/index.jsx
@@ -67,6 +67,7 @@
  }
  UNSAFE_componentWillMount() {
    if (this.props.memberLevel < 30) return
    try {
      let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param)))
@@ -110,6 +111,10 @@
  }
  componentDidMount () {
    if (this.props.memberLevel < 30) {
      document.getElementById('mk-pc-design-view').innerHTML = '<div style="text-align: center; font-size: 30px; margin-top: 40vh; height: 100vh; background: #fff;">本应用没有PC端页面的编辑权限,请联系管理员!</div>'
      return
    }
    MKEmitter.addListener('delButtons', this.delButtons)
    MKEmitter.addListener('thawButtons', this.thawButtons)
    MKEmitter.addListener('copyButtons', this.copyButtons)
@@ -163,7 +168,11 @@
      param.MenuName = menu.MenuName
    }
    this.props.history.push('/pcdesign/' + window.btoa(window.encodeURIComponent(JSON.stringify(param))))
    param = window.btoa(window.encodeURIComponent(JSON.stringify(param)))
    if (param === this.props.match.params.param) return
    this.props.history.push('/pcdesign/' + param)
  }
  getAppMessage = () => {
@@ -1396,7 +1405,7 @@
    return (
      <ConfigProvider locale={localedict}>
        <div className={'mk-pc-view '} id="mk-menu-design-view">
        <div className={'mk-pc-view '} id="mk-pc-design-view">
          {loading ? <Spin className="view-spin" size="large" /> : null}
          <DndProvider backend={HTML5Backend}>
            <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}>
@@ -1460,8 +1469,10 @@
  }
}
const mapStateToProps = () => {
  return {}
const mapStateToProps = (state) => {
  return {
    memberLevel: state.memberLevel
  }
}
const mapDispatchToProps = (dispatch) => {