From 9a11e62adeb8d435b52a361eb62d5b59e1deef2a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 23 五月 2024 21:14:50 +0800 Subject: [PATCH] 2024-05-23 --- src/components/header/index.jsx | 36 +++++++++++++++++++++++++++--------- 1 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx index 8465cc8..1a8b396 100644 --- a/src/components/header/index.jsx +++ b/src/components/header/index.jsx @@ -10,6 +10,7 @@ import MKEmitter from '@/utils/events.js' import Utils from '@/utils/utils.js' import avatar from '@/assets/img/avatar.jpg' +import wxicon from '@/assets/img/wx-icon.png' import './index.scss' const { confirm } = Modal @@ -24,6 +25,7 @@ userName: '', fullName: '', logourl: window.GLOB.mainlogo, + wxVisible: false, loginVisible: false, loginLoading: false, avatar: Utils.getrealurl(sessionStorage.getItem('avatar')), @@ -437,6 +439,8 @@ sessionStorage.setItem('cloudDataM', res.dataM ? 'true' : '') sessionStorage.setItem('cloudRole_id', res.role_id || '') + sessionStorage.setItem('CloudLogo', res.open_logo || '') + let _url = window.location.href.split('#')[0] + 'cloud' if (param.remember) { localStorage.setItem(_url, window.btoa(window.encodeURIComponent(JSON.stringify({time: new Date().getTime(), username: param.username, password: param.password})))) @@ -574,6 +578,8 @@ } else { Api.updateAppVersion() Api.delCacheConfig('all') + localStorage.removeItem(window.location.href.split('#')[0] + 'AuthCode') + setTimeout(() => { notification.success({ top: 92, @@ -592,14 +598,6 @@ about = () => { Modal.success({ title: '绯荤粺鐗堟湰v' + window.GLOB.appVersion - }) - } - - wxnotice = () => { - Modal.success({ - className: 'mk-wx-notice', - title: <QrCode card={{qrWidth: 320, color: '#000000'}} value={window.GLOB.baseurl + 'mob/wxnotice.html?userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')}/>, - okText: '鍏抽棴' }) } @@ -629,7 +627,7 @@ <Menu.Item key="verup" onClick={this.verup}> 椤甸潰鏇存柊 </Menu.Item> - {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={this.wxnotice}> + {window.GLOB.WXNotice ? <Menu.Item key="wxnotice" onClick={() => this.setState({wxVisible: true})}> 寰俊娑堟伅 </Menu.Item> : null} {window.GLOB.appVersion ? <Menu.Item key="version" onClick={this.about}> @@ -802,6 +800,26 @@ </Modal> {/* 淇敼瀵嗙爜 */} <Resetpwd /> + {/* 寰俊娑堟伅 */} + <Modal + wrapClassName="mk-wx-sms-modal" + visible={this.state.wxVisible} + title="鎵爜鍏虫敞 鎺ユ敹娑堟伅" + width={400} + centered={true} + onCancel={() => this.setState({wxVisible: false})} + footer={null} + destroyOnClose + > + <div className="wx-sms-wrap"> + <QrCode card={{qrWidth: 200, color: '#000000'}} value={window.GLOB.baseurl + 'mob/wxnotice.html?userid=' + sessionStorage.getItem('UserID') + '&loginuid=' + sessionStorage.getItem('LoginUID')}/> + <div className="tip"> + <img src={wxicon} alt=""/> + <span>寰俊鎵爜</span> + <span>鍏虫敞鍏紬鍙�</span> + </div> + </div> + </Modal> </header> ) } -- Gitblit v1.8.0