From da9f991d4211281248524caa5e112b6ecff84b70 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 29 四月 2025 11:28:15 +0800 Subject: [PATCH] 2025-04-29 --- src/views/login/loginform.jsx | 12 ++++-------- src/views/login/index.scss | 16 +++++++++++----- src/views/login/index.jsx | 22 ++++++++++++++++------ 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/src/views/login/index.jsx b/src/views/login/index.jsx index 796b520..01e5d0f 100644 --- a/src/views/login/index.jsx +++ b/src/views/login/index.jsx @@ -640,8 +640,16 @@ } if (['every_time', 'once', 'not_required'].includes(res.require_legal_consent) && res.legal_documents) { - systemMsg.prolType = res.require_legal_consent systemMsg.prolCont = res.legal_documents + try { + systemMsg.prolCont = window.decodeURIComponent(window.atob(systemMsg.prolCont)) + if (res.require_legal_consent !== 'not_required') { + systemMsg.prolType = res.require_legal_consent + } + } catch(e) { + systemMsg.prolType = '' + systemMsg.prolCont = '' + } } if ([10, 20, 30, 40, 50, 60, 70, 80, 90, 100].includes(res.member_level)) { @@ -964,11 +972,13 @@ /> : null} </div> <div className="login-bottom"> - {webSite && copyRight ? - <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, ' ') }}></a> : - <p dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, ' ') : '' }}></p> - } - <br/> + <p> + {webSite && copyRight ? + <a target="_blank" rel="noopener noreferrer" href={webSite} dangerouslySetInnerHTML={{ __html: copyRight.replace(/\s/ig, ' ') }}></a> : + <span dangerouslySetInnerHTML={{ __html: copyRight ? copyRight.replace(/\s/ig, ' ') : '' }}></span> + } + {prolCont && !prolType ? <span style={{marginLeft: '15px'}} dangerouslySetInnerHTML={{ __html: prolCont }}></span> : null} + </p> {ICP ? <a target="_blank" rel="noopener noreferrer" href="https://beian.miit.gov.cn/#/Integrated/index" dangerouslySetInnerHTML={{ __html: ICP.replace(/\s/ig, ' ') }}></a> : null} </div> {/* 缂栬緫鐘舵�佺櫥褰� */} diff --git a/src/views/login/index.scss b/src/views/login/index.scss index 7a5ef76..9f9b820 100644 --- a/src/views/login/index.scss +++ b/src/views/login/index.scss @@ -166,6 +166,7 @@ .btn-login { margin-bottom: 3vh; clear: both; + height: auto; } .register-line { font-size: 14px; @@ -188,6 +189,7 @@ display: inline-block; margin-bottom: 3vh; margin-top: -10px; + height: 35px; } .minline.right { float: right; @@ -207,11 +209,17 @@ margin-bottom: 10px; height: auto; margin-top: calc(-3vh + 10px); - font-size: 14px; + font-size: 13px; .ant-form-item-children { display: flex; - align-items: center; + align-items: flex-start; line-height: 1.5; + color: rgba(0, 0, 0, 0.5); + + .ant-checkbox-inner { + width: 15px; + height: 15px; + } a { color: var(--mk-sys-color); @@ -267,9 +275,7 @@ padding-top: 20px; p { margin-bottom: 5px; - } - p + br { - display: none; + text-align: center; } a { color: var(--mk-sys-font-color); diff --git a/src/views/login/loginform.jsx b/src/views/login/loginform.jsx index 8d19904..a1eee12 100644 --- a/src/views/login/loginform.jsx +++ b/src/views/login/loginform.jsx @@ -25,12 +25,10 @@ } } - let content = window.decodeURIComponent(window.atob(prolCont)) - return ( <> - {prolType !== 'not_required' ? <Checkbox defaultChecked={checked} onChange={change} style={{marginRight: '8px'}}></Checkbox> : null} - <span dangerouslySetInnerHTML={{__html: content}}></span> + <Checkbox defaultChecked={checked} onChange={change} style={{marginRight: '8px'}}></Checkbox> + <span dangerouslySetInnerHTML={{__html: prolCont}}></span> </> ) } @@ -79,8 +77,6 @@ protocol = localStorage.getItem(window.GLOB.sysSign + 'protocol') === 'true' } else if (prolType === 'every_time') { protocol = false - } else if (prolType === 'not_required') { - protocol = true } let remember = true @@ -553,7 +549,7 @@ )} </Form.Item> : null} <Form.Item className="btn-login"> - {protocol === false ? <Tooltip placement="top" trigger="click" title={dict['protocol_check'] || '璇烽槄璇诲苟鍚屾剰鍗忚锛�'}> + {protocol === false ? <Tooltip overlayStyle={{maxWidth: 500}} placement="top" trigger="click" title={dict['protocol_check'] || '璇烽槄璇诲苟鍚屾剰鍗忚锛�'}> <Button type="primary" htmlType="submit" className="login-form-button disabled"> {dict['log_in'] || '鐧诲綍'} </Button> @@ -617,7 +613,7 @@ )} </Form.Item> : null} <Form.Item className="btn-login"> - {protocol === false ? <Tooltip placement="top" trigger="click" title={dict['protocol_check'] || '璇烽槄璇诲苟鍚屾剰鍗忚锛�'}> + {protocol === false ? <Tooltip overlayStyle={{maxWidth: 500}} placement="top" trigger="click" title={dict['protocol_check'] || '璇烽槄璇诲苟鍚屾剰鍗忚锛�'}> <Button type="primary" htmlType="submit" className="login-form-button disabled"> {dict['log_in'] || '鐧诲綍'} </Button> -- Gitblit v1.8.0