| | |
| | | "display": "standalone", |
| | | "theme_color": "#000000", |
| | | "background_color": "#ffffff", |
| | | "mk_version": "20250301" |
| | | "mk_version": "20250402" |
| | | } |
| | |
| | | GLOB.showline = _systemMsg.showline || '' |
| | | GLOB.navBar = _systemMsg.navBar || 'shutter' |
| | | GLOB.appVersion = _systemMsg.app_version || '' |
| | | GLOB.loginOtop = _systemMsg.loginOtop || '' |
| | | GLOB.loginOleft = _systemMsg.loginOleft || '' |
| | | sessionStorage.setItem('appname', _systemMsg.appname || '') |
| | | |
| | | let levels = [30, 10, 20, 40, 50, 60, 70, 80, 90, 100] |
| | |
| | | value: GLOB.debugger |
| | | }) |
| | | } else if (GLOB.sysType === 'cloud') { |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | | value: GLOB.debugger |
| | | }) |
| | | |
| | | GLOB.breakpoint = false |
| | | if (sessionStorage.getItem('cloudRun') === 'debug') { |
| | | GLOB.debugger = true |
| | | } else { |
| | | Object.defineProperty(GLOB, 'debugger', { |
| | | writable: false, |
| | | value: GLOB.debugger |
| | | }) |
| | | |
| | | GLOB.breakpoint = false |
| | | } |
| | | } else { |
| | | if (sessionStorage.getItem('breakpoint')) { |
| | | GLOB.debugger = true |
| | |
| | | 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 || '', |
| | |
| | | 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)) { |
| | |
| | | window.location.reload() |
| | | return |
| | | } |
| | | |
| | | window.GLOB.loginOtop = systemMsg.loginOtop |
| | | window.GLOB.loginOleft = systemMsg.loginOleft |
| | | |
| | | this.setState({ |
| | | loginWays: login_ways, |
| | |
| | | render () { |
| | | const { lineColor, bgImage, loginlogo, copyRight, webSite, ICP, loginWays } = 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" style={bgImage ? {backgroundImage: 'url(' + bgImage + ')'} : {}}> |
| | | <div className="login-container" id="mk-login-view" style={wrapStyle}> |
| | | <div className="logo" style={lineColor ? {borderColor: lineColor} : {}}> |
| | | {loginlogo ? <img src={loginlogo} alt=""/> : null} |
| | | {this.state.platName ? <p className="plat-name">{this.state.platName}</p> : null} |
| | |
| | | background-size: cover; |
| | | background-repeat: no-repeat; |
| | | background-position: center center; |
| | | --mk-login-offset-top: 0px; |
| | | --mk-login-offset-left: 0px; |
| | | |
| | | .logo { |
| | | position: relative; |
| | | height: 100px; |
| | |
| | | |
| | | .login-middle { |
| | | position: relative; |
| | | height: calc(100vh - 194px); |
| | | height: calc(100vh - 200px); |
| | | min-height: 420px; |
| | | background-size: cover; |
| | | background-position: center center; |
| | | border-bottom: 2px solid var(--mk-sys-color); |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: right; |
| | | padding-right: 20vw; |
| | | overflow: hidden; |
| | | |
| | | .login-form-button { |
| | | background-color: var(--mk-sys-color); |
| | |
| | | |
| | | .login-form { |
| | | position: relative; |
| | | float: right; |
| | | margin-top: 5%; |
| | | margin-right: 20%; |
| | | background: #ffffff; |
| | | width: 22vw; |
| | | min-width: 300px; |
| | | border-radius: 5px; |
| | | overflow: hidden; |
| | | border: 1px solid #bfbfbf; |
| | | top: var(--mk-login-offset-top, 0px); |
| | | left: var(--mk-login-offset-left, 0px); |
| | | transition: all 0.2s; |
| | | |
| | | .login-way-title { |
| | | font-size: 18px; |
| | |
| | | @media screen and (max-width: 500px) { |
| | | .login-container { |
| | | .login-middle { |
| | | .login-form { |
| | | float: unset; |
| | | margin: 0 auto; |
| | | margin-top: 5%; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @media screen and (min-width: 1550px) { |
| | | .login-container { |
| | | .ant-tabs.ant-tabs-card { |
| | | .ant-tabs-card-bar { |
| | | .ant-tabs-tab { |
| | | font-size: 20px; |
| | | } |
| | | } |
| | | justify-content: center; |
| | | padding-right: 0px; |
| | | } |
| | | } |
| | | } |
| | |
| | | MKEmitter.emit('debugChange') |
| | | } |
| | | }) |
| | | } else { |
| | | Object.defineProperty(window, 'debugger', { |
| | | configurable: true, |
| | | enumerable: true, |
| | | set(value) { |
| | | if (value === 1949) { |
| | | sessionStorage.setItem('cloudRun', 'debug') |
| | | window.location.reload() |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |