king
2025-04-03 d4d2b680baff18f950da5e77463c1f0e26dbd567
src/views/login/index.jsx
@@ -667,6 +667,20 @@
            if (!['shutter', 'linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(res.menu_type)) {
              res.menu_type = 'shutter'
            }
            let loginOtop = ''
            let loginOleft = ''
            let windowWidth = window.innerWidth
            let fix = null
            res.login_screen_offset && res.login_screen_offset.forEach(item => {
              if (!item.offset_x && !item.offset_y) return
              if (fix === null || Math.abs(windowWidth - item.resolution_width) < fix) {
                fix = Math.abs(windowWidth - item.resolution_width)
                loginOtop = item.offset_y + item.y_unit
                loginOleft = item.offset_x + item.x_unit
              }
            })
            let systemMsg = {
              favicon: res.titlelogo || '',
@@ -684,7 +698,9 @@
              navBar: res.menu_type, // shutter 百叶窗、linkage_navigation 联动菜单、linkage 联动菜单_无导航栏、menu_board 菜单面板、menu_board_navigation 菜单面板_标签页
              app_version: res.app_version,
              Member_Level: 0,
              appname: res.appname || ''
              appname: res.appname || '',
              loginOtop: loginOtop,
              loginOleft: loginOleft
            }
            if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) {
@@ -798,6 +814,9 @@
              window.location.reload()
              return
            }
            window.GLOB.loginOtop = systemMsg.loginOtop
            window.GLOB.loginOleft = systemMsg.loginOleft
            
            this.setState({
              loginWays: login_ways,
@@ -1024,12 +1043,24 @@
  render () {
    const { lineColor, loginlogo, bgImage, copyRight, webSite, ICP, loginWays, platName } = this.state
    let wrapStyle = {}
    if (bgImage) {
      wrapStyle.backgroundImage = `url(${bgImage})`
    }
    if (window.GLOB.loginOtop) {
      wrapStyle['--mk-login-offset-top'] = window.GLOB.loginOtop
    }
    if (window.GLOB.loginOleft) {
      wrapStyle['--mk-login-offset-left'] = window.GLOB.loginOleft
    }
    return (
      <div className="login-container" id="mk-login-view">
      <div className="login-container" id="mk-login-view" style={wrapStyle}>
        <div className="logo" style={lineColor ? {borderColor: lineColor} : {}}>
          {loginlogo ? <img src={loginlogo} alt=""/> : null}
        </div>
        <div className="login-middle" style={bgImage ? {backgroundImage: 'url(' + bgImage + ')'} : null}>
        <div className="login-middle">
          {loginWays ? <LoginForm
            auth={this.state.auth}
            authError={this.state.authError}
@@ -1041,13 +1072,13 @@
            authLogin={this.authLogin}
            wrappedComponentRef={(inst) => this.loginformRef = inst}
          /> : null}
          <div className="login-bottom">
            {webSite && copyRight ?
              <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
              <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
            }
            {ICP ? <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/#/Integrated/index" dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></a> : null}
          </div>
        </div>
        <div className="login-bottom">
          {webSite && copyRight ?
            <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, '&nbsp;') }}></a> :
            <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, '&nbsp;') : '' }}></p>
          }
          {ICP ? <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/#/Integrated/index" dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, '&nbsp;') }}></a> : null}
        </div>
        {/* 编辑状态登录 */}
        <Modal